> Complete canonical reference for the dewee command line interface.

# `dewee` CLI Reference

The `dewee` binary is the canonical control-plane client for managing local and remote Dewee gateways.

## Global Persistent Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--config` | `string` | config file (default: config.json or $GOCLAW\_CONFIG) | `-` |
\| `--server` | `string` | gateway server URL override | `-` |
\| `--tenant` | `string` | gateway tenant ID or slug to scope operator commands to (default: master tenant) | `-` |
\| `--token` | `string` | gateway bearer token override | `-` |
\| `--verbose` | `bool` | enable debug logging | `false` |

***

## Command Tree Overview

* [`dewee agent`](#dewee-agent) — Manage agents (add, list, get, status, update, delete)
* [`dewee api-keys`](#dewee-api-keys) — Manage gateway API keys
* [`dewee auth`](#dewee-auth) — Authenticate named ChatGPT OAuth accounts
* [`dewee backup`](#dewee-backup) — Create a full system backup (database + filesystem)
* [`dewee bitrix-portal`](#dewee-bitrix-portal) — Manage Bitrix24 portals (direct DB access; postgres only)
* [`dewee channels`](#dewee-channels) — Manage messaging channels (requires running gateway)
* [`dewee config`](#dewee-config) — View and manage configuration
* [`dewee contacts`](#dewee-contacts) — View the channel-collected contact directory
* [`dewee cron`](#dewee-cron) — Manage scheduled cron jobs
* [`dewee doctor`](#dewee-doctor) — Check system environment and configuration health
* [`dewee files`](#dewee-files) — Browse and manage workspace file storage
* [`dewee fleet-worker`](#dewee-fleet-worker) — Run the standalone fleet package worker
* [`dewee kg`](#dewee-kg) — Inspect and manage agent knowledge graph data
* [`dewee mcp`](#dewee-mcp) — Manage MCP servers and access grants
* [`dewee memory`](#dewee-memory) — Inspect and manage agent memory documents
* [`dewee migrate`](#dewee-migrate) — Database migration management
* [`dewee onboard`](#dewee-onboard) — Quick setup — configure database, generate keys, run migrations
* [`dewee packages`](#dewee-packages) — Manage runtime packages
* [`dewee pairing`](#dewee-pairing) — Manage device pairing (approve, list, revoke)
* [`dewee providers`](#dewee-providers) — Manage LLM providers (requires running gateway)
* [`dewee restore`](#dewee-restore) — Restore system from a backup archive (database + filesystem)
* [`dewee sessions`](#dewee-sessions) — View and manage chat sessions
* [`dewee setup`](#dewee-setup) — Configuration wizard — providers, agents, channels
* [`dewee skills`](#dewee-skills) — List and manage skills
* [`dewee tenant-backup`](#dewee-tenant-backup) — Create a tenant-scoped backup (database rows + filesystem)
* [`dewee tenant-restore`](#dewee-tenant-restore) — Restore a tenant from a backup archive
* [`dewee tenant-transfer`](#dewee-tenant-transfer) — Preview, copy, or move resources between tenants (Standard/PostgreSQL)
* [`dewee traces`](#dewee-traces) — Inspect gateway traces
* [`dewee tts`](#dewee-tts) — Inspect TTS provider capabilities, list voices, and test connections
* [`dewee upgrade`](#dewee-upgrade) — Upgrade database schema and run data migrations
* [`dewee usage`](#dewee-usage) — Inspect token usage and cost metrics
* [`dewee vault`](#dewee-vault) — Inspect and manage Knowledge Vault documents
* [`dewee version`](#dewee-version) — Print version information

***

## Commands

### `dewee agent`

Manage agents (add, list, get, status, update, delete)

```bash
dewee agent
```

#### `dewee agent add`

Add a new agent (interactive, requires running gateway)

```bash
dewee agent add
```

#### `dewee agent chat`

Chat with an agent interactively or send a one-shot message

Chat with an agent via the running gateway (WebSocket client mode).

Examples:
dewee agent chat                          # Interactive REPL
dewee agent chat —name coder             # Chat with “coder” agent
dewee agent chat -m “What time is it?”    # One-shot message
dewee agent chat -s my-session            # Continue a session

```bash
dewee agent chat [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `-m`, `--message` | `string` | one-shot message (omit for interactive mode) | `-` |
\| `-n`, `--name` | `string` | agent name | `default` |
\| `-s`, `--session` | `string` | session key (default: auto-generated) | `-` |

#### `dewee agent delete`

Delete an agent (requires running gateway)

```bash
dewee agent delete <agent-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--force` | `bool` | skip confirmation | `false` |

#### `dewee agent get`

Get agent details

```bash
dewee agent get <agent-id-or-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee agent list`

List all agents (requires running gateway)

```bash
dewee agent list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--type` | `string` | filter by agent type (open|predefined) | `-` |

#### `dewee agent status`

Show agent configuration and live router status

```bash
dewee agent status <agent-id-or-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee agent update`

Update agent fields

```bash
dewee agent update <agent-id-or-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--enabled` | `bool` | set status active/inactive | `true` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--model` | `string` | model name | `-` |
\| `--name` | `string` | display name | `-` |
\| `--provider` | `string` | provider type/name | `-` |
\| `--status` | `string` | agent status | `-` |

### `dewee api-keys`

Manage gateway API keys

Manage gateway-issued API keys: list, create, and revoke scoped
credentials for tenant, workspace, and user callers.

Authentication uses —token or these environment variables:
GOCLAW\_GATEWAY\_TOKEN   bearer token for operator API calls
GOCLAW\_GATEWAY\_URL     gateway base URL
GOCLAW\_SERVER          gateway base URL alias

Attribution limitation: the CLI authenticates to the gateway as the fixed
identity “system”, so every key created through this command is recorded
with created\_by=“system” rather than an individual operator identity.

```bash
dewee api-keys
```

#### `dewee api-keys create`

Create an API key

Create a new API key. The raw secret is returned only once in the
create response and cannot be retrieved again afterward — store it securely.

—tenant-id is only honored for callers with owner-scope credentials; the
gateway silently falls back to the caller’s own tenant otherwise. This
command warns on stderr if the created key does not carry the tenant/owner
you requested.

```bash
dewee api-keys create [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--expires-in` | `int` | TTL in seconds (omit for a key that never expires) | `0` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--name` | `string` | human-readable label (required) | `-` |
\| `--owner-id` | `string` | user ID to bind the key to | `-` |
\| `--scopes` | `stringSlice` | comma-separated permission scopes (required) | `[]` |
\| `--tenant-id` | `string` | tenant UUID to bind the key to (owner-scope callers only; ignored otherwise) | `-` |

#### `dewee api-keys list`

List API keys

```bash
dewee api-keys list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--kind` | `string` | filter by key kind: “api\_key” (default, hides session tokens), “session”, or “all” | `-` |
\| `--revoked` | `bool` | filter to revoked (—revoked) or active (—revoked=false) keys; omit to show both | `false` |
\| `--tenant-id` | `string` | filter to keys bound to this tenant ID | `-` |

#### `dewee api-keys revoke`

Revoke an API key

```bash
dewee api-keys revoke <id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--force` | `bool` | skip confirmation prompt | `false` |
\| `--json` | `bool` | output as JSON | `false` |

### `dewee auth`

Authenticate named ChatGPT OAuth accounts

Manage ChatGPT OAuth authentication via the running gateway. Requires the gateway to be running.

```bash
dewee auth
```

#### `dewee auth logout`

Disconnect stored ChatGPT OAuth tokens

```bash
dewee auth logout [provider]
```

#### `dewee auth status`

Show OAuth authentication status

Check if a named ChatGPT OAuth account is authenticated on the running gateway.

```bash
dewee auth status [provider]
```

### `dewee backup`

Create a full system backup (database + filesystem)

Produces a .tar.gz archive containing a pg\_dump of the database and all workspace/data files.

```bash
dewee backup [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--exclude-db` | `bool` | skip database dump (filesystem only) | `false` |
\| `--exclude-files` | `bool` | skip filesystem archive (database only) | `false` |
\| `-o`, `--output` | `string` | output path for .tar.gz (default: ./backup-\<timestamp>.tar.gz) | `-` |
\| `--upload-s3` | `bool` | upload backup to S3 after creation (requires s3 config in config\_secrets) | `false` |

### `dewee bitrix-portal`

Manage Bitrix24 portals (direct DB access; postgres only)

Manage Bitrix24 portal rows in the database.

dewee expects a `bitrix_portals` row to exist before an operator runs the
OAuth install flow at `/bitrix24/install`. This command seeds that row without
requiring SQL access to the database.

```bash
dewee bitrix-portal
```

#### `dewee bitrix-portal create`

Create a bitrix\_portals row with client\_id/client\_secret

Create a new Bitrix24 portal registration.

After the row exists, direct the portal admin to
`https://&lt;public_url&gt;/bitrix24/install?state=&lt;tenant_id&gt;:&lt;name&gt;`
to authorize the app — the install handler writes the OAuth token into the
`state` column of this same row.

```bash
dewee bitrix-portal create [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--client-id` | `string` | Bitrix24 application client\_id / application\_id (required) | `-` |
\| `--client-secret` | `string` | Bitrix24 application client\_secret / application key (required) | `-` |
\| `--domain` | `string` | Bitrix24 portal host, e.g. mycompany.bitrix24.com (required) | `-` |
\| `--name` | `string` | Short portal name, referenced by channel\_instance.config.portal (required) | `-` |
\| `--tenant-id` | `string` | Tenant UUID this portal belongs to (required) | `-` |

#### `dewee bitrix-portal list`

List bitrix\_portals rows (optionally scoped to one tenant)

```bash
dewee bitrix-portal list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--tenant-id` | `string` | Filter to one tenant UUID (optional) | `-` |

#### `dewee bitrix-portal set-public-url`

Backfill state.public\_url for a portal installed pre Phase-01

Set the gateway-public URL used to register Bitrix24 imbot event handlers.

Required for portals that were installed before the dewee release that
auto-captures the URL from the /bitrix24/install callback. Without it, the
factory cannot build a valid EVENT\_MESSAGE\_ADD URL for new channels.

After running once, the value is persisted in bitrix\_portals.state.public\_url
and reused on every restart. Subsequent reinstalls (when the public URL
rotates) overwrite the value automatically — this command is only for the
initial backfill.

```bash
dewee bitrix-portal set-public-url [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--name` | `string` | Portal name (required) | `-` |
\| `--tenant-id` | `string` | Tenant UUID this portal belongs to (required) | `-` |
\| `--url` | `string` | Gateway public URL, e.g. https\://dewee.mycompany.com (required) | `-` |

#### `dewee bitrix-portal update-credentials`

Replace client\_id/client\_secret on an existing portal row

Update OAuth credentials on an existing bitrix\_portals row.

Use this when rotating client\_secret or migrating from local app to
marketplace app. The OAuth state token is cleared by default (state from
old credentials cannot refresh under new client\_id/secret); pass
—keep-state only if rotating the secret of the SAME application.

```bash
dewee bitrix-portal update-credentials [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--client-id` | `string` | New Bitrix24 application client\_id (required) | `-` |
\| `--client-secret` | `string` | New Bitrix24 application client\_secret (required) | `-` |
\| `--keep-state` | `bool` | Keep existing OAuth state token (only safe when rotating secret of SAME application) | `false` |
\| `--name` | `string` | Portal name to update (required) | `-` |
\| `--tenant-id` | `string` | Tenant UUID this portal belongs to (required) | `-` |

### `dewee channels`

Manage messaging channels (requires running gateway)

```bash
dewee channels
```

#### `dewee channels add`

Add a new channel instance (interactive)

```bash
dewee channels add
```

#### `dewee channels delete`

Delete a channel instance

```bash
dewee channels delete <id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--force` | `bool` | skip confirmation | `false` |

#### `dewee channels list`

List channel instances

```bash
dewee channels list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

### `dewee config`

View and manage configuration

```bash
dewee config
```

#### `dewee config path`

Print the config file path

```bash
dewee config path
```

#### `dewee config show`

Display current configuration (secrets redacted)

```bash
dewee config show
```

#### `dewee config validate`

Validate configuration file

```bash
dewee config validate
```

### `dewee contacts`

View the channel-collected contact directory

```bash
dewee contacts
```

#### `dewee contacts get`

Get a single contact by ID

```bash
dewee contacts get <contact-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee contacts list`

List contacts with pagination and filters

```bash
dewee contacts list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--channel-instance` | `string` | filter by channel instance name | `-` |
\| `--channel-type` | `string` | filter by platform (telegram, discord, slack, …) | `-` |
\| `--contact-type` | `string` | filter by contact type (user, group) | `-` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--limit` | `int` | max results (1-200) | `50` |
\| `--offset` | `int` | pagination offset | `0` |
\| `--peer-kind` | `string` | filter by peer kind (direct, group) | `-` |
\| `--search` | `string` | filter by display name, username, or sender ID | `-` |

### `dewee cron`

Manage scheduled cron jobs

```bash
dewee cron
```

#### `dewee cron create`

Create a cron job

```bash
dewee cron create [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent id/key | `-` |
\| `--channel` | `string` | delivery channel | `-` |
\| `--deliver` | `bool` | deliver result to a channel | `false` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--message` | `string` | message to send when the job runs | `-` |
\| `--name` | `string` | job name | `-` |
\| `--schedule` | `string` | schedule JSON, @every/duration, at, or cron expression | `-` |
\| `--stateless` | `bool` | run without retaining session state | `false` |
\| `--to` | `string` | delivery target | `-` |
\| `--wake-heartbeat` | `bool` | wake heartbeat before run | `false` |

#### `dewee cron delete`

Delete a cron job

```bash
dewee cron delete [jobId] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee cron get`

Get a cron job

```bash
dewee cron get <job-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee cron list`

List all cron jobs

```bash
dewee cron list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--all` | `bool` | include disabled jobs | `false` |
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee cron run`

Run a cron job now

```bash
dewee cron run <job-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--force` | `bool` | force run even if not due | `false` |
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee cron runs`

List cron run history

```bash
dewee cron runs <job-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--limit` | `int` | max run records | `20` |
\| `--offset` | `int` | run record offset | `0` |

#### `dewee cron status`

Show cron scheduler status

```bash
dewee cron status [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee cron toggle`

Enable or disable a cron job

```bash
dewee cron toggle [jobId] [true|false] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee cron update`

Update a cron job

```bash
dewee cron update <job-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent id/key | `-` |
\| `--channel` | `string` | delivery channel | `-` |
\| `--delete-after-run` | `bool` | delete after a successful run | `false` |
\| `--deliver` | `bool` | deliver result to a channel | `false` |
\| `--enabled` | `bool` | enable or disable | `true` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--message` | `string` | message | `-` |
\| `--name` | `string` | job name | `-` |
\| `--schedule` | `string` | schedule JSON, @every/duration, at, or cron expression | `-` |
\| `--stateless` | `bool` | run without retaining session state | `false` |
\| `--to` | `string` | delivery target | `-` |
\| `--wake-heartbeat` | `bool` | wake heartbeat before run | `false` |

### `dewee doctor`

Check system environment and configuration health

```bash
dewee doctor
```

### `dewee files`

Browse and manage workspace file storage

Browse and manage files under the tenant-scoped workspace storage directory
(the same tree served by the Runtime Gateway Dashboard and Customer Control
Plane Storage pages).

Upload, delete, and move require an admin-scoped gateway token.

```bash
dewee files
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `-o`, `--output` | `string` | output format (table|json) | `table` |

#### `dewee files delete`

Delete a file or directory from storage

```bash
dewee files delete <path> --yes [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--yes` | `bool` | confirm deletion | `false` |

#### `dewee files get`

Get (read or download) a file from storage

```bash
dewee files get <path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--out` | `string` | save file content to this local path instead of printing it | `-` |

#### `dewee files list`

List files and directories in storage

```bash
dewee files list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--depth` | `int` | maximum depth to walk (1-20) | `3` |
\| `--path` | `string` | sub path to scope the listing | `-` |

#### `dewee files move`

Move or rename a file within storage

```bash
dewee files move --from <path> --to <path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--from` | `string` | source path | `-` |
\| `--to` | `string` | destination path | `-` |

#### `dewee files size`

Show total storage size for the tenant workspace

```bash
dewee files size
```

#### `dewee files upload`

Upload a local file into storage

```bash
dewee files upload --file <local-file> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--file` | `string` | local file to upload | `-` |
\| `--path` | `string` | destination sub path (directory) in storage | `-` |

### `dewee fleet-worker`

Run the standalone fleet package worker

```bash
dewee fleet-worker
```

#### `dewee fleet-worker run`

Pull and reconcile exact fleet package jobs

```bash
dewee fleet-worker run
```

### `dewee kg`

Inspect and manage agent knowledge graph data

**Aliases:** `knowledge-graph`

```bash
dewee kg
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `-o`, `--output` | `string` | output format (table|json) | `table` |

#### `dewee kg dedup`

Manage KG dedup candidates

```bash
dewee kg dedup
```

##### `dewee kg dedup dismiss`

Dismiss a KG dedup candidate

```bash
dewee kg dedup dismiss --agent <agent> <candidate-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |

##### `dewee kg dedup list`

List KG dedup candidates

```bash
dewee kg dedup list --agent <agent> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--limit` | `int` | maximum candidates | `50` |
\| `--user` | `string` | user ID for scoped KG | `-` |

##### `dewee kg dedup scan`

Scan KG entities for duplicates

```bash
dewee kg dedup scan --agent <agent> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--limit` | `int` | maximum scan pairs | `100` |
\| `--threshold` | `float64` | similarity threshold | `0.9` |
\| `--user` | `string` | user ID for scoped KG | `-` |

#### `dewee kg entities`

List or search KG entities

```bash
dewee kg entities --agent <agent> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--limit` | `int` | page size | `50` |
\| `--offset` | `int` | pagination offset | `0` |
\| `-q`, `--query` | `string` | search query | `-` |
\| `--type` | `string` | entity type filter | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |

#### `dewee kg entity`

Get one KG entity with relations

```bash
dewee kg entity --agent <agent> <entity-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |

#### `dewee kg extract`

Extract KG entities from text

```bash
dewee kg extract --agent <agent> (--file <file>|--text <text>) --provider <provider> --model <model> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--file` | `string` | text file to extract | `-` |
\| `--min-confidence` | `float64` | minimum extraction confidence | `0.75` |
\| `--model` | `string` | model name | `-` |
\| `--provider` | `string` | provider name | `-` |
\| `--text` | `string` | inline text to extract | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |

#### `dewee kg graph`

Show KG graph

```bash
dewee kg graph --agent <agent> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--limit` | `int` | maximum entities | `200` |
\| `--user` | `string` | user ID for scoped KG | `-` |

##### `dewee kg graph compact`

Show compact KG graph

```bash
dewee kg graph compact --agent <agent> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--limit` | `int` | maximum nodes | `2000` |
\| `--user` | `string` | user ID for scoped KG | `-` |

#### `dewee kg merge`

Merge duplicate KG entities

```bash
dewee kg merge --agent <agent> --target <entity-id> --source <entity-id> --yes [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--source` | `string` | source entity ID | `-` |
\| `--target` | `string` | target entity ID | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |
\| `--yes` | `bool` | confirm merge | `false` |

#### `dewee kg stats`

Show KG statistics

```bash
dewee kg stats --agent <agent> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |

#### `dewee kg traverse`

Traverse KG relationships

```bash
dewee kg traverse --agent <agent> --entity <entity-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--depth` | `int` | maximum traversal depth | `2` |
\| `--entity` | `string` | start entity ID | `-` |
\| `--user` | `string` | user ID for scoped KG | `-` |

### `dewee mcp`

Manage MCP servers and access grants

Manage MCP servers, tools, connection tests, reloads, and access grants.

Authentication uses —token or these environment variables:
GOCLAW\_GATEWAY\_TOKEN   bearer token for operator API calls
GOCLAW\_GATEWAY\_URL     gateway base URL
GOCLAW\_SERVER          gateway base URL alias

```bash
dewee mcp
```

#### `dewee mcp access`

Inspect MCP access grants

```bash
dewee mcp access
```

##### `dewee mcp access agent`

List MCP grants visible to an agent

```bash
dewee mcp access agent <agent-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee mcp access get`

List access grants for an MCP server

```bash
dewee mcp access get <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp get`

Get an MCP server

```bash
dewee mcp get <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp grant`

Grant MCP access

```bash
dewee mcp grant
```

##### `dewee mcp grant agent`

Grant an agent access to an MCP server

```bash
dewee mcp grant agent <server-id-or-name> <agent-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp list`

List MCP servers

```bash
dewee mcp list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp oauth`

Manage MCP server OAuth configuration and lifecycle

```bash
dewee mcp oauth
```

##### `dewee mcp oauth config`

Get or update redacted MCP OAuth config

```bash
dewee mcp oauth config <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--clear-client-secret` | `bool` | clear stored client secret | `false` |
\| `--client-id` | `string` | OAuth client ID | `-` |
\| `--client-secret` | `string` | write-only client secret (omit to preserve) | `-` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--registration-mode` | `string` | pre\_registered|client\_id\_metadata|dynamic | `-` |
\| `--scope` | `stringSlice` | requested OAuth scope (repeatable) | `[]` |
\| `--write` | `bool` | force a write even when only optional flags are empty | `false` |

##### `dewee mcp oauth disconnect`

Disconnect MCP OAuth credentials while preserving registration config

```bash
dewee mcp oauth disconnect <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee mcp oauth start`

Start MCP OAuth authorization for a server

```bash
dewee mcp oauth start <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee mcp oauth status`

Show MCP OAuth status for a server

```bash
dewee mcp oauth status <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee mcp oauth test`

Test saved MCP server connection using runtime OAuth credentials

```bash
dewee mcp oauth test <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp reload`

Reload an MCP server connection

```bash
dewee mcp reload <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp revoke`

Revoke MCP access

```bash
dewee mcp revoke
```

##### `dewee mcp revoke agent`

Revoke an agent’s MCP server access

```bash
dewee mcp revoke agent <server-id-or-name> <agent-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp test`

Test an MCP server connection

```bash
dewee mcp test <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee mcp tools`

List tools exposed by an MCP server

```bash
dewee mcp tools <server-id-or-name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

### `dewee memory`

Inspect and manage agent memory documents

```bash
dewee memory
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `-o`, `--output` | `string` | output format (table|json) | `table` |

#### `dewee memory chunks`

List memory chunks for a document

```bash
dewee memory chunks --agent <agent-id-or-key> --path <path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--path` | `string` | document path | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |

#### `dewee memory delete`

Delete a memory document

```bash
dewee memory delete --agent <agent-id-or-key> <path> --yes [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |
\| `--yes` | `bool` | confirm deletion | `false` |

#### `dewee memory get`

Get one memory document

```bash
dewee memory get --agent <agent-id-or-key> <path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--full` | `bool` | print full content in table output | `false` |
\| `--user` | `string` | user ID for scoped memory | `-` |

#### `dewee memory index`

Index one memory document

```bash
dewee memory index --agent <agent-id-or-key> <path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |

#### `dewee memory index-all`

Index all memory documents for an agent

```bash
dewee memory index-all --agent <agent-id-or-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |

#### `dewee memory list`

List memory documents for an agent

```bash
dewee memory list --agent <agent-id-or-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |

#### `dewee memory put`

Put or update a memory document

```bash
dewee memory put --agent <agent-id-or-key> <path> --file <file> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--file` | `string` | file content to store | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |

#### `dewee memory search`

Search agent memory

```bash
dewee memory search --agent <agent-id-or-key> --query <query> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID or key | `-` |
\| `--limit` | `int` | maximum results | `20` |
\| `--min-score` | `float64` | minimum score | `0` |
\| `-q`, `--query` | `string` | search query | `-` |
\| `--user` | `string` | user ID for scoped memory | `-` |

### `dewee migrate`

Database migration management

```bash
dewee migrate
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--migrations-dir` | `string` | path to migrations directory (default: ./migrations) | `-` |

#### `dewee migrate down`

Roll back migrations (default: 1 step)

```bash
dewee migrate down [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `-n`, `--steps` | `int` | number of steps to roll back | `1` |

#### `dewee migrate drop`

Drop all tables (DANGEROUS)

```bash
dewee migrate drop
```

#### `dewee migrate force`

Force set migration version (no migration applied)

```bash
dewee migrate force <version>
```

#### `dewee migrate goto`

Migrate to a specific version

```bash
dewee migrate goto <version>
```

#### `dewee migrate up`

Apply all pending migrations

```bash
dewee migrate up
```

#### `dewee migrate version`

Show current migration version

```bash
dewee migrate version
```

### `dewee onboard`

Quick setup — configure database, generate keys, run migrations

```bash
dewee onboard
```

### `dewee packages`

Manage runtime packages

Manage runtime package inventory, installs, removals, verification, approvals, and logs.

Authentication uses —token or these environment variables:
GOCLAW\_GATEWAY\_TOKEN   bearer token for operator API calls
GOCLAW\_GATEWAY\_URL     gateway base URL
GOCLAW\_SERVER          gateway base URL alias

```bash
dewee packages
```

#### `dewee packages approvals`

Manage pending package install approvals

```bash
dewee packages approvals
```

##### `dewee packages approvals approve`

Approve a pending package install request

```bash
dewee packages approvals approve <approval-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--always` | `bool` | create a scoped, expiring package-install grant when enabled | `false` |
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee packages approvals deny`

Deny a pending package install request

```bash
dewee packages approvals deny <approval-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--reason` | `string` | reviewer reason recorded with the denial | `-` |

##### `dewee packages approvals list`

List pending package install approvals

```bash
dewee packages approvals list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--all` | `bool` | include non-package exec approvals | `false` |
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages get`

Get an installed package from inventory

```bash
dewee packages get <package-or-source:name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages install`

Install a runtime package

Install a package. Examples: ripgrep, pip, npm, github/cli.

```bash
dewee packages install <package> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages list`

List installed runtime packages

```bash
dewee packages list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages logs`

Show package install logs when gateway log persistence is available

```bash
dewee packages logs <install-run-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages remove`

Remove a runtime package

**Aliases:** `uninstall`

```bash
dewee packages remove <package> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages runtimes`

Show runtime availability

```bash
dewee packages runtimes [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee packages verify`

Verify a package is present in runtime inventory

```bash
dewee packages verify <package-or-source:name> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

### `dewee pairing`

Manage device pairing (approve, list, revoke)

```bash
dewee pairing
```

#### `dewee pairing approve`

Approve a pairing code (interactive if no code given)

```bash
dewee pairing approve [code]
```

#### `dewee pairing list`

List pending and paired devices

```bash
dewee pairing list
```

#### `dewee pairing revoke`

Revoke a paired device

```bash
dewee pairing revoke <channel> <senderId>
```

### `dewee providers`

Manage LLM providers (requires running gateway)

```bash
dewee providers
```

#### `dewee providers add`

Add a new provider (interactive)

```bash
dewee providers add
```

#### `dewee providers delete`

Delete a provider

```bash
dewee providers delete <id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--force` | `bool` | skip confirmation | `false` |

#### `dewee providers list`

List configured providers

```bash
dewee providers list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--models` | `bool` | also show available models per provider | `false` |

#### `dewee providers update`

Update a provider

```bash
dewee providers update <id>
```

#### `dewee providers verify`

Verify provider connectivity (ping) or a specific model

Without —model: pings the provider (registered + reachable check).
With —model: sends a small chat request to validate the model alias.

```bash
dewee providers verify <id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--model` | `string` | model alias to verify (omit for connectivity ping) | `-` |

### `dewee restore`

Restore system from a backup archive (database + filesystem)

Restores dewee from a .tar.gz backup archive produced by ‘dewee backup’.

WARNING: This is a destructive operation. The database will be overwritten.
Requires —force flag to proceed. Stop the gateway before restoring.

Use —list-s3 to list available S3 backups.
Use —from-s3 \<key> to download and restore from S3.

```bash
dewee restore [archive-path] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--dry-run` | `bool` | inspect archive and show restore plan without executing | `false` |
\| `--force` | `bool` | required: confirm destructive restore operation | `false` |
\| `--from-s3` | `string` | download and restore from this S3 key (e.g. backups/backup-20260409.tar.gz) | `-` |
\| `--list-s3` | `bool` | list available backups in S3 and exit | `false` |
\| `--skip-db` | `bool` | skip database restore (filesystem only) | `false` |
\| `--skip-files` | `bool` | skip filesystem restore (database only) | `false` |

#### `dewee restore smoke`

Restore an archive into disposable targets as a smoke test

Restores a backup archive into explicitly isolated targets.

The smoke command refuses the configured live database, data dir, and workspace
path. It is intended for proving that a backup can be restored before promoting
the archive or resuming replicas after a disaster-recovery drill.

```bash
dewee restore smoke <archive-path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--keep-target` | `bool` | preserve temporary filesystem smoke targets for inspection | `false` |
\| `--skip-db` | `bool` | skip database restore smoke | `false` |
\| `--skip-files` | `bool` | skip filesystem restore smoke | `false` |
\| `--target-data-dir` | `string` | disposable data dir for filesystem restore smoke (default: temp dir) | `-` |
\| `--target-dsn` | `string` | disposable database DSN for database restore smoke | `-` |
\| `--target-workspace` | `string` | disposable workspace dir for filesystem restore smoke (default: temp dir) | `-` |
\| `--verify-secrets` | `bool` | verify encrypted restored secrets with GOCLAW\_ENCRYPTION\_KEY | `false` |

### `dewee sessions`

View and manage chat sessions

```bash
dewee sessions
```

#### `dewee sessions delete`

Delete a session

```bash
dewee sessions delete [key]
```

#### `dewee sessions get`

Get session summary and preview

```bash
dewee sessions get <session-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee sessions history`

Show session message history

```bash
dewee sessions history <session-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--include-tools` | `bool` | include tool messages | `false` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--limit` | `int` | max messages | `50` |

#### `dewee sessions list`

List all sessions

```bash
dewee sessions list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | filter by agent ID | `-` |
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee sessions reset`

Clear session history (keep session)

```bash
dewee sessions reset [key]
```

#### `dewee sessions send`

Send a message into a session via chat.send

```bash
dewee sessions send <session-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent id/key override | `-` |
\| `--json` | `bool` | output as JSON | `false` |
\| `-m`, `--message` | `string` | message content | `-` |

#### `dewee sessions status`

Show live session run status

```bash
dewee sessions status <session-key> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

### `dewee setup`

Configuration wizard — providers, agents, channels

Interactive setup for providers, models, agents, and channels. Requires a running gateway.

```bash
dewee setup
```

### `dewee skills`

List and manage skills

```bash
dewee skills
```

#### `dewee skills access`

Manage skill access mode and effective access

```bash
dewee skills access
```

##### `dewee skills access effective`

Inspect effective access for an agent and user

```bash
dewee skills access effective [skill-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent ID | `-` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--user` | `string` | user ID | `-` |

##### `dewee skills access get`

Show skill access mode and grants

```bash
dewee skills access get [skill-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee skills access set`

Set skill access mode

```bash
dewee skills access set [skill-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--mode` | `string` | access mode: private, internal, public | `-` |

#### `dewee skills activity`

Show recent self-evolution activity for a skill

```bash
dewee skills activity [skill]
```

#### `dewee skills deps`

Scan, check, and install skill dependencies

```bash
dewee skills deps
```

##### `dewee skills deps check`

Check dependency availability

```bash
dewee skills deps check [skill-id-or-path] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee skills deps install`

Install missing dependencies for a managed skill

```bash
dewee skills deps install [skill-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee skills deps scan`

Scan dependency declarations

```bash
dewee skills deps scan [skill-id-or-path] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

##### `dewee skills deps status`

Show dependency status

```bash
dewee skills deps status [skill-id-or-path] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee skills evolve`

Manage per-skill self-evolution settings

```bash
dewee skills evolve
```

##### `dewee skills evolve disable`

disable self-evolution for a skill

```bash
dewee skills evolve disable [skill]
```

##### `dewee skills evolve enable`

enable self-evolution for a skill

```bash
dewee skills evolve enable [skill]
```

##### `dewee skills evolve mode`

Set self-evolution mode for a skill

```bash
dewee skills evolve mode [skill] [suggest_only|auto_analyze]
```

##### `dewee skills evolve status`

Show self-evolution settings for a skill

```bash
dewee skills evolve status [skill]
```

#### `dewee skills export`

Export a skill archive (ZIP or tar.gz) from the gateway

Download and export a skill as an archive package (ZIP or tar.gz) from the
gateway. If —output is not specified, saves to the filename specified in the response or \<slug>.\<format>.

**Aliases:** `download`

```bash
dewee skills export <id-or-slug> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `-f`, `--format` | `string` | archive format: zip or tar.gz | `zip` |
\| `--json` | `bool` | emit JSON summary on success | `false` |
\| `-o`, `--output` | `string` | output file path | `-` |

#### Examples

```bash
dewee skills export my-skill
  dewee skills export my-skill --format zip
  dewee skills export 11111111-1111-1111-1111-111111111111 --output ./downloaded.zip
  dewee skills download my-skill
```

#### `dewee skills grant`

Grant skill access

```bash
dewee skills grant
```

##### `dewee skills grant agent`

Grant a skill to an agent

```bash
dewee skills grant agent [skill-id] [agent-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--can-manage` | `bool` | grant manage permission | `false` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--pinned-version` | `int` | pin a specific skill version | `0` |

##### `dewee skills grant user`

Grant a skill to a user

```bash
dewee skills grant user [skill-id] [user-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee skills list`

List all available skills

```bash
dewee skills list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent ID to list skills for (uses gateway API) | `-` |
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee skills metrics`

Show recorded usage metrics for a skill

```bash
dewee skills metrics [skill] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee skills promote`

Promote an installed external skill (agents-personal source) into Dashboard Custom Skills

Resolve \<slug> against the local skill loader; if it comes from the
agents-personal source (\~/.agents/skills/\<slug>/), package and upload it.
Refuses to promote skills coming from other tiers (workspace, agents-project,
managed, builtin) — for those, use “dewee skills upload \<dir>” with the
explicit path.

```bash
dewee skills promote <slug> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--dry-run` | `bool` | inspect the package plan without contacting the gateway | `false` |
\| `--json` | `bool` | emit machine-readable JSON output | `false` |

#### Examples

```bash
dewee skills promote hyperframes
  dewee skills promote hyperframes --dry-run
```

#### `dewee skills revoke`

Revoke skill access

```bash
dewee skills revoke
```

##### `dewee skills revoke agent`

Revoke a skill from an agent

```bash
dewee skills revoke agent [skill-id] [agent-id]
```

##### `dewee skills revoke user`

Revoke a skill from a user

```bash
dewee skills revoke user [skill-id] [user-id]
```

#### `dewee skills show`

Show details and content of a skill

```bash
dewee skills show [name]
```

#### `dewee skills suggestions`

Manage skill improvement suggestions

```bash
dewee skills suggestions
```

##### `dewee skills suggestions apply`

Apply an approved skill improvement suggestion

```bash
dewee skills suggestions apply [skill] [suggestion-id] [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--approve` | `bool` | approve pending suggestion before applying | `false` |

##### `dewee skills suggestions approve`

approve a skill improvement suggestion

```bash
dewee skills suggestions approve [skill] [suggestion-id]
```

##### `dewee skills suggestions list`

List suggestions for a skill

```bash
dewee skills suggestions list [skill]
```

##### `dewee skills suggestions reject`

reject a skill improvement suggestion

```bash
dewee skills suggestions reject [skill] [suggestion-id]
```

#### `dewee skills upload`

Package a local skill directory or upload an existing skill ZIP into Dashboard Custom Skills

Package a single skill directory (root SKILL.md plus references/, scripts/,
assets/, and any other regular files) or upload an existing skill ZIP archive directly to
POST /v1/skills/upload so the skill appears under the Dashboard Skills → Custom
tab. Uses the shared —server and bearer-token model; bearer tokens are
redacted in all errors.

```bash
dewee skills upload <dir-or-zip> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--dry-run` | `bool` | inspect the package plan without contacting the gateway | `false` |
\| `--json` | `bool` | emit machine-readable JSON output | `false` |

#### Examples

```bash
dewee skills upload ~/.agents/skills/hyperframes
  dewee skills upload ./my-skill.zip
  dewee skills upload ~/.agents/skills/hyperframes --dry-run
  dewee skills upload ~/.agents/skills/hyperframes --server https://dewee.example.com
```

### `dewee tenant-backup`

Create a tenant-scoped backup (database rows + filesystem)

Exports all DB rows belonging to a tenant + workspace/data dirs as a .tar.gz archive.

```bash
dewee tenant-backup [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `-o`, `--output` | `string` | output path for .tar.gz | `-` |
\| `--tenant` | `string` | tenant slug to back up | `-` |
\| `--tenant-id` | `string` | tenant UUID (alternative to —tenant) | `-` |
\| `--upload-s3` | `bool` | upload backup to S3 after creation | `false` |

### `dewee tenant-restore`

Restore a tenant from a backup archive

Restores a tenant from a .tar.gz archive produced by ‘dewee tenant-backup’.

Modes:
upsert   (default) — INSERT … ON CONFLICT DO NOTHING. Non-destructive.
Requires —tenant or —tenant-id.
replace            — Wipes tenant-scoped data (keeps tenant metadata), then INSERT.
Requires —tenant or —tenant-id AND —force.
new                — Creates a new tenant from archive metadata.
Requires —new-tenant-slug. Archive’s tenant\_id is remapped
to the new tenant. Users, API keys, LLM providers, and all
other tenant-scoped data are cloned from the archive.

```bash
dewee tenant-restore <archive-path> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--dry-run` | `bool` | inspect archive without making changes | `false` |
\| `--force` | `bool` | required for replace mode | `false` |
\| `--mode` | `string` | restore mode: upsert, replace, new | `upsert` |
\| `--new-tenant-slug` | `string` | slug for the new tenant (required for mode=new) | `-` |
\| `--tenant` | `string` | target tenant slug (for mode=upsert|replace) | `-` |
\| `--tenant-id` | `string` | target tenant UUID (for mode=upsert|replace, alternative to —tenant) | `-` |

### `dewee tenant-transfer`

Preview, copy, or move resources between tenants (Standard/PostgreSQL)

Remote HTTP client for tenant resource transfer.

Authentication uses —token / DEWEE\_API\_KEY / GOCLAW\_GATEWAY\_TOKEN and
—server / DEWEE\_SERVER / GOCLAW\_GATEWAY\_URL.

Subcommands:
inventory List transferable source-tenant roots
preview   Create an exact durable preview
copy      Preview then execute a copy (SSE)
move      Preview then execute a move (SSE)
status    Fetch operation status/result

```bash
dewee tenant-transfer
```

#### `dewee tenant-transfer copy`

Execute a tenant resource copy

```bash
dewee tenant-transfer copy [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--destination` | `string` | destination tenant UUID (when creating preview) | `-` |
\| `--id` | `stringSlice` | resource UUID (repeatable) | `[]` |
\| `--idempotency-key` | `string` | actor-scoped idempotency key | `-` |
\| `--include-knowledge` | `bool` | include agent knowledge | `false` |
\| `--include-memories` | `bool` | include agent memories | `false` |
\| `--json` | `bool` | print JSON | `false` |
\| `--kind` | `stringSlice` | resource kind (repeatable) | `[]` |
\| `--preview-id` | `string` | existing preview ID (skip auto-preview) | `-` |
\| `--source` | `string` | source tenant UUID (when creating preview) | `-` |

#### `dewee tenant-transfer inventory`

List transferable resources in a source tenant

```bash
dewee tenant-transfer inventory [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | print raw JSON | `false` |
\| `--source` | `string` | source tenant UUID | `-` |

#### `dewee tenant-transfer move`

Execute a tenant resource move

```bash
dewee tenant-transfer move [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--destination` | `string` | destination tenant UUID (when creating preview) | `-` |
\| `--id` | `stringSlice` | resource UUID (repeatable) | `[]` |
\| `--idempotency-key` | `string` | actor-scoped idempotency key | `-` |
\| `--include-knowledge` | `bool` | include agent knowledge | `false` |
\| `--include-memories` | `bool` | include agent memories | `false` |
\| `--json` | `bool` | print JSON | `false` |
\| `--kind` | `stringSlice` | resource kind (repeatable) | `[]` |
\| `--preview-id` | `string` | existing preview ID (skip auto-preview) | `-` |
\| `--source` | `string` | source tenant UUID (when creating preview) | `-` |

#### `dewee tenant-transfer preview`

Create a durable transfer preview

```bash
dewee tenant-transfer preview [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--destination` | `string` | destination tenant UUID | `-` |
\| `--id` | `stringSlice` | resource UUID (repeatable; pairs with —kind) | `[]` |
\| `--include-knowledge` | `bool` | include agent knowledge (agent selections) | `false` |
\| `--include-memories` | `bool` | include agent memories (agent selections) | `false` |
\| `--json` | `bool` | print raw JSON | `false` |
\| `--kind` | `stringSlice` | resource kind (repeatable; pairs with —id) | `[]` |
\| `--mode` | `string` | preview mode (copy|move) | `copy` |
\| `--source` | `string` | source tenant UUID | `-` |

#### `dewee tenant-transfer status`

Fetch transfer operation status

```bash
dewee tenant-transfer status <operation-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | print JSON | `false` |

### `dewee traces`

Inspect gateway traces

```bash
dewee traces
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `-o`, `--output` | `string` | output format (table|json) | `table` |

#### `dewee traces export`

Export a gzipped trace tree

```bash
dewee traces export <trace-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--file` | `string` | write gzip export to file (use - for stdout) | `-` |

#### `dewee traces follow`

Poll trace changes for a session or agent

```bash
dewee traces follow [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by raw channel | `-` |
\| `--include-spans` | `bool` | include spans grouped by trace ID | `false` |
\| `--limit` | `int` | page size, max 200 | `0` |
\| `--parent-trace-id` | `string` | filter by parent trace UUID | `-` |
\| `--run-id` | `string` | filter by run ID | `-` |
\| `--session` | `string` | filter by session key | `-` |
\| `--since` | `string` | RFC3339 lower bound for changed traces | `-` |
\| `--status` | `string` | filter by trace status | `-` |
\| `--tag` | `string` | filter by trace tag | `-` |
\| `--task-id` | `string` | filter by metadata task ID | `-` |
\| `--task-type` | `string` | filter by task category tag | `-` |
\| `--team-id` | `string` | filter by team UUID | `-` |
\| `--user` | `string` | filter by user ID for admin callers | `-` |

#### `dewee traces get`

Get trace details with spans

```bash
dewee traces get <trace-id>
```

#### `dewee traces list`

List traces

```bash
dewee traces list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | search agent display name or key | `-` |
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by raw channel | `-` |
\| `--channel-query` | `string` | search channel instance labels | `-` |
\| `--from` | `string` | start time lower bound, RFC3339 | `-` |
\| `--has-tool-calls` | `string` | filter true or false | `-` |
\| `--limit` | `int` | page size, max 200 | `0` |
\| `--max-input-tokens` | `int` | maximum input tokens | `0` |
\| `--max-output-tokens` | `int` | maximum output tokens | `0` |
\| `--max-tool-calls` | `int` | maximum tool calls | `0` |
\| `--min-input-tokens` | `int` | minimum input tokens | `0` |
\| `--min-output-tokens` | `int` | minimum output tokens | `0` |
\| `--min-tool-calls` | `int` | minimum tool calls | `0` |
\| `--offset` | `int` | pagination offset | `0` |
\| `--parent-trace-id` | `string` | filter by parent trace UUID | `-` |
\| `-q`, `--query` | `string` | search trace text, IDs, labels, and span previews | `-` |
\| `--run-id` | `string` | filter by run ID | `-` |
\| `--session` | `string` | filter by session key | `-` |
\| `--since` | `string` | alias for —from | `-` |
\| `--status` | `string` | filter by trace status | `-` |
\| `--tag` | `string` | filter by trace tag | `-` |
\| `--task-id` | `string` | filter by metadata task ID | `-` |
\| `--task-type` | `string` | filter by task category tag | `-` |
\| `--team-id` | `string` | filter by team UUID | `-` |
\| `--to` | `string` | start time upper bound, RFC3339 | `-` |
\| `--tool` | `string` | search span tool names | `-` |
\| `--until` | `string` | alias for —to | `-` |
\| `--user` | `string` | filter by user ID for admin callers | `-` |

#### `dewee traces timeline`

Show the run timeline linked to a trace

```bash
dewee traces timeline <trace-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--limit` | `int` | page size, max 500 | `0` |
\| `--offset` | `int` | pagination offset | `0` |

### `dewee tts`

Inspect TTS provider capabilities, list voices, and test connections

Inspect TTS provider capabilities, list voices, and test provider
connections against the Gateway’s existing TTS endpoints.

Authentication uses —token or these environment variables:
GOCLAW\_GATEWAY\_TOKEN   bearer token for operator API calls
GOCLAW\_GATEWAY\_URL     gateway base URL
GOCLAW\_SERVER          gateway base URL alias

```bash
dewee tts
```

#### `dewee tts list-providers`

List TTS providers and their capabilities

```bash
dewee tts list-providers [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |

#### `dewee tts test`

Test a TTS provider connection

Test a TTS provider connection via POST /v1/tts/test-connection.

Omit —api-key to test the tenant’s previously saved provider configuration
via the server’s fallback. The API key value is never echoed back or logged
by the CLI.

```bash
dewee tts test [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--api-base` | `string` | override API base URL | `-` |
\| `--api-key` | `string` | API key to test with (omit to reuse the saved provider config; never echoed) | `-` |
\| `--group-id` | `string` | group ID (MiniMax) | `-` |
\| `--json` | `bool` | output as JSON | `false` |
\| `--model-id` | `string` | model ID to test with | `-` |
\| `--provider` | `string` | TTS provider to test (required) | `-` |
\| `--timeout-ms` | `int` | request timeout in milliseconds | `0` |
\| `--voice-id` | `string` | voice ID to test with | `-` |

#### `dewee tts voices`

List TTS voices

List available TTS voices via GET /v1/voices.

Use —refresh to force a live upstream refresh via POST /v1/voices/refresh
(requires an admin-scoped token) before listing. This is required, not just
faster, when switching —provider: GET /v1/voices serves a tenant-wide voice
cache that is not keyed by provider, so a plain listing right after switching
providers can silently return stale voices from the previous provider.

—provider is passed through unvalidated: the server currently supports
“elevenlabs” (default) and “minimax” for live voice listing, which can
differ from the broader set of providers in “dewee tts list-providers”.

```bash
dewee tts voices [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `--provider` | `string` | TTS provider (optional; server defaults to elevenlabs) | `-` |
\| `--refresh` | `bool` | force a live refresh (POST /v1/voices/refresh) instead of GET /v1/voices; use when switching providers | `false` |

### `dewee upgrade`

Upgrade database schema and run data migrations

Applies pending SQL migrations and Go-based data hooks. Safe to run multiple times (idempotent).

```bash
dewee upgrade [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--dry-run` | `bool` | show what would be done without applying changes | `false` |
\| `--status` | `bool` | show current upgrade status | `false` |

### `dewee usage`

Inspect token usage and cost metrics

```bash
dewee usage
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `-o`, `--output` | `string` | output format (table|json) | `table` |

#### `dewee usage events`

Inspect raw usage-event analytics (tool calls, skill activations, MCP tool calls)

```bash
dewee usage events
```

##### `dewee usage events list`

List cost/token usage events broken down by resource, event type, or another dimension

```bash
dewee usage events list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by channel | `-` |
\| `--event-type` | `string` | filter by event type (tool\_call, skill\_activation, mcp\_tool\_call, runtime\_tool\_call) | `-` |
\| `--from` | `string` | start time, RFC3339 (default: 24h ago) | `-` |
\| `--group-by` | `string` | grouping dimension: resource\_name (default), event\_type, resource\_type, source, status, agent, channel, provider, or model | `-` |
\| `--limit` | `int` | max rows to return (1-100, default 25) | `0` |
\| `--model` | `string` | filter by LLM model | `-` |
\| `--provider` | `string` | filter by LLM provider | `-` |
\| `--resource-name` | `string` | filter by resource name | `-` |
\| `--resource-type` | `string` | filter by resource type (tool, skill, mcp\_tool, runtime\_tool) | `-` |
\| `--since` | `string` | alias for —from | `-` |
\| `--source` | `string` | filter by source (tool\_call, use\_skill, slash-command) | `-` |
\| `--status` | `string` | filter by status | `-` |
\| `--to` | `string` | end time, RFC3339 (default: now) | `-` |
\| `--until` | `string` | alias for —to | `-` |

##### `dewee usage events summary`

Show aggregated cost/token totals from raw usage events

```bash
dewee usage events summary [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by channel | `-` |
\| `--event-type` | `string` | filter by event type (tool\_call, skill\_activation, mcp\_tool\_call, runtime\_tool\_call) | `-` |
\| `--from` | `string` | start time, RFC3339 (default: 24h ago) | `-` |
\| `--model` | `string` | filter by LLM model | `-` |
\| `--provider` | `string` | filter by LLM provider | `-` |
\| `--resource-name` | `string` | filter by resource name | `-` |
\| `--resource-type` | `string` | filter by resource type (tool, skill, mcp\_tool, runtime\_tool) | `-` |
\| `--since` | `string` | alias for —from | `-` |
\| `--source` | `string` | filter by source (tool\_call, use\_skill, slash-command) | `-` |
\| `--status` | `string` | filter by status | `-` |
\| `--to` | `string` | end time, RFC3339 (default: now) | `-` |
\| `--until` | `string` | alias for —to | `-` |

##### `dewee usage events timeseries`

Show cost/token usage events as time-series points

```bash
dewee usage events timeseries [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by channel | `-` |
\| `--event-type` | `string` | filter by event type (tool\_call, skill\_activation, mcp\_tool\_call, runtime\_tool\_call) | `-` |
\| `--from` | `string` | start time, RFC3339 (default: 24h ago) | `-` |
\| `--group-by` | `string` | bucket size: hour (default) or day | `-` |
\| `--model` | `string` | filter by LLM model | `-` |
\| `--provider` | `string` | filter by LLM provider | `-` |
\| `--resource-name` | `string` | filter by resource name | `-` |
\| `--resource-type` | `string` | filter by resource type (tool, skill, mcp\_tool, runtime\_tool) | `-` |
\| `--since` | `string` | alias for —from | `-` |
\| `--source` | `string` | filter by source (tool\_call, use\_skill, slash-command) | `-` |
\| `--status` | `string` | filter by status | `-` |
\| `--to` | `string` | end time, RFC3339 (default: now) | `-` |
\| `--until` | `string` | alias for —to | `-` |

#### `dewee usage list`

List token usage and cost broken down by provider, model, channel, or agent

```bash
dewee usage list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by channel | `-` |
\| `--from` | `string` | start time, RFC3339 (default: 24h ago) | `-` |
\| `--group-by` | `string` | grouping dimension: provider (default), model, channel, or agent | `-` |
\| `--model` | `string` | filter by LLM model | `-` |
\| `--provider` | `string` | filter by LLM provider | `-` |
\| `--since` | `string` | alias for —from | `-` |
\| `--to` | `string` | end time, RFC3339 (default: now) | `-` |
\| `--until` | `string` | alias for —to | `-` |

#### `dewee usage summary`

Show token usage and cost totals for a period, compared to the previous period

```bash
dewee usage summary [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by channel | `-` |
\| `--model` | `string` | filter by LLM model | `-` |
\| `--period` | `string` | comparison window: 24h, today, 7d, or 30d | `24h` |
\| `--provider` | `string` | filter by LLM provider | `-` |

#### `dewee usage timeseries`

Show token usage and cost as time-series points

```bash
dewee usage timeseries [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent-id` | `string` | filter by agent UUID | `-` |
\| `--channel` | `string` | filter by channel | `-` |
\| `--from` | `string` | start time, RFC3339 (default: 24h ago) | `-` |
\| `--group-by` | `string` | bucket size: hour (default) or day | `-` |
\| `--model` | `string` | filter by LLM model | `-` |
\| `--provider` | `string` | filter by LLM provider | `-` |
\| `--since` | `string` | alias for —from | `-` |
\| `--to` | `string` | end time, RFC3339 (default: now) | `-` |
\| `--until` | `string` | alias for —to | `-` |

### `dewee vault`

Inspect and manage Knowledge Vault documents

```bash
dewee vault
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--json` | `bool` | output as JSON | `false` |
\| `-o`, `--output` | `string` | output format (table|json) | `table` |

#### `dewee vault enrichment`

Inspect or stop vault enrichment

```bash
dewee vault enrichment
```

##### `dewee vault enrichment status`

Show vault enrichment status

```bash
dewee vault enrichment status
```

##### `dewee vault enrichment stop`

Stop vault enrichment

```bash
dewee vault enrichment stop --yes [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--yes` | `bool` | confirm stop | `false` |

#### `dewee vault get`

Get one vault document

```bash
dewee vault get <doc-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID for per-agent route | `-` |

#### `dewee vault graph`

Show vault relationship graph

```bash
dewee vault graph [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID filter | `-` |
\| `--limit` | `int` | maximum nodes | `2000` |
\| `--team` | `string` | team UUID filter | `-` |

#### `dewee vault link`

Manage vault document links

```bash
dewee vault link
```

##### `dewee vault link create`

Create a vault document link

```bash
dewee vault link create --from <doc-id> --to <doc-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID for per-agent route | `-` |
\| `--context` | `string` | link context | `-` |
\| `--from` | `string` | source document ID | `-` |
\| `--to` | `string` | target document ID | `-` |
\| `--type` | `string` | link type | `-` |

##### `dewee vault link delete`

Delete a vault document link

```bash
dewee vault link delete <link-id> --yes [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID for per-agent route | `-` |
\| `--yes` | `bool` | confirm deletion | `false` |

#### `dewee vault links`

Show vault document links

```bash
dewee vault links <doc-id> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID for per-agent route | `-` |

#### `dewee vault list`

List vault documents

```bash
dewee vault list [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID filter | `-` |
\| `--limit` | `int` | page size | `20` |
\| `--offset` | `int` | pagination offset | `0` |
\| `--scope` | `string` | scope filter | `-` |
\| `--team` | `string` | team UUID filter | `-` |
\| `--type` | `string` | comma-separated document types | `-` |

#### `dewee vault rescan`

Rescan workspace files into the vault

```bash
dewee vault rescan
```

#### `dewee vault search`

Search vault documents

```bash
dewee vault search --query <query> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID for scoped search | `-` |
\| `--limit` | `int` | maximum results | `10` |
\| `--query` | `string` | search query | `-` |
\| `--scope` | `string` | scope filter | `-` |
\| `--team` | `string` | team UUID filter | `-` |
\| `--types` | `string` | comma-separated document types | `-` |

#### `dewee vault tree`

List vault tree entries

```bash
dewee vault tree [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID filter | `-` |
\| `--path` | `string` | path prefix | `-` |
\| `--scope` | `string` | scope filter | `-` |
\| `--team` | `string` | team UUID filter | `-` |
\| `--types` | `string` | comma-separated document types | `-` |

#### `dewee vault upload`

Upload a file into the vault

```bash
dewee vault upload --file <file> [flags]
```

#### Flags

\| Flag | Type | Description | Default |
\|---|---|---|---|
\| `--agent` | `string` | agent UUID target | `-` |
\| `--file` | `string` | file to upload | `-` |
\| `--team` | `string` | team UUID target | `-` |

### `dewee version`

Print version information

```bash
dewee version
```
