caprock

module
v0.78.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0

README

Caprock

Run your coding agents in one window, and see what they are doing.

The desktop app, with demo projects and sessions made up for this picture.

release license CI platform

Caprock is a desktop app for working with Claude Code, Codex and OpenCode across many projects: a terminal for every project, the sessions waiting on you, what each repository costs and how much of your plan is left — and a phone that can pick the work up. Under it runs a local daemon that also serves a browser dashboard; the app bundles it. No account, no cloud, no telemetry.

The desktop app — macOS first, with Windows and Linux builds:

brew install --cask dspv/tap/caprock-app       # macOS (universal)

Or download the newest build directly: macOS .dmg, Windows installer, Linux .AppImage, .deb or .rpm — every version is on Releases. The app is not notarized or code-signed yet; docs/install-app.md has the one-time "Open Anyway" step for the .dmg and SmartScreen's "Run anyway". What is in the window, the shortcuts and the phone: docs/app.md.

Or the daemon and its browser dashboard on their own:

# macOS / Linux
brew install dspv/tap/caprock

# Windows
scoop bucket add dspv https://github.com/dspv/scoop-bucket
scoop install caprock
# winget too, once Microsoft has merged the manifest for a release:
#   winget install dspv.caprock

caprock up        # opens localhost:22776; offers to set up hooks + plan-limit status line

Have Go? go install github.com/dspv/caprock/cmd/caprock@latest — the dashboard is embedded, so it works with no Node build. No package manager? Grab a binary from Releases.

Or let Claude Code install it — paste one prompt into a fresh Claude Code message.

It picks the right command for your machine, so there is nothing to choose. The --yes is load-bearing: consent for the hook is refused rather than assumed when stdin is not a terminal, which is what an agent's shell gives it, so without the flag you would get a dashboard that never sees a session.

The wording was tested against five agents given no other context. An earlier draft was refused outright by one of them, and the two lines it objected to were both ours meaning well: "do not start or type into any claude session" (our Rule 7, which reads as do not tell the user) and "show me the error instead of trying another source" (meant to stop a lookalike package being installed, which reads as stop verifying). Both are gone. It now asks the agent to check whatever it wants and to show you the settings diff — the same scepticism, invited rather than forbidden.

Please install Caprock for me. It is an open-source local dashboard that shows
what my Claude Code sessions are doing and what they cost — Apache-2.0, runs on
my machine: https://github.com/dspv/caprock

  macOS/Linux:  brew install dspv/tap/caprock
  Windows:      scoop bucket add dspv https://github.com/dspv/scoop-bucket
                scoop install caprock

Then run `caprock up --yes`. That flag lets it add its own hook to my Claude
Code settings, which is how it sees sessions live. Show me the change it makes
to ~/.claude/settings.json so I can see it myself.

Check anything you want to check first, and ask me if something does not add
up. When it is running, tell me the URL it prints and stop there.
Coming from the old Python caprock? Remove it first.

There was an earlier, unrelated Caprock on PyPI — a command-line stats tool that read Claude Code usage from a proxy. This one is a Go binary with a dashboard and shares nothing with it: different data, different install, same name. Remove the old one so the two caprock commands don't shadow each other:

pipx uninstall caprock || pip uninstall -y caprock   # whichever you used
rm -rf ~/.caprock                                    # its old data
which caprock                                        # should now print nothing

Then install as above. Nothing is lost: this version reads the transcripts Claude Code already writes, so your whole history appears on first run — no migration, no import. (Only ~/.caprock/savings.jsonl from the old tool is dropped; copy it elsewhere first if you want to keep those numbers.)

On first run `caprock up` asks before adding its hook and status-line entries to `~/.claude/settings.json` (it backs the file up and never touches your other settings). Say no and it still reads your history from transcripts.

Run OpenCode, Codex, DeepSeek Harness or Gemini CLI too? All are shown on the same screens — OpenCode from its own database, Codex and DeepSeek Harness from the transcripts they write, Gemini through the telemetry it writes when Caprock starts it. See OpenCode, Codex and DeepSeek Harness for what that covers and what it does not.

Caprock starts Codex, OpenCode and Gemini CLI sessions too: whichever of them is installed appears next to Claude Code in the New Session dialog — same terminal, same directory picker, its own filter chip — and the dialog remembers the one you picked last. A Codex or OpenCode session started here shows its cost and answers on the same page as its terminal, and one that has ended can be continued with "continue here". "Continue in…" on any session starts a new one in the agent of your choice with a summary you read first — what the agent last said, what changed in the folder, the PRs it opened. For Gemini, install the CLI (npm install -g @google/gemini-cli). With a Gemini key set (see Premium for where), Caprock passes it to the child process. Gemini has no hooks and writes no transcript, but it does write OpenTelemetry, and Caprock asks it to write that to a file it then reads; what you ask it is kept there too, so the Memory screen can find a Gemini session by your question. Starting and watching Gemini sessions is free, like every other agent.

Real capture, 46 seconds. One session working; the bars advance as the minutes roll over and the cost ticks with them.

Live activity and cost, right now

