# 23step Open: getting started (100% local)

23step Open records every AI coding agent prompt, thinking trace, tool call, shell command, and browser click/screenshot **100% locally on `127.0.0.1:8787`** under Apache-2.0 — zero cloud, zero account, and zero API key.

Human site: https://open.23step.com/

## Rules for AI agents following this guide

- **Stay 100% local:** Do **not** run `23step login`, do **not** ask for a cloud account or API key, and do **not** configure `api.23step.com` or `app.23step.com`. Everything talks strictly to loopback `http://127.0.0.1:8787`.
- **Ask quick preferences before editing config** (unless the user already answered them):
  1. **Scope:** Install hooks **globally** across all projects on this machine (`--global`, recommended) or **in this repository only** (`--repo`, run from the git repo root)?
  2. **Local MCP server (optional):** Also connect the local `23step-local` MCP server (`http://127.0.0.1:8787/mcp`) via `23step mcp install` so the agent can inspect pasted local run/session links directly?
  3. **23step Overlay desktop HUD (optional, macOS):** Also install the floating Electron HUD (`brew install --cask 23step/tap/23step-overlay`) pointed at `http://127.0.0.1:8787`?
  4. **Optional turn flags (off by default):** Opt in to `--step-link` (post the local replay link at the end of responses) or `--progress-bar` (live widget progress bar)? Both are **off by default** because they use extra tokens and slow down turns.
- **No `curl | sh`:** Install the `23step` CLI via Homebrew, PyPI (`pip` / `uv`), signed Linux APT/RPM repos, GitHub Releases, or `make build` from source. Hook scripts are embedded directly inside the signed `23step` binary.
- **Verify before finishing:** Complete the **Check that it worked** section and report the result plus the local replay UI URL (`http://127.0.0.1:8787`).

## Per-agent Markdown guides

- [Claude Code](https://open.23step.com/getting-started/claude-code.md)
- [Cursor](https://open.23step.com/getting-started/cursor.md)
- [Codex](https://open.23step.com/getting-started/codex.md)
- [Antigravity](https://open.23step.com/getting-started/antigravity.md)
- [Gemini CLI](https://open.23step.com/getting-started/gemini-cli.md)

## 1. Install the `23step` CLI binary

First check whether `23step` is already installed (`command -v 23step && 23step --version`) and supports `23step serve --help`. If not installed (or outdated), pick the method that matches the user's OS:

macOS / Linux (Homebrew):

```sh
brew install 23step/tap/23step
```

Linux / macOS / Windows (PyPI — bundles the native static binary):

```sh
pip install 23step
# Or with uv:
uv tool install 23step
```

Debian / Ubuntu (APT):

```sh
echo "deb [arch=$(dpkg --print-architecture) trusted=yes] https://open.23step.com/apt stable main" | sudo tee /etc/apt/sources.list.d/23step.list >/dev/null
sudo apt-get update && sudo apt-get install -y 23step
```

Fedora / RHEL / Rocky (DNF/RPM):

```sh
sudo curl -fsSL https://open.23step.com/rpm/23step.repo -o /etc/yum.repos.d/23step.repo
sudo dnf install -y 23step
```

Windows:

```powershell
pip install 23step
# Or download 23step_<ver>_windows_amd64.zip / arm64.zip from https://github.com/23Step/23step/releases
```

Build from source (auditable `CGO_ENABLED=0` static build):

```sh
git clone https://github.com/23Step/23step.git
cd 23step
make build
```

## 2. Start the local replay server (`127.0.0.1:8787`)

Check if `23step serve` is already running:

```sh
curl -fsS http://127.0.0.1:8787/health
```

If it is not running yet, start it in the background (so your shell command returns immediately; humans running interactively can use `23step serve --open`):

macOS / Linux:

```sh
nohup 23step serve >/tmp/23step-serve.log 2>&1 &
sleep 1
curl -fsS http://127.0.0.1:8787/health
```

Windows (PowerShell):

```powershell
Start-Process 23step -ArgumentList "serve" -WindowStyle Hidden
Start-Sleep -Seconds 1
Invoke-RestMethod http://127.0.0.1:8787/health
```

Runs are stored privately in `~/.local/share/23step/local/` (`0700` dir / `0600` SQLite WAL + PNGs). Optional retention flags: `--retain 14d --max-disk 2GB`.

## 3. Wire coding-agent hooks to your local server

Install hooks for the agent(s) the user runs (pass `--global` for all projects, or `--repo` from the repository root; append `--step-link` and/or `--progress-bar` only if the user opted in):

```sh
# All major coding agents at once (or pass specific targets):
23step hooks install --global --local-server claude cursor codex gemini antigravity
```

Supported agent targets: `claude` (`claude-code`), `cursor`, `codex`, `antigravity`, `gemini` (`gemini-cli`), `cline`, `openrouter-sdk`, `grokbot`, or `all`.

Verify `python3 --version` works in PATH — the embedded hook scripts use Python 3 stdlib only (zero pip packages).

## 4. Connect the local MCP server (optional)

If the user opted in to local cross-harness MCP context sharing, register `23step-local` (`http://127.0.0.1:8787/mcp`):

```sh
23step mcp install --global --local claude cursor codex gemini antigravity
```

Pass `--repo` for workspace-only config, or `--stdio` if an MCP client only supports stdio transport (`23step mcp-proxy --local`).

## 5. Install the 23step Overlay desktop HUD (optional)

On macOS, if the user wants the always-on floating live HUD:

```sh
brew install --cask 23step/tap/23step-overlay
open -a "23step Overlay"
```

Open **23step Overlay Settings (`Cmd+,`)** and click **"Use local 23step serve (127.0.0.1:8787)"** (loopback connects with zero login).

## 6. Direct Vertex AI / OpenTelemetry SDKs & headless browser clicks (optional)

Point any OTLP-compatible SDK (`google-genai`, OpenLLMetry, OpenInference, Vercel AI SDK) at `http://127.0.0.1:8787`:

```sh
export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:8787"
export OTEL_RESOURCE_ATTRIBUTES="step23.session_id=local-session-1"
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT="SPAN_ONLY"
```

To attach headless Chrome / Playwright click screenshots to the same local session, launch Chromium with `--remote-debugging-address=127.0.0.1 --remote-debugging-port=9222` and run:

```sh
23step start --api http://127.0.0.1:8787 --headless --cdp http://127.0.0.1:9222 --join-session --session local-session-1
```

## Check that it worked

Run:

```sh
curl -fsS http://127.0.0.1:8787/health
23step hooks status --global   # or --repo
23step doctor --offline
```

If you also installed local MCP, run `23step mcp status --global` (or `--repo`).

Restart the coding agent (or open a fresh session) if needed so it reloads the new hook/MCP configs, send a test prompt, and open **http://127.0.0.1:8787** in your browser to see the local replay timeline. Need to exclude a sensitive repo later? Run `23step pause --repo` (creates `.23stepignore`).
