#Install the CLI
The CoDuck CLI ships on npm as @coduckai/cli. It's the same binary used by humans in their terminal and by AI agents calling into CoDuck from their host.
#Requirements
- Node.js 20 or newer (we use modern fetch + native
Setsemantics) - A POSIX shell (
bash/zsh/fish) or PowerShell - macOS, Linux, or Windows
#Global install (recommended)
npm install -g @coduckai/clinpm install -g @coduckai/cliVerify:
coduck --versioncoduck --versionYou should see a JSON line with the current version and the API base URL. If the coduck command isn't found, your npm global bin isn't on $PATH — see Troubleshooting below.
#After installing
Three commands to get going:
coduck login # browser opens, click Approve
coduck create-existing # in your project folder — creates a coduck.json
coduck projects # confirms the account and lists its projectscoduck login # browser opens, click Approve
coduck create-existing # in your project folder — creates a coduck.json
coduck projects # confirms the account and lists its projectsThat's it — you're now operating a CoDuck project from your terminal.
If you are a coding agent, continue by making and testing the requested changes yourself. Then use commands such as coduck push, coduck draft create, coduck changes, and coduck deploy to operate the project. See the commands reference for the full workflow and the intentionally exceptional CoDuck project-agent commands.
#One-off / no global install
npx @coduckai/cli@latest <command>npx @coduckai/cli@latest <command>Useful in CI or on someone else's machine. Slower per invocation because npm has to resolve the package each time.
#Updating
npm install -g @coduckai/cli@latestnpm install -g @coduckai/cli@latestThe CLI does not auto-update. If you want to know what changed between versions, see the changelog on the npm page.
#Uninstall
npm uninstall -g @coduckai/cli
rm -rf ~/.coducknpm uninstall -g @coduckai/cli
rm -rf ~/.coduckThe second command removes your stored credentials and any coduck.json-cached state. (Your remote CoDuck account is untouched. To delete that, sign in to coduck.ai and use account settings.)
#Output modes
The CLI behaves differently depending on whether its stdout is a terminal:
- Interactive (TTY) — pretty tables, colors, spinners, prompts
- Piped (non-TTY) — pure JSON, no colors, no prompts, exit codes carry the meaning
Force machine mode at any time with --json. Force "fail instead of prompting" with --no-input. Both can be combined for use inside agent loops.
coduck projects --json | jq '.[].id'
coduck deploy --no-input --jsoncoduck projects --json | jq '.[].id'
coduck deploy --no-input --json#Troubleshooting
#coduck: command not found
Your npm global bin directory isn't on $PATH. Find it with:
npm config get prefixnpm config get prefixThe binary lives in <prefix>/bin. Add that to your $PATH in your shell config (~/.zshrc, ~/.bashrc, etc.).
#Cannot find module ...node_modules\coduck-cli... on Windows
You have a stale shim from a previous attempted install of a different package name. Run these in Command Prompt:
npm uninstall -g coduck-cli
npm uninstall -g @coduckai/cli
del "%APPDATA%\npm\coduck.cmd"
del "%APPDATA%\npm\coduck.ps1"
del "%APPDATA%\npm\coduck"
npm install -g @coduckai/cli@latestnpm uninstall -g coduck-cli
npm uninstall -g @coduckai/cli
del "%APPDATA%\npm\coduck.cmd"
del "%APPDATA%\npm\coduck.ps1"
del "%APPDATA%\npm\coduck"
npm install -g @coduckai/cli@latestThe del commands may say "could not find" for some files — that's fine, keep going. Last command installs fresh.
#EACCES: permission denied during install
You're using a system Node where npm install -g needs sudo. Don't sudo npm install — instead, switch to a user-level Node manager:
- macOS / Linux: nvm or fnm
- Windows: nvm-windows
Then re-run npm install -g @coduckai/cli without sudo.
#EBADENGINE or "unsupported engine"
Your Node version is below 20. Upgrade Node.
#What's installed
The package contains:
bin/coduck.js— the entry point (calls into compiled JS)dist/— compiled TypeScript output (~30 KB)- Runtime deps:
commander,chalk,@inquirer/prompts,cli-table3,ora,form-data
No native modules, no postinstall scripts, no telemetry.
#Next
You're ready to sign in.