Reference

CLI

@trydock/cli is a thin wrapper over the REST API. No install step. Run it straight with npx.

Install

Run without installing (recommended for agents)bash
npx -y @trydock/cli init

Skipping 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.

Or install globally (if you have a non-root npm prefix)bash
npm install -g @trydock/cli
dock init

Auth & 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/abc123

The 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 welcome

Commands

Auth

dock init [name] [--ref <code|url>]
Sign in via OAuth browser flow + create your first workspace. Pass --ref with a friend's referral code (or full https://trydock.ai/invite/<code> URL) to sign up against the invite-only beta gate.
Example
dock init --ref abc123
dock login [--ref <code|url>]
Sign in only (no workspace creation). Same --ref flag as init.
Example
dock login --ref https://trydock.ai/invite/abc123
dock logout
Clear the saved token from ~/.dock/config.json.
dock whoami
Print the authenticated user + org.
dock sessions logout-all
Sign out of every active session for the account.

Workspaces

dock list
List every workspace you can access.
Example
dock list
dock new <name> [--doc]
Create a new workspace. Seeds one starting surface (table by default, --doc to seed a doc instead). A workspace can hold any combination of doc and table surfaces, one or many of either; add more later via the dashboard or `create_surface` over the API.
Example
dock new research-queue
dock open <slug>
Open a workspace in your default browser.
dock rename <slug> <new-name>
Rename a workspace.
Example
dock rename old-q4 q4-launch
dock visibility <slug> <private|org|unlisted|public>
Change a workspace's sharing scope.
dock delete <slug>
Delete a workspace. Confirms before destroying.
dock share <slug> <email> [role]
Invite a collaborator (role defaults to editor).
Example
dock share q4-launch mike@vector.build editor
dock members <slug>
List members + pending invites.
dock columns <slug>
List a workspace's columns.

Rows

dock rows <slug>
Print the latest rows. Default limit: 50.
Example
dock rows content-pipeline
dock add <slug> key=val ...
Append a row from key=value pairs.
Example
dock add content-pipeline title="First" status="drafted"
dock get <slug> <row-id>
Print the data of a single row.
dock set <slug> <row-id> key=val ...
PATCH update fields on an existing row.
dock remove <slug> <row-id>
Delete a row.
dock history <slug> <row-id>
Recent change events for one row.

Doc-mode workspaces

dock doc <slug>
Print the rich-text doc body as ProseMirror JSON.

Agent-to-agent transport (scp for docs)

dock push <name> [--workspace <slug>] [--from <file>]
Drop a doc into Dock for another agent to pull. Reads from stdin, ./<name>, or --from=<file>. Auto-creates the 'handoff' workspace and a doc surface named after <name> on first push. Subsequent pushes of the same name overwrite the same surface.
Example
echo "agent-1 said: ..." | dock push report.md
dock pull <name> [--workspace <slug>] [--prompt <text>]
Read the doc body to stdout (markdown). With --prompt, prefix the output with the prompt + a blank line so it pipes cleanly into your local agent.
Example
dock pull report.md --prompt="summarize across agents" | claude

Webhooks (one endpoint per org)

dock webhook list
List every webhook the org owns.
Example
dock webhook list
dock webhook add --url <url> [--events ...]
Create an org-scoped webhook. Events default to row.created/updated/deleted; comma-separate to override.
Example
dock webhook add --url https://hooks.example.com/dock --events "row.updated,workspace.renamed"
dock webhook pause <id>
Stop sending events to this endpoint.
dock webhook resume <id>
Restart a paused endpoint.
dock webhook rm <id>
Delete the endpoint.
dock webhook deliveries <id>
Show the most recent delivery attempts (status code + last error).

API keys

dock keys
List the keys on your account.
dock key new --name <n> [--workspace <slug>]
Mint a key. Token is returned once, then never again.
Example
dock key new --name "Argus prod"
dock key revoke <id>
Revoke a key immediately.

Profile / Org

dock profile
Show profile info.
dock profile set --name <name>
Update your display name.
dock org
Show org settings.
dock org set --name <name> [--visibility private|org]
Update org name or default workspace visibility.

Billing

dock billing
Show plan + current usage.
dock billing upgrade <pro|scale> [--annual]
Mint a Stripe checkout URL and open it.
dock billing downgrade
Schedule a downgrade to Free at the next renewal.
dock billing portal
Open Stripe's customer portal.

Support

dock support
List your org's support tickets, newest first.
Example
dock support
dock support new --kind <...> --title "..." --body "..."
File a ticket from the terminal. Mirrors to GitHub in try-dock-ai/support.
Example
dock support new --kind bug --title "Row 409 on retry" --body "Steps..."
dock support show <id>
Fetch one ticket by id.

Referrals

dock referrals
Your code, signup count, activation count, and earned Scale months.
dock referrals link
Print your shareable invite URL (prints only the URL so you can pipe/copy).
Example
dock referrals link | pbcopy

Data

dock export [--out FILE]
GDPR JSON bundle of profile + workspaces + rows + comments + agents + webhooks. Streams to stdout unless --out is set.

Common

dock help
Print the top-level command list.
dock --json
Machine-readable output. Works on every command.

Piping 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