Reference

CLI

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

Install

Run without installingbash
npx @go-dock/cli init
Or install globallybash
npm install -g @go-dock/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).

First-run walkthrough

$ npx @go-dock/cli init

◐ Opening browser for sign-in...
✓ Authenticated as govind@vector.build (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

dock init
Sign in (OAuth browser flow), create a starter workspace, save the API key.
Example
dock init
dock login
Sign in only (no workspace creation).
Example
dock login
dock logout
Clear the saved token from ~/.dock/config.json.
dock whoami
Print the authenticated user and org.
dock list
List every workspace you have access to.
Example
dock list
dock new
Create a new workspace. Prompts for mode if not provided.
Example
dock new research-queue --mode table
dock open <slug>
Open a workspace in your default browser.
Example
dock open content-pipeline
dock rows <slug>
Print the last N rows as a table. Default limit: 20.
Example
dock rows content-pipeline --limit 50
dock add <slug> key=val ...
Append a row from key=value pairs. Values are strings by default.
Example
dock add content-pipeline title="First" status="drafted"
dock share <slug>
Print the shareable URL + open the Share modal in the browser.
Example
dock share content-pipeline
dock help [command]
Show help for a specific command or the top-level overview.

Piping into scripts

Every command supports --json for machine output:

$ dock list --json | jq '.[] | select(.mode=="table") | .slug'
"content-pipeline"
"research-queue"
"investor-tracker"

$ dock rows content-pipeline --json | jq 'map(select(.data.status=="sealed")) | length'
31

Shell tab completion

Zsh and Bash:

# zsh
dock completion zsh > "${fpath[1]}/_dock"
compinit

# bash
dock completion bash > /etc/bash_completion.d/dock

Source

The CLI is open source at github.com/go-dock/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