🥕 caret
⚠️ Prototype. caret is an early prototype and may change substantially over the next
little while — interfaces, hooks, storage, and the install flow are all still settling.
Expect rough edges and breaking changes.
A Claude Code plugin that replaces the terminal plan-approval prompt with a local web UI.
When Claude presents a plan via ExitPlanMode, caret opens it in your browser so you can
read it rendered as HTML, annotate passages inline (Google-Docs style), and
approve or request changes. Your decision — and all annotation feedback — flows
straight back to the agent. A single local daemon is shared across concurrent Claude
sessions, so several in-flight plans are reviewed from one browser tab via a switcher.
Looking to develop caret rather than use it? Start with
CONTRIBUTING.md.
Screenshots
Review-UI screenshots are coming soon.
Install
caret installs from its GitHub-based plugin marketplace. From inside Claude Code:
/plugin marketplace add macintacos/caret
/plugin install caret@caret
This fetches the published plugin — a self-contained bun bundle plus
the prebuilt UI — into Claude Code's plugin cache. No git clone, no compile step, no
claude --plugin-dir.
caret runs from that bundle on bun, so bun must be on your PATH — that is the
one requirement. (You'll also want the claude CLI,
which you already have.)
Then restart Claude Code (or run /reload-plugins) and try it:
/caret:demo # presents a short fake plan to exercise the flow
Enter plan mode, let Claude present a plan, and a browser tab opens at the deep-linked
review. Select text to comment, then Approve (optionally "& accept edits" or "& auto
mode") or Request changes.
Update with /plugin marketplace update caret (then /reload-plugins). Uninstall
with:
claude plugin uninstall caret@caret
claude plugin marketplace remove caret
OpenCode
caret also installs into OpenCode — as an auto-loaded plugin rather
than a marketplace entry. Use the script installer; it detects OpenCode (and, if you also
have Claude Code, asks which to install into — or set CARET_AGENTS):
curl -fsSL https://raw.githubusercontent.com/macintacos/caret/trunk/scripts/install.sh | CARET_AGENTS=opencode bash
It builds caret and drops a plugin (caret.ts) plus the /caret:demo,
/caret:discovery, and /caret:debug commands into your OpenCode config dir, along with
a package.json declaring (and installing) the plugin's one dependency
(@opencode-ai/plugin) — it never touches your existing plugin config array.
Restart OpenCode once after installing (plugins load at startup), then /caret:demo
works. Because OpenCode has no ExitPlanMode equivalent, the plugin registers a
caret_review_plan tool and steers the Plan agent to call it; approving or requesting
changes flows back exactly as in Claude Code. Update by re-running the installer;
uninstall with caret install-opencode --uninstall (which also removes caret's
package.json entry). See
doc/agents/opencode-integration.md for the design.
Build from source (advanced)
Prefer a platform-native compiled binary over the bun bundle? The build-from-source
installer clones caret at its latest release (the newest vX.Y.Z tag), compiles the
binary for your platform, and registers it with your agent(s) — no claude --plugin-dir.
It needs git and bun on your PATH; it
detects Claude Code and/or OpenCode and installs into the one(s) present (the
claude CLI is required only for the Claude target —
set CARET_AGENTS=claude,opencode to choose non-interactively):
curl -fsSL https://raw.githubusercontent.com/macintacos/caret/trunk/scripts/install.sh | bash
Set CARET_DRY_RUN=1 and the installer runs the same read-only detection — tool checks,
release-tag lookup, clone-vs-update — then prints the exact commands it would run and
changes nothing:
curl -fsSL https://raw.githubusercontent.com/macintacos/caret/trunk/scripts/install.sh | CARET_DRY_RUN=1 bash
How it works
Claude Code's hooks invoke bin/caret, a small entrypoint shim that runs caret with its
subcommands (daemon, prewarm, review, redact, discovery, and
install-opencode). The shim execs the platform-native compiled binary
(bin/caret-native) when a build-from-source install produced one, and otherwise runs the
bun bundle (dist/cli.js) that the marketplace install ships.
Architecture: tool-agnostic core + agent adapter