> Keiro Labs API documentation - Unified keiro CLI
> Page: https://docs.keirolabs.ai/keiro.html
> Markdown: https://docs.keirolabs.ai/keiro.md
> Agent index: https://docs.keirolabs.ai/llms.txt
> API base URL: https://api.keirolabs.ai/v1
> Auth: send "Authorization: Bearer <api-key>" with a key created in the
> Keiro console (https://console.keirolabs.ai/api-keys). Use credentials saved by
> `keiro setup`, or resolve the key from a secret manager or an owner-only
> secret file and pass it to the client explicitly. Never read another
> provider's variable, and never put raw key material in environment
> variables, code, docs, or logs.

# Unified `keiro` CLI

One command starts **Claude Code**, **Codex**, **T3 Code**, **OpenCode**, and **Pi** on Keiro `eb1`, with an interactive tool launcher, health checks, and a model catalog.

Plain `claude`, `codex`, `t3`, `opencode`, and `pi` keep their default behavior — Claude Code, T3 Code, OpenCode, and Pi leave default config files untouched, while Codex adds a separate `[model_providers.keiro]` block to `~/.codex/config.toml` without changing your default provider.

## Install

```bash
s="$(curl -fsS 'https://api.keirolabs.ai/v1/install.sh')" && bash -c "$s"
```

This installs `~/.local/bin/keiro`, the credential reader (`~/.local/share/keiro/keiro-auth`), and the terminal UI. If you previously installed the standalone Codex `keiro` launcher, it is moved unchanged to `~/.local/share/keiro/bin/keiro` and continues to work via `keiro codex`.

## Sign in

```bash
keiro login
```

`keiro login` verifies your API key against `https://api.keirolabs.ai/v1/models` and saves it in an owner-only `0600` file at `~/.config/keiro/api-key` (override the location with `KEIRO_KEY_FILE` or `XDG_CONFIG_HOME`).

To sign in non-interactively from a `0600` file:

```bash
keiro login --key-file /absolute/path/to/keiro-api-key
```

`keiro login` stores your Keiro API key in an owner-only `0600` file at `~/.config/keiro/api-key` read on demand by Claude Code, T3 Code, and Pi via `keiro-auth` without exposing your API key in command-line arguments or child process environments. Codex stores its key in your OS credential store (macOS Keychain or Linux Secret Service, or `KEIRO_AUTH_COMMAND`), and OpenCode keeps its own credential file under `~/.local/share/keiro/opencode/credentials/`.

## Start any tool

Run `keiro` with no arguments in a terminal to open the interactive launcher, or start any tool directly:

```bash
keiro claude      # Claude Code on eb1
keiro codex       # Codex on eb1
keiro t3          # T3 Code on eb1
keiro opencode    # OpenCode on eb1
keiro pi          # Pi on eb1
```

On first use, `keiro <tool>` downloads that tool's installer from the gateway, verifies its `X-Content-SHA256` digest, and writes its launcher into `~/.local/share/keiro/bin/`. For CLI tools, arguments after the tool name are forwarded directly (for example, `keiro codex resume --last`); `keiro t3` forwards arguments directly to the `t3` CLI or via `--args` when launching the macOS desktop app.

### T3 Code (`keiro t3`)

`keiro t3` configures `eb1` against the hosted Keiro gateway inside an isolated `T3_HOME` directory (`~/.local/share/keiro/t3/home` by default; override with `KEIRO_T3_HOME`, which must stay separate from `~/.t3`). On macOS, set `KEIRO_T3_APP` if T3 Code is installed outside `/Applications/T3 Code.app`. Your existing `~/.t3/userdata/settings.json` and plain `t3` installation are never modified.

## Status, health checks, and models

```bash
keiro status      # Offline dashboard of tools and credential status
keiro doctor      # Checks directory permissions, credential helper, and /v1/models
keiro models      # Lists available eb1 models and context windows
```

## Update, logout, and uninstall

```bash
keiro update            # Verifies and updates keiro and every installed tool
keiro logout            # Removes ~/.config/keiro/api-key (key stays active until revoked)
keiro uninstall         # Removes every tool setup, shims, helper scripts, and keiro
```

`keiro uninstall` keeps `~/.config/keiro/api-key` unless you run `keiro logout` first. `t3-keiro self uninstall` (and `keiro uninstall`) removes only Keiro-managed T3 Code files and preserves any threads or user data under `T3_HOME`; pass `--purge-data` to `t3-keiro self uninstall` to delete `~/.local/share/keiro/t3` completely.
