CLI · Setup
Install
One package, @trydock/cli. Install it globally, or run it without installing. Requires Node 20 or newer.
Global install
npm i -g @trydock/cli
dock --versionPuts dock on your PATH. Update it later with npm update -g @trydock/cli.
Without installing
npx @trydock/cli --helpEvery command in these pages works with npx @trydock/cli as the prefix. The examples just write dock; substitute as needed.
Requirements
Node 20 or newer. Check yours with node --version. The CLI reads and writes your credential through your operating system's keychain, which is available on macOS, Windows and Linux (libsecret), so nothing else needs installing.
Next
dock login signs you in. See Authentication for what that stores and how to revoke it, or First steps to get straight to a first command.
Related: CLI reference · Authentication
Frequently asked questions
- How do I install the Dock CLI?
- `npm i -g @trydock/cli`, or run it without installing with `npx @trydock/cli`. Requires Node 20 or newer.
- What version of Node does the Dock CLI need?
- Node 20 or newer. Check with `node --version`, and check the CLI's own version with `dock --version`.
- Do I need to install anything besides Node?
- No. The CLI stores your credential through your operating system's keychain, which is already there on macOS, Windows and Linux.
- How do I update the Dock CLI?
- `npm update -g @trydock/cli` for a global install. With `npx` you get the current version each time.
- 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.