Top: the live pulse — one bar per minute of the last hour, per session, so the shape of a track is the shape of the work. Below: what every session is doing as it happens, and what each repo costs you. Real numbers from a real machine.

Light theme

The same screen in the light theme

It follows your system by default, and the toggle in the header overrides it.

The desktop app

The app opens on your terminals, not on charts. Each project in the sidebar opens to its worktrees and the agent sessions and shells in each, with its branch, today's cost and a dot for what every session is doing; whatever is waiting on you sits at the top. ⌘T opens a shell, ⇧⌘N an agent, ⌘O adds, creates or clones a project. Tabs come back when you reopen it, and closing one never stops its session. An agent's tab switches between its terminal and a chat view of the same conversation.

Outside the window: the menu bar shows your plan limits, today's spend and the sessions waiting for approval; the Dock badge counts them; ⌃⌥⌘C brings the window up from anywhere. When an agent stops on a permission prompt, a macOS notification carries Approve and Deny — Approve only when the notification shows the whole request, so you never answer a command you have not read. Every dashboard screen below is inside it too.

The whole tour is in docs/app.md.

Your numbers, ready to publish

caprock report prints what your captured usage comes to at API list prices, in a form you can paste somewhere. When the total includes Codex, Gemini or DeepSeek turns, the caveat names every vendor whose list was used and the headline stops calling it all Claude Code:

caprock report              # a block for a post
caprock report --markdown   # the same facts as a table
caprock report --json       # machine-readable
$9,704 of Claude Code at API list prices on a $200/month plan — 41.6× the fee.
Priced from captured tokens at Anthropic list prices — what the same work would
have cost through the API. Not a bill, not a discount received, and not money
back: without the plan I would not have run this much.

2026-07-19 → 2026-08-22 · 33 active days
paid $233.33 over that window · same usage at API list $9,704
59,578 turns · 57 sessions · 26 projects
99% cache hit · 89% of input cost cut by cache
15,701,665,082 tokens read from cache · 128,597 fresh input

The caveat is part of the output, on every shape, because the number is not a bill and not money saved — it is what the same work would have cost through the API, and it is quotable enough to be worth making hard to quote without that. The multiple compares your usage against the plan fee for the window that was measured, so the report also prints the fee it divided by, with cents, so the division checks out on sight. The raw token counts sit under the cache percentages: they are what those percentages are computed from, and they are the half of the cache story a reader can picture. Set your plan in the dashboard header first; with no plan stated, caprock report says so and shows no multiple rather than guessing one.

It reads from the running daemon and only issues GETs. Numbers move as you work, so re-running it is the point — a figure you pasted last month is a figure about last month.

Take the record out

Every agent Caprock reads — Claude Code, Codex, OpenCode, Gemini CLI, DeepSeek — lands in the same tables with the same columns. caprock export writes one of them out, for a spreadsheet, a notebook or your own warehouse:

caprock export --since 30d > events.tsv           # one row per turn and tool call
caprock export sessions --format csv --out s.csv  # one row per session
caprock export --agent codex --format jsonl       # one agent, as JSON lines

It reads the database read-only, so it works with the daemon stopped. The columns, what each agent's source maps to, and what is deliberately left out are in docs/schema.md. The record also outlives the agents' own: Claude Code removes its transcripts after 30 days by default, and Caprock keeps what it read from them.

A session you do not want counted — a test run, say — comes out with Remove from Caprock on its page, or in bulk from the terminal. It lists first and removes only with --yes; a removed session is never read back in:

caprock sessions rm --cwd-prefix /private/tmp/scratch        # what would go, and its cost
caprock sessions rm --cwd-prefix /private/tmp/scratch --yes  # remove them

What it is

Claude Code runs in a terminal. Caprock is the app that terminal lives in, and the window into what it does. One local daemon, with an app and a browser dashboard on top. Your data never leaves your machine.

What that database holds. Everything Claude Code read and wrote: your prompts, its replies, and the full output of every tool call. That output is where secrets end up — an API key printed by a command, a token in a .env file that got read. The file is 0600 and nothing sends it anywhere, but it is inside your backups, so treat it as you would your shell history: do not put it in a bug report, and do not hand it to anyone debugging an issue for you. caprock down and deleting the data directory removes all of it.

What your context is costing you

Every call re-sends the whole conversation before it does anything. You pay for that on every call, and it grows as the session does — so the 300th call in a long session costs real money before it has run.

Caprock puts the price where you are already looking. A running session says what its next call costs at the context it is carrying. The lifetime breakdown says what that has come to. On the machine this was recorded on, it is 79% of the bill.

The number is exact, not modelled: the context of every call comes from the token counts Claude Code itself records, priced per model from the pricing table. Calls that arrive without a way to attach them to the turn that paid for them are excluded and counted, so a figure is never quietly short.

OpenCode, Codex and DeepSeek Harness

Caprock also reads OpenCode, Codex and DeepSeek Harness sessions, on the same screens as Claude Code. A machine that runs more than one has its spend split across tools that each see part of it; here the projects list, the history and the cost add up over all of them, and the rows carry an oc, cdx or dsh mark so you can still tell them apart.

