---
title: CLI overview
description: Install the kapten command-line tool and manage projects, environments and deployments from a terminal, CI jobs and coding agents.
sidebar:
  label: Overview
---

`kapten` manages your organization from a terminal: everything you do in the [console](https://app.kapten.io) on projects, environments, applications, jobs, databases, pipelines and clusters, the CLI does too. It also runs in CI jobs, as an [OAuth application](/cli/authentication#run-in-ci), and serves Kapten to [coding agents](/cli/mcp) over MCP.

## Install

**mise**

[mise](https://mise.jdx.dev) checks the release's signed [packslip](https://packslip.dev) manifest before it installs anything, and installs the shell completions of the version in use:

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

`mise up` updates it.

**npm**

With Node.js:

```bash
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>`.

**Homebrew**

On macOS and Linux:

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

`brew upgrade --cask kapten` updates it.

**Archive**

Download the archive for your system from the [releases page](https://github.com/kapten-io/cli/releases): `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](https://cli.github.com):

```bash
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:

```bash
kapten --version
```

Every release is built and signed by the [Release workflow](https://github.com/kapten-io/cli/actions/workflows/release.yml) of the public [kapten-io/cli](https://github.com/kapten-io/cli) repository. Its [releases page](https://github.com/kapten-io/cli/releases) lists the changes of each version.

## First commands

1. **Log in**

    ```bash
    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](/cli/authentication).

2. **List your projects**

    ```bash
    kapten projects list
    ```

3. **List the environments of a project**

    ```bash
    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](/cli/reference) documents every command.

## Shell completion

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

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

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