These docs are outdated. This section is no longer maintained. Current guides live in the Help Center.
Reference

CLI

@trydock/cli signs you in and acts as you from the shell. Message your Chief of Staff and teammates, and manage your workspaces, with exactly the permissions you already have in the web app.

Install

Install globallybash
npm i -g @trydock/cli

Or run it without installing: npx @trydock/cli. Requires Node 20 or newer.

Quick start

dock login                                # sign in as yourself
dock whoami                               # confirm who you are + your org
dock chat cass@jane "summarize my day"    # send, then wait for the reply
dock ws create "Launch plan" --doc
dock status                               # org + your agents

Signing in

dock login prints a short code and opens your browser to approve it. You approve as the human already signed in to Dock, and the CLI polls until you do. Nothing is typed into the terminal, and the terminal never sees your password.

The credential it receives is stored in your operating system keychain(macOS Keychain, Windows Credential Vault, or libsecret via keytar), not in a file in your home directory. Dock's servers store only a SHA-256 hash of it, never the plaintext, and the token expires after 90 days.

Point the CLI at another environment with DOCK_URL. It defaults to https://app.trydock.ai.

First-run walkthrough

$ dock login

To sign in, open this URL and confirm the code:

  https://app.trydock.ai/cli/authorize?code=HJKL-4821

  code:  HJKL-4821

Waiting for approval in your browser…  (Ctrl-C to cancel)
✓ Signed in as jane@vector.build (Vector Apps)
✓ Credential saved to your keychain

$ dock whoami
jane@vector.build · Vector Apps · owner

Addressing your agents

Teammates are addressed agent@you, the same handle Dock shows in the app. If your handle is jane and your Chief of Staff is Cass, that is cass@jane.

chat waits for the reply and prints it. msg sends and returns, printing the message id. The difference matters in a script: chat blocks for as long as the agent takes to answer.

Commands

Auth

dock login
Sign in as yourself. Prints a short code and opens your browser to approve it, then stores the credential in your OS keychain. No password is typed into the terminal.
Example
dock login
dock logout
Sign out and revoke this machine's credential. Other machines you have signed in from are unaffected.
dock whoami
Print the signed-in human, the org, and your role in it.
Example
dock whoami

Talk to your agents

dock chat <agent@you> "<text>"
Send a message and wait for the reply, then print it. Use this when you want the answer in your terminal.
Example
dock chat cass@jane "summarize my day"
dock msg <agent@you> "<text>"
Send and return immediately, printing the message id. Use this when you do not want to block, for example from a script.
Example
dock msg cass@jane "ship it"

Workspaces

dock ws list [--archived]
List the workspaces you can reach. Archived ones are hidden unless you ask for them.
Example
dock ws list
dock ws create <name> [--doc|--table]
Create a workspace and seed its first surface. A workspace can hold any mix of docs and tables; this just picks what it starts with.
Example
dock ws create "Launch plan" --doc

Docs and rows

dock doc append <workspace> "<markdown>"
Append a section to a workspace doc. Markdown in, so headings and lists come out as real structure rather than a wall of text.
Example
dock doc append launch-plan "## Risks\n- Vendor lead time"
dock row add <workspace> '<json>' [--create-columns]
Append a row from a JSON object. Without --create-columns, a key that has no matching column is an error rather than a silently dropped field.
Example
dock row add leads '{"name":"Acme","stage":"new"}'

Status

dock status
Your org and your agents, with which are live and which are sleeping.
Example
dock status

Global

dock --help, -h
Print the command list. Works on its own or after a command.
dock --version, -v
Print the installed version.

Driving Dock from another tool

This is the part worth understanding. Anything that can run a shell command can now use Dock as you: Claude Code, Claude Desktop, a Makefile, a git hook, a cron entry on your own machine. There is nothing to integrate. The tool runs dock, and dock is already signed in as you.

What that looks like in practicebash
# From inside a coding agent, mid-task
dock msg cass@jane "deploy is green, staging is on 4273fa5"

# Ask a teammate something and use the answer
dock chat wren@jane "one line: what did we learn from the beta cohort?"

# Write a build summary into a real workspace doc
dock doc append launch-plan "## $(date +%F)

- CI green, staging deployed
- Two flaky tests quarantined"

No agent key, no MCP server to stand up, no separate identity to grant permissions to. The tool inherits exactly what you can already do in Dock, which is what makes this safe to reach for and also what to keep in mind: it is your account acting, so anything it writes is attributed to you.

The practical consequence is worth stating plainly. Your credential lives in your keychain, so any process running as your user on that machine can invoke dock and act as you, without a further prompt. That is the same trust boundary as your shell history or your SSH agent, and the same remedy applies: it is per machine. dock logout revokes that machine alone, and if you no longer have the machine to hand you can revoke it from Dock Settings instead.

Security

The CLI authenticates you, the human. It is not an agent, it uses no agent key, and it grants no capability you do not already have in Dock. It calls the same endpoints, through the same authorization and tenant isolation, as the web client.

  • Your credential lives in the OS keychain, never a plaintext file. The server stores only a hash.
  • Revoke it from Dock → Settings, or with dock logout on the machine itself.
  • Error output is scrubbed before it reaches your terminal, so a token cannot leak through a stack trace or a logged URL.

Exit codes

Stable, so a script can branch on them: 0 success, 1 the command ran and failed (not signed in, or the API rejected it), and 2 you used it wrong (unknown command, missing argument).

Related: Quickstart · REST API

Frequently asked questions

What can I do with the Dock CLI?
Message your agents and manage your workspaces from the terminal: `dock chat` and `dock msg` to talk to a teammate, `dock ws` to list and create workspaces, `dock doc append` and `dock row add` to write into them, and `dock status` for your org at a glance.
Does the CLI act as me, or as an agent?
As you. `dock login` signs in your own human account and every command runs with your permissions, exactly as if you had done it in the web app. It is not an agent, and there is no agent key involved.
Where does the Dock CLI store my credential?
In your operating system keychain: macOS Keychain, Windows Credential Vault, or libsecret on Linux. Not in a dotfile. The server keeps only a hash of it.
How do I revoke CLI access?
Run `dock logout` on that machine, or revoke it from Dock → Settings if you no longer have the machine to hand. Each machine holds its own credential, so revoking one does not sign out the others.
Do I need the CLI to use Dock?
No. The Mac app and the web app do everything. The CLI is for people who would rather stay in the terminal for a quick message or a scripted write.
How do I point the CLI at a different environment?
Set `DOCK_URL`. It defaults to https://app.trydock.ai.
How do I see all available Dock CLI commands?
`dock --help` lists everything, and `--help` works after a command too. This page is the full reference.
Can I use the Dock CLI in a script?
Yes. Exit codes are stable: 0 success, 1 the command failed, 2 you used it wrong. Use `dock msg` rather than `dock chat` when you do not want to block waiting for a reply.
Does the Dock CLI work offline?
No. Every command talks to Dock live, so a command fails with a connection error if your network is down.
What version of Node does the Dock CLI need?
Node 20 or newer. Check yours with `node --version` and the CLI's with `dock --version`.
Updated