Or see one at a time. The Now screen carries all / claude / opencode / gemini / codex / deepseek in the middle of its header, and it applies to the whole screen — today's totals, the live pulse, the activity feed, the projects list and the session cards all answer the same question. It appears only on a machine that runs more than one.

Nothing to configure for any of them. OpenCode is found through its own database, opened read-only; Codex through the transcript it writes per session, under $CODEX_HOME (or ~/.codex), archived sessions included; DeepSeek Harness through the transcript it writes per session. No shim, no settings file to edit, and sessions from before you installed Caprock are included, because each tool keeps its own history. What OpenCode, Codex and DeepSeek Harness wrote back is searchable on the Memory screen beside Claude's.

The cost works differently for each, and it matters. OpenCode computes its own figures and Caprock passes them through, so they match what OpenCode reports. Codex reports how many tokens a turn used but never what it cost, so those are priced from Caprock's own table of OpenAI list prices. Like every number here, both are modelled from list prices, not a bill.

Three things about Codex figures worth knowing:

  • A turn whose transcript does not name the model it ran on keeps its tokens and shows no cost, rather than a guessed one. caprock status reports how many.
  • About half of Codex's token reports give a total without breaking it down by kind. Caprock counts that total as input, which is the unqualified rate — so for those turns the cost is an upper bound: any part of it that was really a cached read cost a tenth or less of what is shown.
  • OpenAI bills the gpt-6 models for writing to their cache, at 1.25x input, but Codex does not report how many tokens were written. Those arrive as plain input, so a gpt-6 figure can be low by up to a quarter of that unreported share.

Codex's plan limits sit on the Cost screen under Claude Code's, labelled as Codex's: the 5-hour and weekly windows as Codex last wrote them into a session transcript, with the time it wrote them. Which windows appear depends on the plan — some ChatGPT plans have no 5-hour window. They are shown as measured and never forecast.

What is not there yet. Observation only: the dashboard cannot start, steer or stop an OpenCode, Codex or DeepSeek Harness session, and the task runner does not work with them. Activity refreshes every few seconds rather than instantly, so the Now screen lags a little behind a running session — the Cost and Lifetime screens are unaffected. Verified on macOS; it builds and its tests pass on Linux and Windows, but it has not been run on either.

Why

  • See it — live activity, tokens, cost, and loop alerts per session, plus what each repository costs you and who is working in it.
  • Find what Claude said — the reasoning and the "here's what changed, here's what I still need from you" that otherwise lives only in terminal scrollback, searchable across every session.
  • Pick up where you left off — a new session in a folder you have worked in is handed the last thing the previous one said there (on by default, off in settings). You can measure whether that helps: an opt-in setting holds it back from one new session in four and the Memory screen compares the two.
  • See what it went on — not just which model or which repository, but what the money was doing: running commands, writing code, reading and searching, or turns that called no tool at all.
  • Know what it's worth — your measured usage priced at the API rate, against what your plan actually costs.
  • 1-click terminal — the Terminal button on a project opens the session Caprock is running there, picks up one started elsewhere, or starts a new one. A running card on Now opens in its terminal too. Session pages and projects link to the repository and the pull requests a session opened.
  • Steer it — spawn, pause, and kill sessions from the dashboard, and continue one that has ended. Each card says what the session was about and when it was worked in, says why when it cannot be continued, and ended sessions are searchable. After a reboot the Now screen lists the sessions it interrupted, each with continue.
  • Trust it — an opt-in task runner whose tasks finish only when the checks Caprock runs come back green.
  • Local-first — loopback only, no servers, no telemetry, no account. Nothing reaches the network unless you switch it on: the release check, the Gemini chat on your own key, and the weekly report and phone alerts to your own Telegram bot are each off by default.

What your usage is actually worth — the same work priced at the API rate, against what your plan costs. Nobody else tells you this number:

Plan value and cost breakdown

And everything you have ever run through it — measured, not estimated:

Lifetime history

How it works

  • Observe — watches every claude session via hooks + transcripts, and draws the last hour as a pulse: bar height is how much happened that minute, colour is what it cost.
  • Control — run and drive sessions from the browser. When a session is waiting on you, what did it ask? shows the last thing Claude said without a trip to the terminal.
  • Orchestrate — run queued tasks unattended, with a test gate; a task is done only when green. Opt-in, off by default — see below.

Nothing to change in your workflow — it starts by watching the sessions you already run.

Run tasks unattended (advanced, opt-in)

The task runner, off

This is the one part of Caprock that starts sessions on its own, so it is off unless you ask for it. Turn it on from the Tasks screen — the button creates the queue directory and starts the board without restarting the daemon. The honest description is an unattended task runner with a test gate: the closest thing you already know is a git worktree plus a shell loop. What it adds is that a worker cannot stop early, a failing check bounces back with its output attached, spend is attributed per task against a budget, and there is a board showing where everything is.

caprock up --hive ~/caprock-tasks --repo ~/dev/myproject

