Skip to content
Kapten
Esc
↑↓navigate↵open⌘Jpreview
On this page

CLI overview

Install the kapten command-line tool and manage projects, environments and deployments from a terminal, CI jobs and coding agents.

kapten manages your organization from a terminal: everything you do in the console on projects, environments, applications, jobs, databases, pipelines and clusters, the CLI does too. It also runs in CI jobs, as an OAuth application, and serves Kapten to coding agents over MCP.

Install

mise checks the release’s signed packslip manifest before it installs anything, and installs the shell completions of the version in use:

mise use -g packslip:github.com/kapten-io/cli

mise up updates it.

With Node.js:

npm install -g @kapten/cli

npm installs only the package of your platform, and records each release’s provenance. Without installing it, for a CI job or an MCP client: npx -y @kapten/cli@latest <command>.

On macOS and Linux:

brew install --cask kapten-io/tap/kapten

brew upgrade --cask kapten updates it.

Download the archive for your system from the releases page: kapten_<version>_<os>_<arch>.tar.gz for macOS (darwin) and Linux, .zip for Windows, each for amd64 and arm64. Check it against checksums.txt, and check where it was built with the GitHub CLI:

gh attestation verify kapten_<version>_<os>_<arch>.tar.gz --repo kapten-io/cli

Extract it and put both executables, kapten and restish-mcp, in the same directory on your PATH. kapten mcp serve runs restish-mcp from the directory kapten is in.

Check the installation:

kapten --version

Every release is built and signed by the Release workflow of the public kapten-io/cli repository. Its releases page lists the changes of each version.

First commands

Log in

kapten login

The CLI shows a code and opens a page in your browser. Check that the page shows the same code, approve it, and pick an organization. See Authentication.

List your projects

kapten projects list

List the environments of a project

kapten environments list <project-id>

Commands take the IDs of the resources they act on as arguments, in order from the project down.

kapten --help lists the command groups, and kapten <group> --help the commands of a group. The command reference documents every command.

Shell completion

kapten completion <shell> prints a completion script for bash, zsh, fish or powershell. For zsh:

kapten completion zsh > "${fpath[1]}/_kapten"

kapten completion <shell> --help shows how to load it in each shell.

Was this page helpful?