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

Set up **23step Open** so every Claude Code prompt, thinking trace, tool call, and browser screenshot is recorded **100% locally on `http://127.0.0.1:8787`** — zero cloud, zero account, zero API key.

Human site: https://open.23step.com/ · All agents: https://open.23step.com/getting-started.md

## 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** point hooks at `api.23step.com`.
- **Ask quick preferences before editing config** (unless the user already stated them):
  1. **Scope:** Install hooks **globally** in `~/.claude/settings.json` (`--global`, recommended) or **in this repository only** in `.claude/settings.json` (`--repo`)?
  2. **Local MCP server (optional):** Also register `23step-local` (`http://127.0.0.1:8787/mcp`) in `~/.claude.json` (or `.mcp.json`) so Claude Code can inspect local replay links?
  3. **23step Overlay desktop HUD (optional, macOS):** Also install `23step Overlay` (`brew install --cask 23step/tap/23step-overlay`)?
  4. **Optional turn flags (off by default):** Opt in to `--step-link` or `--progress-bar`? Both are off by default so turns stay fast and token-lean.
- **No `curl | sh`:** Prefer Homebrew, PyPI (`pip` / `uv`), signed APT/RPM repos, or building from source.
- **Verify before finishing:** Complete **Check that it worked** and report the result plus `http://127.0.0.1:8787`.

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

Check if `23step` is already installed (`command -v 23step && 23step --version`) and supports `23step serve --help`. Otherwise install using the package manager for the user's OS:

macOS / Linux (Homebrew):

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

Linux / macOS / Windows (PyPI):

```sh
pip install 23step
# Or: 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
```

Build from source:

```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 whether `23step serve` is already listening; if not, start it in the background (or run `23step serve --open` in a separate terminal):

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

Data is stored locally in `~/.local/share/23step/local/` (`0700`/`0600`).

## 3. Install Claude Code local hooks

Run from anywhere for a global install, or from the repository root for a repo-only install (add `--step-link` and/or `--progress-bar` only if the user opted in):

```sh
# Global (writes ~/.claude/settings.json + ~/.agents/hooks/step23_otel.py):
23step hooks install --global --local-server claude

# Or repository-only (writes .claude/settings.json + .agents/hooks/step23_otel.py):
23step hooks install --repo --local-server claude
```

Confirm `python3 --version` works in PATH (the embedded hook script uses Python 3 stdlib only).

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

If the user opted in to inspecting local replay links from Claude Code:

```sh
# Global (~/.claude.json):
23step mcp install --global --local claude

# Or repository-only (.mcp.json):
23step mcp install --repo --local claude
```

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

If the user wants the floating live HUD:

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

Open **Settings (`Cmd+,`)** and click **"Use local 23step serve (127.0.0.1:8787)"**.

## Check that it worked

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

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

Restart Claude Code and run `/hooks` to confirm the 23step entries appear (under **User** for global or **Project** for repo). Send a prompt and open **http://127.0.0.1:8787** to view your local replay. Pause any sensitive repo later with `23step pause --repo`.