--hive is a queue directory; Caprock creates it, and seeds it with a README and an example task so it explains itself. --repo is the checkout the work happens in (default: the current directory). Your own working tree is never touched — each worker gets its own git worktree at <repo>/.caprock-worktrees/<worker-id>, on a branch named caprock/<worker-id>.

~/caprock-tasks/
├── README.md              # what this directory is
├── tasks/<id>.md          # one file per task — the source of truth
├── agents/<id>/           # identity, memory, inbox/, outbox/
├── approvals/             # decisions waiting on you
├── verifications/         # captured output of every check that ran
└── ledger.jsonl           # append-only log of every state change

A task is a markdown file with YAML front matter. This is a complete one:

---
id: t-healthz
title: Add a /healthz endpoint
status: inbox
assignee: null
budget_usd: 3
done_criteria:
  - go test ./...
  - go vet ./...
verify_rounds_used: 0
---
Add a GET /healthz returning 200 and {"status":"ok"}. Cover it with a test in
the existing handler test file.

Create one from the dashboard's Tasks screen, or from a terminal:

caprock task create --title "Add a /healthz endpoint" \
  --done-criteria "go test ./..." --done-criteria "go vet ./..." --budget 3
caprock tasks          # the board
caprock status         # includes which hive is in force

Then press Start orchestrator on the Tasks screen. Nothing runs until you do.

What done_criteria is

Plain shell commands. When a worker reports it has finished, Caprock runs them — not the agent — in that worker's worktree, with a five-minute ceiling each. Every command exits 0 and the task moves to done. Any command fails and the output bounces straight back to the worker to try again; after three rounds it stops and asks you. A task with no done_criteria cannot be verified, so it is never marked done on a worker's say-so.

They run in a real checkout of your repository, so treat them as commands you are running yourself: go build ./... will leave a binary behind exactly as it would in your own tree.

Before you turn it on
  • Workers run with permission prompts skipped (--dangerously-skip-permissions), in a worktree of your repo. A task body is acted on without a further confirmation from you. Give each task a budget.
  • Only for independent tasks. Nothing here merges branches, and nothing notices two workers editing the same file. Give concurrent tasks separate ground.
  • You land the work. When a task is done, open its card: it shows the diff, the checks that passed, the branch, and the git command that merges it. Caprock never writes to your branches itself.

Found a bug, or something that did not explain itself? The feedback button in the header opens a prefilled GitHub issue in your browser — nothing is sent from the dashboard, and what gets attached is on screen before you press it.

Premium

Everything above is free, Apache-2.0, and stays that way — including the cost of every provider Caprock can see, Anthropic or not.

Premium adds the things that act on what you are looking at.

A daily cap. Pass a number you set, and Caprock pauses the sessions it started — paused, not killed, and never a session you started yourself. Built.

Ask Gemini about your numbers, on your own key. A second model inside Caprock, billed to you by Google at their prices. Get a key from Google AI Studio and either export GEMINI_API_KEY before caprock up, or paste it into the field on the Cost screen. An exported variable wins; a pasted key is written to the config file with owner-only permissions and never leaves the machine or comes back out of the API.

On the Cost screen, a question carries today's and the week's spend, top projects and models — so the answers are about your machine; your prompts, replies, and tool output are never sent. A question costs about 0.04 cents on Flash Lite and 1 cent on Pro, priced before you spend it. Built.

A weekly report of what moved — spend, the projects that drove it, and what changed against the median of the last four weeks — sent to your own Telegram bot.

Where each tool failed. On Lifetime a tool's row opens into its calls grouped by what they were about — Bash by command, Read and Edit by file, WebFetch by domain — and that much is free. Output, failure rate and a trend per group are Premium; without a licence the daemon leaves those figures out.

$5/month, $30/year, or $100 once — caprock.dev/premium.

A key arrives by email and goes in the dashboard's settings, or:

caprock license set CR-2027-01-01-A1B2C3D4
caprock license                 # what is in force

The key carries its own expiry and is checked on your machine. Caprock makes no request to us to verify it, now or ever — there is nothing to verify against. Paid features keep working for seven days after a key expires, so a late renewal does not interrupt you.

Updating

Use the command that matches how you installed it:

brew update && brew upgrade caprock                     # Homebrew
scoop update caprock                                    # Scoop
brew upgrade --cask caprock-app                         # the desktop app (macOS)
go install github.com/dspv/caprock/cmd/caprock@latest   # go install

brew update first is not decoration: a tap is read from a local git clone that brew upgrade refreshes only through auto-update, which runs at most once a day. Without it, Homebrew can report already installed for a release that has been public for hours.

Then restart the daemon so the new binary is the one running:

caprock down && caprock up

caprock down stops the daemon and leaves your database alone — nothing is lost, and history from before the upgrade stays exactly where it was. Check what you ended up on with caprock status.

Sessions you started from the dashboard keep running through the restart: each one's terminal lives in a small process of its own, and the new daemon picks it back up, screen and all. If autostart is installed, run caprock service install once after upgrading so its file carries the settings that let sessions outlive a service restart (caprock service status tells you when it differs).

