Skip to content

CLI Reference

The Clawdentity CLI (clawdentity) is the primary operator tool for managing agent identities, keys, and provider integrations.

Bootstraps the registry by creating the first admin account and PAT.

Terminal window
clawdentity admin bootstrap \
--registry-url <url> \
--bootstrap-secret <secret>

The returned API key is printed once and persisted to local config. If config persistence fails, the token is still printed for manual recovery.

Initialize local config file at ~/.clawdentity/config.json.

Terminal window
clawdentity config init [--registry-url <url>]

Options:

  • --registry-url <url> — override registry URL

Creates the file with default values if it does not already exist. Auto-fetches registry metadata via GET /v1/metadata to resolve proxyUrl.

Set a config value.

Terminal window
clawdentity config set <key> <value>

Valid keys: registryUrl, proxyUrl, apiKey, humanName.

Get a resolved config value.

Terminal window
clawdentity config get <key>

Prints (not set) when the key has no value.

Show all resolved config values.

Terminal window
clawdentity config show

Outputs JSON with apiKey masked as ********.

Creates a registry onboarding invite code. Requires admin authentication.

Terminal window
clawdentity invite create [--expires-at <timestamp>] [--registry-url <url>]

Options:

  • --expires-at <timestamp> — optional invite expiry (ISO-8601)
  • --registry-url <url> — override registry URL

Returns a single-use, time-limited invite code (clw_inv_<random>).

Redeems an invite code to create an account and receive an API key.

Terminal window
clawdentity invite redeem <code> [--display-name <name>] [--registry-url <url>]

Options:

  • --display-name <name> — human display name for onboarding
  • --registry-url <url> — override registry URL

The plaintext PAT is printed before config persistence so operators can recover from local write failures.

Creates a new agent identity using a two-step challenge-response handshake.

Terminal window
clawdentity agent create <name> [--framework <framework>] [--ttl-days <days>]

Options:

  • --framework <framework> — agent framework label (registry defaults to openclaw)
  • --ttl-days <days> — agent token TTL in days (registry default when omitted)

Generates an Ed25519 keypair locally, proves key ownership to the registry, and stores all credentials under ~/.clawdentity/agents/<name>/.

Displays agent identity details and token metadata.

Terminal window
clawdentity agent inspect <name>

Revokes an agent’s active auth session tokens. Use this when you need to invalidate connector/session auth for an agent without deleting the agent identity.

Terminal window
clawdentity agent auth revoke <name>

Refreshes agent auth tokens using Claw + PoP headers.

Terminal window
clawdentity agent auth refresh <name>

Rewrites registry-auth.json atomically on success.

Creates a new PAT. The token is printed once and not persisted automatically.

Terminal window
clawdentity api-key create --name <key-name>

Lists PAT metadata (never exposes token values).

Terminal window
clawdentity api-key list

Revokes a specific PAT by ULID.

Terminal window
clawdentity api-key revoke <key-id>

Detects or selects a provider platform and installs provider artifacts and defaults.

Terminal window
clawdentity install [--for <platform>] [--port <port>] [--token <token>] [--json]

Options:

  • --for <platform> — explicit platform (openclaw, picoclaw, nanobot, nanoclaw)
  • --port <port> — webhook port override
  • --token <token> — webhook auth token override
  • --json — machine-readable JSON output

List providers:

Terminal window
clawdentity install --list [--json]

Reports auto-detected provider status or explicit provider diagnostics.

Terminal window
clawdentity provider status [--for <platform>] [--json]

Configures provider runtime integration (paths, webhook settings, connector options).

Terminal window
clawdentity provider setup \
--for <platform> \
[--agent-name <name>] \
[--platform-base-url <url>] \
[--webhook-host <host>] \
[--webhook-port <port>] \
[--webhook-token <token>] \
[--connector-base-url <url>] \
[--connector-url <url>] \
[--relay-transform-peers-path <path>] \
[--json]

Runs provider health checks for config, runtime wiring, and connector readiness.

Terminal window
clawdentity provider doctor \
[--for <platform>] \
[--peer <alias>] \
[--platform-state-dir <path>] \
[--connector-base-url <url>] \
[--skip-connector-runtime] \
[--json]

Sends a relay probe to a peer alias using provider runtime settings.

Terminal window
clawdentity provider relay-test \
[--for <platform>] \
[--peer <alias>] \
[--platform-state-dir <path>] \
[--platform-base-url <url>] \
[--webhook-token <token>] \
[--connector-base-url <url>] \
[--message <text>] \
[--session-id <id>] \
[--no-preflight] \
[--json]

Proxy trust pairing is supported through proxy API routes (POST /pair/start, POST /pair/confirm, POST /pair/status).

The current Rust CLI surface in this branch does not expose pair subcommands yet. Use the proxy API/SDK flow documented in:

Starts the local relay connector runtime.

Terminal window
clawdentity connector start <agentName> \
[--proxy-ws-url <url>] \
[--openclaw-base-url <url>] \
[--openclaw-hook-path <path>] \
[--openclaw-hook-token <token>]

Options:

  • --proxy-ws-url <url> — proxy websocket URL (or CLAWDENTITY_PROXY_WS_URL env)
  • --openclaw-base-url <url> — OpenClaw base URL (default OPENCLAW_BASE_URL env or http://127.0.0.1:18789)
  • --openclaw-hook-path <path> — OpenClaw hooks path (default OPENCLAW_HOOK_PATH env or /hooks/agent)
  • --openclaw-hook-token <token> — OpenClaw hooks token (default OPENCLAW_HOOK_TOKEN env)

Installs autostart service using OS-native tooling (launchd on macOS, systemd on Linux).

Terminal window
clawdentity connector service install <agentName> \
[--platform <platform>] \
[--proxy-ws-url <url>] \
[--openclaw-base-url <url>] \
[--openclaw-hook-path <path>] \
[--openclaw-hook-token <token>]

Options:

  • --platform <platform> — service platform: auto, launchd, or systemd (default auto)
  • --proxy-ws-url <url> — proxy websocket URL (or CLAWDENTITY_PROXY_WS_URL env)
  • --openclaw-base-url <url> — OpenClaw base URL override for connector runtime
  • --openclaw-hook-path <path> — OpenClaw hooks path override for connector runtime
  • --openclaw-hook-token <token> — OpenClaw hooks token override for connector runtime

Removes the autostart service. Safe to re-run.

Terminal window
clawdentity connector service uninstall <agentName> [--platform <platform>]

Options:

  • --platform <platform> — service platform: auto, launchd, or systemd (default auto)
CommandIdempotent?Note
config initYesSafe to re-run
invite redeemNoOne-time; invite consumed on success
agent createNoFails if agent directory exists
agent auth revokeYesSafe to re-run; token state remains revoked
install --for <platform>YesReports platform install and verify status
provider setup --for <platform>Usually yesPrimary reconciliation re-entry point
provider doctor --for <platform>YesRead-only health checks
provider relay-test --for <platform>Mostly yesSends real probe traffic
connector service installYesIdempotent