revui-cli
v0.1.1
Published
Local review UI for agents. Open a diff review in the browser, comment, and round-trip feedback.
Maintainers
Readme
revui
Local review UI for agents. An agent opens a diff review in your browser; you read, mark files viewed, and comment; the agent replies — live, in the same tab. Reviews are durable: every action is an event in a local log (a2 over SQLite), and the review state is a fold over it.
Diffs render with @pierre/diffs.
Install
npm i -g revui-cliRequires Node >= 22.5 (uses node:sqlite).
Usage
# quick: one diff block from any shell command that outputs a patch
revui open --cmd "git diff main...HEAD" --title "Auth refactor"
# full control: markdown narration + multiple diff blocks
revui open review.json
# block until the user comments or submits, then print the event as JSON
revui wait <id>
# the agent side of the conversation
revui reply <id> --body "Good catch — fixed in the next block." --to <commentId>
revui status <id>revui open starts a daemon on localhost:4400 (first run), captures the
diff(s) by running your command in the current repo, appends everything to the
review's event log, and prints { id, url }. The URL stays alive across agent
turns; state survives daemon restarts.
Spec file
{
"title": "Guided tour: auth refactor",
"blocks": [
{ "id": "intro", "type": "markdown", "body": "Start here…" },
{
"id": "d1",
"type": "diff",
"title": "The core change",
"source": { "cmd": "git diff main...HEAD -- src/auth/" },
},
{
"id": "d2",
"type": "diff",
"source": { "patch": "diff --git a/… (inline patch text)" },
},
],
}Diffs are captured once, at open time, so comment anchors never drift and the review still renders after the branch moves on.
Agent skill
The agent-facing workflow doc lives at skills/revui/SKILL.md in the
skills.sh layout, so once this repo is public it installs
with npx skills add <owner>/revui.
How it works
- One npm package: a CLI (
dist/cli.js) that is both the daemon and the client, plus a pre-built React SPA (dist/ui) it serves. - A review is an a2 session. The contract
(
src/shared/contract.ts) defines the vocabulary:review.created,diff.captured,file.viewed,comment.added,comment.resolved,review.submitted. One isomorphic reducer folds the log into view state on the server and in the browser. - The browser holds a live SSE stream and pushes writes optimistically;
revui replyappends through the same route, so agent comments appear in the open tab without a reload.
Development
pnpm install
pnpm build # UI (vite) + CLI (tsdown)
pnpm dev:ui # vite dev server, proxies /api to the daemon on :4400
pnpm typecheckEnvironment: REVUI_PORT (default 4400), REVUI_DATA_DIR (default
~/.revui — holds the SQLite log and daemon log).