Caprock can also tell you when a release is out: turn on release checks from the banner on the Now screen, or under Privacy in settings. That is the only outbound call it makes, it is off until you switch it on, and it sends nothing about you. It never installs anything by itself — it shows the one command above for your install method, and you run it.

Downloaded the binary directly? Replace it with a fresh one from Releases and restart.

Open it on your phone

Caprock answers only the machine it runs on. To read it from a phone or a tablet:

  1. Your phone and the computer are on the same Wi-Fi — or both have Tailscale on, which works from mobile data too.
  2. Open settings and press Show a code. When the computer is on Tailscale, pick what the code carries — Wi-Fi, Tailscale or Tailscale name. Point the phone's camera at the QR code; the phone opens Caprock and pairs by itself. (No camera? The same screen shows the address and a six-digit code to type.)
  3. The phone appears under Paired devices, with a Remove button.

The QR code is drawn by the dashboard itself; nothing is sent anywhere to make it.

Put it on the home screen. On an iPhone, Share → Add to Home Screen; on Android, Chrome's menu → Add to Home screen. It opens full-screen with the Caprock icon, in your light or dark theme, clear of the notch. An iPhone keeps a home-screen app's storage apart from Safari's, so the first time you open it from there it asks to pair again: press Show a code on the computer and type the six digits (scanning would open Safari, not the app). The machine lists it as a second device, "iPhone · home screen".

Over a plain http:// address — your Wi-Fi or a Tailscale 100.x address — the browser treats the page as not secure, which costs three things and nothing you need to work:

  • No offline copy. Caprock registers no service worker, on purpose: every figure is live and must never come from a cache. Without the computer, the app shows nothing rather than something stale.
  • Android adds a shortcut, not an installed app. Chrome installs a web app only over HTTPS; Add to Home screen still works and opens Caprock.
  • No push notifications. Web Push needs HTTPS (and, on an iPhone, the home-screen app). Alerts that a session needs you go through your own Telegram bot instead (Settings → Phone alerts, ADR-036).

There is a flag too — caprock up --lan — for a machine you administer over SSH. The button exists because the person who wants this is usually holding the tablet, and telling them to go and find a terminal is telling them not to bother. That is the whole setup — no account, no tunnel, nothing on anybody's server. The other device is talking to your machine.

A few things worth knowing, because this is the one place Caprock stops being loopback-only:

  • Nothing gets in without pairing. Every request from the network is refused until a device has traded a code for a token. Devices are listed in settings and can be removed one by one, which takes effect on the next request.
  • A paired device reads, unless you let it control sessions. It sees sessions, costs, answers, changes and the task board. Beside each device in settings, Let it control sessions lets that phone also start a session in any folder under your home directory with Claude Code, Codex or OpenCode, in any permission mode (Bypass asks once first), type into it (a big input field plus Esc, Tab, arrows, Enter and Ctrl+C buttons), answer approvals and stop it. Start work on Now also lets it clone a repository, make a new project or a worktree, and start an agent there, opening on the session's chat. That is as much power as a shell in your home directory, so grant it only to your own phone. Take control away undoes it at once, including in a terminal already open on the phone. Changing settings or pairing, custom commands and folders outside home stay on the machine Caprock runs on — the daemon refuses them from anywhere else.
  • It is off again next time. Not a stored setting: a laptop opened somewhere you do not trust should not be carrying a decision you made at home. What survives a restart is the list of devices, so you do not walk back to the tablet.
  • Its own addresses, not all of them. The extra listeners bind the machine's private Wi-Fi address and, when it is up, its Tailscale one — never every interface — so a VPN or a container bridge coming up later does not quietly widen it.
  • A LAN address is same-network only, and the screen says so. A tablet on mobile data, or on a network that separates its clients from each other, will never reach it — no setting here changes that, because the packets do not arrive. For anywhere else, install Tailscale on both devices: Caprock then shows its address instead, and it works from mobile data. The traffic goes directly between your own machines, with nothing of ours in between. Tailscale's 100.x address is used only when it is on Tailscale's own interface: the same range is carrier-grade NAT, and on your Wi-Fi it would be shared with strangers.
Hear about it on your phone

Settings → Phone alerts sends a Telegram message to a bot you own when a session is waiting for approval (at once) or has finished (after a minute with nothing new) — every session on the machine, from any terminal, each kind with its own switch. Free. Create a bot with @BotFather, paste its token and your chat id, and press Send a test alert.

The first line, the one a lock screen shows, says what happened and which session — ✅ Finished · Fix the cache test, ⏳ Needs approval · …. Below it: the folder (~/dev/caprock) and branch; for a dialog, the command or file it asks about; for a finished run, how long it worked since your last prompt, what it cost, its tool calls, the files it changed and the first line of its reply (a switch turns that off); and a link to the session when phone access is on. Code and tool output are never sent. One message per question, at most one of a kind per session every few minutes and 20 an hour. It goes from your machine straight to Telegram, which can read it; nothing passes a server of ours. Today this covers Claude Code; Codex and OpenCode do not report an approval or a finished turn that Caprock can read.

Start it at login

