Skip to content
Keel
Dashboard

CLI installation

Requirements and steps to build and install the Keel CLI from source, verify the version, and fix common installation problems.

Last updated

The Keel CLI signs you in, lets you pick a project and environment, manages secrets, and runs commands with secrets injected.

Requirements#

  • Node.js 20 or newer.
  • A checkout of the Keel repository, with dependencies installed (npm install).
  • A reachable Keel server URL.

The CLI has no runtime dependencies. It has been tested on Windows 11 with Node 22. The macOS and Linux code paths are written but have not been tested.

Build#

From the repository root:

Shell
npm run cli:build

This compiles cli/src to cli/dist. Run it with Node:

Shell
node cli/dist/index.js --help

Put keel on your PATH#

Link the package globally:

Shell
cd cli
npm link

Now keel works from any directory. To remove it later:

Shell
npm unlink -g keel

Verify#

Shell
keel --version

Expected output is the CLI version, currently 0.1.0. keel --help lists the commands:

Text
login              Sign in through your browser
logout             Revoke this machine's session and delete credentials
init               Choose a project and environment for this directory
secrets list       List secret keys (values hidden by default)
secrets set        Create or update secrets
run -- <command>   Run a command with secrets in its environment

Update#

Pull the repository changes and run npm run cli:build again. Your credentials and .keel.json files stay valid.

Troubleshooting#

ProblemFix
tsc: not found or missing typesRun npm install in the repository root, then build again.
keel: command not found after npm linkMake sure npm's global bin directory is on your PATH. npm bin -g or npm prefix -g shows where it is.
Syntax errors on startNode is older than 20. Check node --version.
Changes not picked upRun npm run cli:build again. The link points at cli/dist.

Next steps#

Sign in with CLI authentication.