> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gavai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# gavai tenant

> List the workspaces the signed-in user can access.

export const ErrorTable = ({errors}) => <div className="gv-error-table" role="table" aria-label="Errors and fixes">
    <div className="gv-error-table__head" role="row">
      <span className="gv-error-table__col-head" role="columnheader">Error</span>
      <span className="gv-error-table__col-head" role="columnheader">Cause</span>
      <span className="gv-error-table__col-head" role="columnheader">Fix</span>
    </div>
    {errors.map((err, i) => <div className="gv-error-table__row" role="row" key={i}>
        <code className="gv-error-table__code" role="cell">{err.code}</code>
        <div className="gv-error-table__cause" role="cell">{err.cause}</div>
        <div className="gv-error-table__fix" role="cell">{err.fix}</div>
      </div>)}
  </div>;

export const Eyebrow = ({label, tone = "default"}) => <div className={`gv-eyebrow gv-eyebrow--${tone}`}>
    <span className="gv-eyebrow__bar" aria-hidden="true" />
    <span className="gv-eyebrow__label">{label}</span>
  </div>;

<Eyebrow label="CLI" />

This page covers `gavai tenant`, which lists every workspace the signed-in user can access. You can use it to confirm a workspace slug before passing it elsewhere or to remind yourself which workspaces are in scope on the current session.

## Synopsis

```bash theme={null}
gavai tenant
```

## Arguments

None.

## Flags

<Note>
  Run `gavai tenant --help` for the authoritative flag list. The CLI is the source of truth.
</Note>

## Behavior

The command calls `GET /v1/workspaces` with the stored access token and prints the workspaces returned. The full response shape (including pagination and filters supported by the underlying endpoint) lives at [Workspaces resource](/api-reference/resources/workspaces).

## Examples

List your workspaces:

```bash theme={null}
gavai tenant
```

Pipe through `jq` to extract just the slugs (when the CLI emits JSON):

```bash theme={null}
gavai tenant | jq -r '.workspaces[].slug'
```

<Note>
  The exact output format (table, plain list, or JSON) depends on the CLI version. Run `gavai tenant --help` to see whether your build supports a `--format` flag.
</Note>

## Exit codes

<ErrorTable
  errors={[
{ code: "0", cause: "Workspaces printed.", fix: "—" },
{ code: "3", cause: "Not authenticated.", fix: "Run `gavai login`." },
{ code: "7", cause: "Network or API server error.", fix: "Retry with backoff." },
]}
/>

See [CLI overview — exit codes](/cli/overview#exit-codes) for the full table.

<Card title="gavai get" href="/cli/commands/get">
  Fetch a page document from the active workspace.
</Card>
