Skip to main content

4. Install the CLI

The kleio binary is the same executable for the CLI and the MCP server (more on the MCP side in the next page). Pick whichever install path matches your platform; they all produce the same binary.

Install

macOS / Linux (script)

curl -fsSL https://raw.githubusercontent.com/kleio-build/kleio-cli/main/install.sh | sh

Windows (PowerShell)

irm https://raw.githubusercontent.com/kleio-build/kleio-cli/main/install.ps1 | iex

Homebrew (macOS / Linux)

brew install kleio-build/tap/kleio

Scoop (Windows)

scoop bucket add kleio https://github.com/kleio-build/scoop-bucket
scoop install kleio

APT / RPM / Go install

See the kleio-cli README for .deb, .rpm, and go install paths.

Verify the install

kleio --version

You should see a version like kleio version 0.x.y. If kleio is not found, restart your shell so the install path is on $PATH.

Log in

kleio login

This opens a browser, completes the OAuth handshake against Kleio, and writes credentials to ~/.kleio/environments/production.yaml. If you have access to multiple workspaces you'll be prompted to pick one as the default; you can change it later with kleio workspace select.

Workspace resolution

When you run a kleio command from inside a git repo, the CLI picks the workspace using this order (first match wins):

  1. KLEIO_WORKSPACE_ID environment variable (explicit override).
  2. Git remote auto-detection — the GitHub owner of origin is matched against your workspaces.
  3. .kleio/config.yaml walked up from the current directory (workspace_id: "...").
  4. ~/.kleio/config.yaml default set by kleio login or kleio workspace select.

In practice this means: cd into a your-org/repo workspace and captures go to the right place automatically. No flag needed.

Smoke-test the connection

kleio status

kleio status validates your local config, hits the API, confirms authentication, and prints workspace-scoped counts (captures, decisions, checkpoints, backlog items). If everything is green, you're ready.

Capture something real:

kleio capture "billing webhook should retry on 5xx"

Refresh the workspace at app.kleio.build — the capture is there, with the git context (repo, branch, commit) attached automatically.

Done with the CLI baseline

You can now capture from the terminal. To get the full picture — agents capturing decisions and checkpoints automatically as you code — wire up the MCP server in your editor.

5. Editor setup (MCP)