By default the daemon stops when you reboot, and nothing records until you run caprock up again. One command fixes that for good:

caprock service install     # start at login, from now on
caprock service status      # is it registered? is it running? which file says so?
caprock service uninstall   # undo it

It registers the daemon with your own operating system's login supervisor — no root, no installer, nothing outside your home directory:

  • macOS — a LaunchAgent at ~/Library/LaunchAgents/dev.caprock.daemon.plist, loaded with launchctl. It restarts the daemon if it crashes.
  • Linux — a systemd user unit at ~/.config/systemd/user/caprock.service, enabled with systemctl --user enable --now. It restarts the daemon if it crashes. (No systemd user session? The command says so and tells you what to do instead — it does not leave a file behind that nothing reads.)
  • Windows — a logon script in your Startup folder. It starts Caprock at every logon; Windows has no per-user crash supervisor without admin rights, so a mid-session crash is not auto-restarted.

The installed service runs caprock up --foreground --no-open --no-hooks on your configured port, with your data directory. Three deliberate choices there: it stays in the foreground so the supervisor can actually supervise it, it never opens a browser tab at login, and it never edits ~/.claude/settings.json — hook and status-line registration stays a decision you make interactively.

caprock service install prints the exact path it wrote and the command that undoes it, and running it twice is a no-op rather than a second copy. Stopping the daemon with caprock down keeps it stopped: the service is configured to restart it only when it crashes, never when you shut it down on purpose.

Get involved

Running agents across a team? Caprock for Teams puts every laptop on one screen, in your own VPC.

More

Docs · Changelog · Releasing · Code of Conduct · Security · Apache-2.0

Building with an AI agent? Start at CLAUDE.md.

Project map

This repo (dspv/caprock) is the home of the Caprock binary and its docs. The rest of the project:

Where What
caprock.dev Website — landing, install guide, changelog
dspv/homebrew-tap Homebrew: formula caprock (macOS / Linux), cask caprock-app (the desktop app)
dspv/scoop-bucket Scoop bucket (Windows) — scoop install caprock
Releases Prebuilt binaries for every OS/arch

The Homebrew formula, the app's cask and the Scoop manifest are generated and pushed from here on each release (docs/RELEASING.md); the website lives in its own repo and deploys to caprock.dev.

Directories

