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

# Platform

> Reference for the synheart commands in the Platform group.

Every command also accepts the [global flags](/cli/reference/index#global-flags).

## `synheart api-key`

List and manage API keys

Work with the API keys in your organization. Each subcommand calls the
Synheart platform API, so you must be logged in.

'api-key list' prints a table (JSON with --json); the other subcommands print
the result as JSON. Use 'revoke' to turn a key off and 'delete' to remove it.
To browse keys interactively, open 'synheart ui'.

**Usage**

```bash theme={null}
synheart api-key
```

**Subcommands**

* `synheart api-key delete`: Delete an API key
* `synheart api-key list`: List your API keys
* `synheart api-key revoke`: Revoke an API key
* `synheart api-key show`: Show one API key

**Examples**

```bash theme={null}
# List keys
synheart api-key list
# Revoke one
synheart api-key revoke key_123
```

### `synheart api-key delete`

Delete an API key

Deletes the API key with the given ID through the platform API. It does not
ask for confirmation, so check the ID first with 'synheart api-key show'. Needs
you to be logged in and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart api-key delete <key_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Check what you are about to delete
synheart api-key show key_123
# Delete it
synheart api-key delete key_123
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart api-key list`

List your API keys

Lists the API keys in your organization as a table. Needs you to be logged in
and network access. With --json it prints the result as JSON.

**Usage**

```bash theme={null}
synheart api-key list [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# List keys
synheart api-key list
# As JSON
synheart api-key list --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart api-key revoke`

Revoke an API key

Revokes the API key with the given ID so it stops working. It does not ask
for confirmation. Use it when a key may have leaked. Needs you to be logged in
and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart api-key revoke <key_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Revoke a key
synheart api-key revoke key_123
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart api-key show`

Show one API key

Prints the details of the API key with the given ID. Needs you to be
logged in and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart api-key show <key_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Show a key
synheart api-key show key_123
# Compact JSON for scripts
synheart api-key show key_123 --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart auth`

Sign in, sign out and inspect credentials

Manage how the CLI authenticates to Synheart. 'login', 'logout' and
'whoami' are also available at the top level, because you will use them most;
'status' and 'refresh' are for troubleshooting sign-in.

**Usage**

```bash theme={null}
synheart auth
```

**Subcommands**

* `synheart auth refresh`: Refresh your token to pick up plan changes
* `synheart auth status`: Show where credentials are stored and if they load

**Examples**

```bash theme={null}
# Why does the CLI think I am signed out?
synheart auth status
# Pick up a plan change without signing in again
synheart auth refresh
```

### `synheart auth refresh`

Refresh your token to pick up plan changes

Exchanges your stored refresh token for a new access token, even if the
current one is still valid. Prints the organization and plan from the new
token. Rarely needed: whoami, usage and the TUI refresh your plan claims
automatically when they are older than 5 minutes, so an upgrade shows up
without signing out and in again. Needs: you are logged in and network
access. With --json it prints the result as an object.

**Usage**

```bash theme={null}
synheart auth refresh
```

**Examples**

```bash theme={null}
# Refresh and show the new plan
synheart auth refresh
# As JSON
synheart auth refresh --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart auth status`

Show where credentials are stored and if they load

Reports whether the CLI can load your credentials and from where (file or
keyring), when they expire, and whether a refresh token is present. Use it to
debug "not logged in" problems. Reads local state only; no network call. Exits
1 when no usable credentials are found. With --json it prints the same fields
as an object.

**Usage**

```bash theme={null}
synheart auth status
```

**Examples**

```bash theme={null}
# Check stored credentials
synheart auth status
# As JSON
synheart auth status --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart login`

Sign in to your Synheart account

Signs you in with the OAuth 2.0 device flow. The CLI prints a URL and a
code, opens your browser (unless you pass --no-browser), and waits while you
approve it. Tokens are stored in your system keychain, or in
\~/.synheart/credentials.enc when no keychain is available.

For CI and agents, which cannot use a browser, set SYNHEART\_CI\_TOKEN (or pass
\--ci-token) to store a long-lived token from the dashboard instead. Prefer the
environment variable: a flag is visible in process listings and shell history.
With --json the CI-token sign-in prints "logged\_in", "method", "storage" and
"credentials\_path" as an object.

Needs network access. 'synheart auth login' does the same; 'synheart ui' has
a sign-in screen too.

**Usage**

```bash theme={null}
synheart login [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--ci-token` | `string` | - | Long-lived CI bearer token (overrides \$SYNHEART\_CI\_TOKEN) |
| `--no-browser` | `bool` | `false` | Print the sign-in URL without opening a browser |

**Examples**

```bash theme={null}
# Sign in with your browser
synheart login
# Sign in from CI with a token from the environment
export SYNHEART_CI_TOKEN=sht_ci_abc123
synheart login
# Print the sign-in URL instead of opening a browser
synheart login --no-browser
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart logout`

Sign out and remove stored credentials

Removes the credentials stored on this machine. Add --revoke to also revoke
the tokens on the server, which is the right choice on a shared or lost
device. Says "Not logged in" and does nothing when you are already signed out.
Needs network access only with --revoke. With --json it prints "logged\_out",
"was\_logged\_in" and "revoke\_requested" as an object.

**Usage**

```bash theme={null}
synheart logout [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--revoke` | `bool` | `false` | Also revoke the tokens on the server |

**Examples**

```bash theme={null}
# Sign out of this machine
synheart logout
# Also revoke the tokens on the server
synheart logout --revoke
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart org`

List and manage your organizations

Work with the organizations your account belongs to. Each subcommand calls
the Synheart platform API, so you must be logged in.

'org list' prints a table (JSON with --json); the other subcommands print the
result as JSON. Pass --org or set SYNHEART\_ORG\_ID to act on a specific
organization. To browse them interactively, open 'synheart ui'.

**Usage**

```bash theme={null}
synheart org
```

**Subcommands**

* `synheart org delete`: Delete an organization
* `synheart org list`: List your organizations
* `synheart org show`: Show one organization

**Examples**

```bash theme={null}
# List your organizations
synheart org list
# Show one
synheart org show org_acme_xyz --json
```

### `synheart org delete`

Delete an organization

Deletes the organization with the given ID through the platform API. It
does not ask for confirmation, so check the ID first with 'synheart org show'.
Needs you to be logged in and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart org delete <org_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Check what you are about to delete
synheart org show org_acme_xyz
# Delete it
synheart org delete org_acme_xyz
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart org list`

List your organizations

Lists the organizations your account belongs to as a table. Needs you to be
logged in and network access. With --json it prints the result as JSON.

**Usage**

```bash theme={null}
synheart org list [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# List organizations
synheart org list
# Pipe the JSON to another tool
synheart org list --json | jq '.'
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart org show`

Show one organization

Prints the details of the organization with the given ID. Needs you to be
logged in and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart org show <org_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Show an organization
synheart org show org_acme_xyz
# Compact JSON for scripts
synheart org show org_acme_xyz --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart project`

List and manage your projects

Work with the projects in your organization. Each subcommand calls the
Synheart platform API, so you must be logged in.

'project list' prints a table (JSON with --json); the other subcommands print
the result as JSON. Pass --org and --tenant (or set SYNHEART\_ORG\_ID and
SYNHEART\_TENANT\_ID) to choose the scope. To browse them interactively, open
'synheart ui'.

**Usage**

```bash theme={null}
synheart project
```

**Subcommands**

* `synheart project delete`: Delete a project
* `synheart project list`: List your projects
* `synheart project show`: Show one project

**Examples**

```bash theme={null}
# List projects
synheart project list
# Show one
synheart project show proj_123 --json
```

### `synheart project delete`

Delete a project

Deletes the project with the given ID through the platform API. It does
not ask for confirmation, so check the ID first with 'synheart project show'.
Needs you to be logged in and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart project delete <project_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Check what you are about to delete
synheart project show proj_123
# Delete it
synheart project delete proj_123
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart project list`

List your projects

Lists the projects for your tenant as a table. Needs you to be logged in and
network access. With --json it prints the result as JSON.

**Usage**

```bash theme={null}
synheart project list [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# List projects
synheart project list
# List projects of another organization, as JSON
synheart project list --org org_acme_xyz --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart project show`

Show one project

Prints the details of the project with the given ID. Needs you to be
logged in and network access. Prints the result as JSON.

**Usage**

```bash theme={null}
synheart project show <project_id> [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Sent as X-Org-ID header (env: SYNHEART\_ORG\_ID) |
| `--tenant` | `string` | - | Sent as X-Tenant-ID header (env: SYNHEART\_TENANT\_ID) |

**Examples**

```bash theme={null}
# Show a project
synheart project show proj_123
# Compact JSON for scripts
synheart project show proj_123 --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart usage`

Show plan usage, limits and Syni meters

Shows the current billing period for your organization: plan, cost,
limits on projects, apps and seats, Syni entitlements, and Syni cloud chat
meters. Use it to see how close you are to a limit. Your plan claims are
refreshed automatically first when they are older than 5 minutes, so a recent
upgrade shows up.

Needs: you are logged in and network access. The organization comes from your
sign-in; override it with --org or SYNHEART\_ORG\_ID. With --json it prints the
report as an object.

**Usage**

```bash theme={null}
synheart usage [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--org` | `string` | - | Organization ID (env: SYNHEART\_ORG\_ID; default: the org in your sign-in) |
| `--period` | `string` | - | Billing period for the Syni meters (default: the current period) |

**Examples**

```bash theme={null}
# Show usage for your organization
synheart usage
# As JSON
synheart usage --json
# For a specific organization
synheart usage --org org_acme_xyz
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart whoami`

Show the account you are signed in as

Prints the signed-in account: ID, email, name, organization, plan and the
runtime variants your plan includes. Use it to confirm which account the CLI
will act as. If your sign-in is older than 5 minutes it is refreshed first, so
a recent plan change shows up. Needs you to be logged in; exits 1 with
SH-AUTH-001 otherwise. With --json it prints the account as an object with
"logged\_in" and "claims\_refreshed".

**Usage**

```bash theme={null}
synheart whoami
```

**Examples**

```bash theme={null}
# Show the current account
synheart whoami
# As JSON
synheart whoami --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.