CLI · Setup

Install

The Dock CLI runs anywhere Node.js 18+ runs. Three install paths: zero-install via npx, global via package manager, or Homebrew on macOS. Pick whichever fits your workflow.

Without installing anything

Easiest. Works the first time, no global pollution:

npx -y @trydock/cli@latest --help

Every command in this book works with npx -y @trydock/cli as the prefix. We'll just write dock in examples; substitute as needed.

Global install (npm)

npm install -g @trydock/cli
dock --version

Now dock is on your PATH. Updates require npm update -g @trydock/cli.

Global install (pnpm / yarn)

# pnpm
pnpm add -g @trydock/cli

# yarn
yarn global add @trydock/cli

macOS, Homebrew

brew install try-dock-ai/tap/dock
dock --version

Auto-updates with brew upgrade.

Windows

npm path works (Node.js for Windows installer ships with npm). For PowerShell users, the dock binary lands at %APPDATA%\npm\dock.cmd. WSL users follow the Linux path.

From source

Open issues against the CLI live at github.com/try-dock-ai/cli. Build locally:

git clone https://github.com/try-dock-ai/cli.git
cd cli
pnpm install
pnpm build
node ./dist/cli.js --help

Verify the install

dock --version
# v0.5.0+

dock --help

What's next

Frequently asked questions

How do I install the Dock CLI?
`npx -y @trydock/cli` runs without installing. Or `npm install -g @trydock/cli` for a global install. Mac/Linux/Windows supported via Node 18+. Bun + Deno also work via their npm-compat layers.
Does the Dock CLI require Node.js?
Yes, Node 18 or newer. Bun is fully supported (`bun x @trydock/cli` or `bunx @trydock/cli`). Native single-binary builds for Mac/Linux/Windows are on the roadmap.
How do I install the Dock CLI without Node?
Native binaries are on the roadmap. Today: install Node first (`brew install node` on Mac, package manager on Linux, official installer on Windows). Or run via Docker: `docker run -it --rm -v $HOME/.dock:/root/.dock node:20 npx -y @trydock/cli`.
How do I update the Dock CLI?
If installed globally: `npm install -g @trydock/cli@latest`. If using npx: just run the next command, npx fetches latest by default. `dock --version` tells you what's currently installed; compare against the latest tag on npm to confirm.
Where is the Dock CLI binary installed?
Globally installed via npm: typically `/usr/local/lib/node_modules/@trydock/cli/bin/dock` (symlinked to `/usr/local/bin/dock`). Via npx: cached in `~/.npm/_npx/<hash>/`. Path resolution via `which dock`.
How do I uninstall the Dock CLI?
If global: `npm uninstall -g @trydock/cli`. To also clear config + session: `rm -rf ~/.dock`. The CLI doesn't write to system paths beyond its install location and `~/.dock`; nothing else to clean up.
Does the Dock CLI work in a Docker container?
Yes. Mount your config (`-v $HOME/.dock:/root/.dock`) or set `DOCK_API_KEY` env var directly. Useful for CI runners and air-gapped agent setups; the CLI is just an HTTP client to Dock's REST API.
Can I install the Dock CLI globally for my whole team?
Each developer installs locally; auth is per-user. For team-wide deployment, ship the install command in your onboarding docs or pre-install in your team's container images. No central license to manage.
Why does the Dock CLI fail to install with permission errors?
Global npm installs need sudo on some systems. Either prefix with `sudo` (`sudo npm install -g @trydock/cli`), or use a Node version manager like `nvm` or `volta` that handles permissions per-user. Or skip global install and use `npx -y @trydock/cli` per-call.
Can I install the Dock CLI via Homebrew?
Homebrew formula on the roadmap. Today: `npm install -g @trydock/cli` is the canonical install. If you have Homebrew Node installed (`brew install node`), the global npm install lands in `/usr/local` cleanly without sudo.
Updated