Path Synopsis
cmd
caprock command
caprock is the mission-control CLI and daemon: `caprock up` starts the local daemon (hook receiver + transcript ingest + API + dashboard), `caprock down` stops it, `caprock status` reports, `caprock hooks install|uninstall|status` manage the shim in ~/.claude/settings.json, and `caprock service install|uninstall|status` registers the daemon with the OS's login-time supervisor so it survives a reboot.
caprock is the mission-control CLI and daemon: `caprock up` starts the local daemon (hook receiver + transcript ingest + API + dashboard), `caprock down` stops it, `caprock status` reports, `caprock hooks install|uninstall|status` manage the shim in ~/.claude/settings.json, and `caprock service install|uninstall|status` registers the daemon with the OS's login-time supervisor so it survives a reboot.
caprock-hook command
caprock-hook is the shim Claude Code runs on every hook event.
caprock-hook is the shim Claude Code runs on every hook event.
routing-spike command
Command routing-spike measures how much of a Claude Code archive is bulk I/O that could be routed to a cheap worker model.
Command routing-spike measures how much of a Claude Code archive is bulk I/O that could be routed to a cheap worker model.
internal
agents
Package agents spawns and controls Claude Code sessions Caprock owns: a real `claude` process in a PTY, its output buffered for the terminal view and its exit recorded.
Package agents spawns and controls Claude Code sessions Caprock owns: a real `claude` process in a PTY, its output buffered for the terminal view and its exit recorded.
alerts
Package alerts decides when the owner's phone hears about a session: at once when it shows a permission dialog, and a minute after it finishes a turn with nothing following.
Package alerts decides when the owner's phone hears about a session: at once when it shows a permission dialog, and a minute after it finishes a turn with nothing following.
api
A short-lived cache in front of the whole-history aggregates, with single-flight and stale-while-revalidate.
A short-lived cache in front of the whole-history aggregates, with single-flight and stale-while-revalidate.
board
Package board is the Phase 2 task board: it bridges the hive's task files and mailboxes to the SQLite mirror and the API.
Package board is the Phase 2 task board: it bridges the hive's task files and mailboxes to the SQLite mirror and the API.
bus
Package bus is the in-process fan-out for live frames: every stored event, session change, or alert is published once and delivered to every subscriber (WebSocket clients, the loop detector, tests).
Package bus is the in-process fan-out for live frames: every stored event, session change, or alert is published once and delivered to every subscriber (WebSocket clients, the loop detector, tests).
cap
A daily spend cap that pauses the sessions Caprock started.
A daily spend cap that pauses the sessions Caprock started.
codex
Package codex reads OpenAI Codex's session transcripts.
Package codex reads OpenAI Codex's session transcripts.
config
Package config resolves Caprock's data directory and the small on-disk files that live in it: config.json (user settings) and runtime.json (per-run port + token, read by the hook shim).
Package config resolves Caprock's data directory and the small on-disk files that live in it: config.json (user settings) and runtime.json (per-run port + token, read by the hook shim).
contexttax
Package contexttax prices what a session pays to re-send its own context.
Package contexttax prices what a session pays to re-send its own context.
cost
Package cost turns token usage into dollars using the versioned pricing table, and computes the cache-savings math ported from Caprock-python (_savings.py).
Package cost turns token usage into dollars using the versioned pricing table, and computes the cache-savings math ported from Caprock-python (_savings.py).
daemon
Package daemon wires every component into the running `caprock up` process: store, pricing, recorder, hookd, ingest, loop detector, API/WS server, the idle sweeper, and the runtime.json lifecycle.
Package daemon wires every component into the running `caprock up` process: store, pricing, recorder, hookd, ingest, loop detector, API/WS server, the idle sweeper, and the runtime.json lifecycle.
deepseek
Package deepseek reads DeepSeek Harness (DSH) session transcripts.
Package deepseek reads DeepSeek Harness (DSH) session transcripts.
desktop
Package desktop reads the plan-usage history the Claude desktop app keeps on disk, so the dashboard can say whether your plan limits were spent somewhere other than Claude Code.
Package desktop reads the plan-usage history the Claude desktop app keeps on disk, so the dashboard can say whether your plan limits were spent somewhere other than Claude Code.
editor
Package editor opens a folder, or a file at a line, in the user's own editor — VS Code, Cursor, Zed or a JetBrains IDE (F18, .ai/21-app.md).
Package editor opens a folder, or a file at a line, in the user's own editor — VS Code, Cursor, Zed or a JetBrains IDE (F18, .ai/21-app.md).
event
Package event defines the single normalized event type that every part of Caprock consumes — the UI, stats, the loop detector, the orchestrator, and any future avatar skin.
Package event defines the single normalized event type that every part of Caprock consumes — the UI, stats, the loop detector, the orchestrator, and any future avatar skin.
export
Package export writes Caprock's normalized record out as a flat table.
Package export writes Caprock's normalized record out as a flat table.
gemini
Package gemini talks to Google's Gemini API on a key the user supplies through the environment.
Package gemini talks to Google's Gemini API on a key the user supplies through the environment.
gitdiff
Package gitdiff produces the live diff for a session's working directory by shelling out to git.
Package gitdiff produces the live diff for a session's working directory by shelling out to git.
github
Package github is Caprock's GitHub integration (F14, .ai/21-app.md § GitHub): a small REST client in the daemon, the token sources it may use, the OAuth device flow, and the pull-request state each worktree shows.
Package github is Caprock's GitHub integration (F14, .ai/21-app.md § GitHub): a small REST client in the daemon, the token sources it may use, the OAuth device flow, and the pull-request state each worktree shows.
gitremote
Package gitremote answers "where does this repository live on the web, and which pull requests did a session open", from the machine alone.
Package gitremote answers "where does this repository live on the web, and which pull requests did a session open", from the machine alone.
hive
Package hive owns the on-disk orchestration state (Phase 2): one directory per registered project workspace holding agents, tasks, approvals, mailboxes and an append-only ledger.
Package hive owns the on-disk orchestration state (Phase 2): one directory per registered project workspace holding agents, tasks, approvals, mailboxes and an append-only ledger.
hookd
Package hookd receives Claude Code hook payloads from the caprock-hook shim on POST /v1/hook, normalizes them into events, and hands them to the recorder.
Package hookd receives Claude Code hook payloads from the caprock-hook shim on POST /v1/hook, normalizes them into events, and hands them to the recorder.
hooks
Package hooks installs and removes the caprock-hook shim in Claude Code's user-level settings.json, non-destructively.
Package hooks installs and removes the caprock-hook shim in Claude Code's user-level settings.json, non-destructively.
ingest
Package ingest discovers Claude Code transcript files (~/.claude/projects/**), tails them, and turns their JSONL lines into normalized events.
Package ingest discovers Claude Code transcript files (~/.claude/projects/**), tails them, and turns their JSONL lines into normalized events.
lan
Package lan finds the address a second device on the same network can reach this machine at.
Package lan finds the address a second device on the same network can reach this machine at.
license
Package license decides whether paid features are on.
Package license decides whether paid features are on.
logcap
Package logcap keeps the daemon's log file from growing without bound.
Package logcap keeps the daemon's log file from growing without bound.
loop
Package loop implements the loop detector: ≥ K tool.pre events with the same tool and normalized-similar input within T minutes ⇒ one alert per episode.
Package loop implements the loop detector: ≥ K tool.pre events with the same tool and normalized-similar input within T minutes ⇒ one alert per episode.
modelclass
Package modelclass classifies model ids whose role changes how Caprock should present their usage.
Package modelclass classifies model ids whose role changes how Caprock should present their usage.
narrate
Package narrate turns tool events into the human-readable phrases the Now screen shows ("editing main.go", "running go test — 2nd attempt") and derives a session's health badge and plan progress.
Package narrate turns tool events into the human-readable phrases the Now screen shows ("editing main.go", "running go test — 2nd attempt") and derives a session's health badge and plan progress.
nativeterm
Package nativeterm opens a command in the user's own terminal application — Ghostty, iTerm2, Terminal.app, Windows Terminal — rather than in the dashboard's web terminal.
Package nativeterm opens a command in the user's own terminal application — Ghostty, iTerm2, Terminal.app, Windows Terminal — rather than in the dashboard's web terminal.
opencode
Package opencode reads sessions from OpenCode's SQLite database.
Package opencode reads sessions from OpenCode's SQLite database.
orchestrator
Package orchestrator manages the Phase 2 orchestrator + worker lifecycle: it spawns Claude Code sessions with the hive-aware system prompt, runs the mailbox router on a tick, and registers agents in the hive.
Package orchestrator manages the Phase 2 orchestrator + worker lifecycle: it spawns Claude Code sessions with the hive-aware system prompt, runs the mailbox router on a tick, and registers agents in the hive.
pairing
Package pairing lets a second device — a tablet, a phone — reach a daemon that is otherwise bound to loopback.
Package pairing lets a second device — a tablet, a phone — reach a daemon that is otherwise bound to loopback.
premium
Package premium holds what the paid plan costs and where to buy it.
Package premium holds what the paid plan costs and where to buy it.
projects
Package projects keeps the list of projects a person works in — added, created, cloned, or found from the sessions that ran there — with each one's live git state, its worktrees and what its sessions are doing (.ai/21-app.md § Projects, WP-05 and WP-08).
Package projects keeps the list of projects a person works in — added, created, cloned, or found from the sessions that ran there — with each one's live git state, its worktrees and what its sessions are doing (.ai/21-app.md § Projects, WP-05 and WP-08).
ptyhost
Package ptyhost keeps an owned session's terminal alive across daemon restarts (ADR-033).
Package ptyhost keeps an owned session's terminal alive across daemon restarts (ADR-033).
ptyman
Package ptyman owns pseudo-terminal sessions: spawn a process attached to a PTY (ConPTY on Windows), stream its bytes, write input, resize, signal, kill.
Package ptyman owns pseudo-terminal sessions: spawn a process attached to a PTY (ConPTY on Windows), stream its bytes, write input, resize, signal, kill.
relay
Package relay builds the brief that carries a session's work into a new session, possibly in another agent.
Package relay builds the brief that carries a session's work into a new session, possibly in another agent.
rollup
Package rollup is the single write path for events: it stores the event, upserts the session, prices assistant turns, and maintains session_stats / daily_stats / session_files in one transaction, then publishes live frames.
Package rollup is the single write path for events: it stores the event, upserts the session, prices assistant turns, and maintains session_stats / daily_stats / session_files in one transaction, then publishes live frames.
service
Package service registers the Caprock daemon with the operating system's own login-time supervisor, so it comes back after a reboot without the user running `caprock up` by hand.
Package service registers the Caprock daemon with the operating system's own login-time supervisor, so it comes back after a reboot without the user running `caprock up` by hand.
sessionlink
Package sessionlink joins a session Caprock started to the record the agent's own files keep of it.
Package sessionlink joins a session Caprock started to the record the agent's own files keep of it.
shim
Package shim is the hook shim logic shared by the caprock-hook binary and the hidden `caprock hook` fallback command.
Package shim is the hook shim logic shared by the caprock-hook binary and the hidden `caprock hook` fallback command.
statusline
Package statusline is the `caprock statusline` command's logic: Claude Code invokes it (statusLine.command in settings.json) on every assistant message, piping a JSON status object on stdin.
Package statusline is the `caprock statusline` command's logic: Claude Code invokes it (statusLine.command in settings.json) on every assistant message, piping a JSON status object on stdin.
store
Package store owns the SQLite database: opening, migrating, and every query.
Package store owns the SQLite database: opening, migrating, and every query.
tcc
Package tcc keeps an isolated Caprock daemon out of the folders macOS guards with a privacy prompt (ADR-040).
Package tcc keeps an isolated Caprock daemon out of the folders macOS guards with a privacy prompt (ADR-040).
termbuf
Package termbuf holds the recent output of a terminal: the last bytes it printed plus the terminal modes that output set, so a terminal that attaches late can be put back into the state the program expects.
Package termbuf holds the recent output of a terminal: the last bytes it printed plus the terminal modes that output set, so a terminal that attaches late can be put back into the state the program expects.
update
Package update checks whether a newer Caprock release exists and works out the command that would install it.
Package update checks whether a newer Caprock release exists and works out the command that would install it.
userenv
Package userenv gives the processes Caprock starts the environment the user's own terminal would give them.
Package userenv gives the processes Caprock starts the environment the user's own terminal would give them.
version
Package version exposes the build-time version string stamped via -ldflags.
Package version exposes the build-time version string stamped via -ldflags.
weekly
Package weekly builds the report that says what moved — and, more often, that nothing did.
Package weekly builds the report that says what moved — and, more often, that nothing did.
Package pricing embeds the versioned model pricing table.
Package pricing embeds the versioned model pricing table.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL