CLI
@trydock/cli is a thin wrapper over the REST API. No install step. Run it straight with npx.
Install
npx -y @trydock/cli initSkipping npm i -g avoids the sudo prompt on default macOS npm setups (where /usr/localis root-owned). Agents driving the CLI — Claude Code, Cursor, etc. — can't sudo, so npx is the safer install path. Pin a version if you need reproducibility: npx -y @trydock/cli@0.6.0.
npm install -g @trydock/cli
dock initAuth & config
On first run the CLI opens your browser to sign in via OAuth 2.1 + PKCE, then writes ~/.dock/config.json (mode 0600) with your refresh token and active workspace. Env-var overrides: DOCK_API_KEY and DOCK_API_URL (useful for staging).
Signing up with a referral
Dock is invite-only during beta. If a friend sent you a link like trydock.ai/invite/abc123, you can sign up purely from the terminal by passing it to dock init:
# Bare code
npx @trydock/cli init --ref abc123
# Or paste the whole invite URL
npx @trydock/cli init --ref https://trydock.ai/invite/abc123The CLI threads the code into the OAuth handoff. The login page forwards it to the server, where the invite-only gate accepts the new email when the code resolves to a real org. Without --ref, an unknown email is added to the waitlist instead.
First-run walkthrough
$ npx @trydock/cli init
◐ Opening browser for sign-in...
✓ Authenticated as you@example.com (Vector Apps)
✓ Workspace created → trydock.ai/welcome
✓ API key saved to ~/.dock/config.json
Try next:
dock rows welcome
dock add welcome title="My first row"
dock open welcomeCommands
Auth
dock init [name] [--ref <code|url>]dock init --ref abc123dock login [--ref <code|url>]dock login --ref https://trydock.ai/invite/abc123dock logoutdock whoamidock sessions logout-allWorkspaces
dock listdock listdock new <name> [--doc]dock new research-queuedock open <slug>dock rename <slug> <new-name>dock rename old-q4 q4-launchdock visibility <slug> <private|org|unlisted|public>dock delete <slug>dock share <slug> <email> [role]dock share q4-launch mike@vector.build editordock members <slug>dock columns <slug>Rows
dock rows <slug>dock rows content-pipelinedock add <slug> key=val ...dock add content-pipeline title="First" status="drafted"dock get <slug> <row-id>dock set <slug> <row-id> key=val ...dock remove <slug> <row-id>dock history <slug> <row-id>Doc-mode workspaces
dock doc <slug>Agent-to-agent transport (scp for docs)
dock push <name> [--workspace <slug>] [--from <file>]echo "agent-1 said: ..." | dock push report.mddock pull <name> [--workspace <slug>] [--prompt <text>]dock pull report.md --prompt="summarize across agents" | claudeWebhooks (one endpoint per org)
dock webhook listdock webhook listdock webhook add --url <url> [--events ...]dock webhook add --url https://hooks.example.com/dock --events "row.updated,workspace.renamed"dock webhook pause <id>dock webhook resume <id>dock webhook rm <id>dock webhook deliveries <id>API keys
dock keysdock key new --name <n> [--workspace <slug>]dock key new --name "Argus prod"dock key revoke <id>Profile / Org
dock profiledock profile set --name <name>dock orgdock org set --name <name> [--visibility private|org]Billing
dock billingdock billing upgrade <pro|scale> [--annual]dock billing downgradedock billing portalSupport
dock supportdock supportdock support new --kind <...> --title "..." --body "..."dock support new --kind bug --title "Row 409 on retry" --body "Steps..."dock support show <id>Referrals
dock referralsdock referrals linkdock referrals link | pbcopyData
dock export [--out FILE]Common
dock helpdock --jsonPiping into scripts
Every command supports --json for machine output:
$ dock list --json | jq '.workspaces[] | select(.mode=="table") | .slug'
"content-pipeline"
"research-queue"
"investor-tracker"
$ dock rows content-pipeline --json | jq '.rows | map(select(.data.status=="sealed")) | length'
31
$ dock keys --json | jq '.keys[] | select(.revokedAt == null) | .id'Source
The CLI is open source at github.com/try-dock-ai/cli. File issues, send PRs, or just read the code to see exactly what it does before pasting it into your terminal.
Related: Quickstart · REST API