mockpit
A design-decision loop for terminal coding agents — agents publish designs with states and alternatives, ask questions and expose knobs; you answer, tune and comment, then send one reply.
Package details
Install mockpit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:mockpit- Package
mockpit- Version
4.2.0- Published
- Nov 25, 2026
- Downloads
- 1,674/mo · 556/wk
- Author
- fabiogaliano
- License
- MIT
- Types
- extension, skill
- Size
- 2.9 MB
- Dependencies
- 12 dependencies · 0 peers
Pi manifest JSON
{
"skills": [
"./skills"
],
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
mockpit
A design loop for terminal coding agents. Your agent shows designs in your browser; you compare, pick and press Send once, or Use to put your picks in the product.
The agent publishes a screen in its states, a few alternatives and the knobs worth trying, then ends its turn. You see the project on a Board, open the design in Focus, pick a knob's value from pictures or compare it on a sheet of every frame in every value, pick and star what works, tune, and comment on parts. It asks a question only when it can't go on without you. One Send gives the agent the whole reply. Nothing it calls waits for you.
Quickstart
Needs Node 22.18 or newer.
npm i -g mockpit
mockpit serve --open # http://localhost:8228
mockpit demo # seeds a sample design to click through
Point your agent at it, once per repo:
curl -s http://localhost:8228/setup >> AGENTS.md
mockpit init # reads the repo's tokens, fonts and kit
Then ask it to "design this up on mockpit". Claude Code, Codex, OpenCode, Pi and MCP setup: docs/connecting-agents.md.
A turn
mockpit publish --design shop --state Grid --alternative index --html index.html
mockpit publish --design shop --state Grid --alternative gallery --html gallery.html \
--knobs '{"density": {"type": "select", "options": ["airy", "packed"]}}'
# the agent says where to look and stops. After your Send or Use:
mockpit feedback
What you can do with a design
- Choose a knob's value by name, each previewed on the design as you point at it, for every alternative at once, or open its Sheet: every frame in every value, on one page. Click any cell to inspect it full-size beside a live choice panel or Side by side finalist grid that shrinks as you cull options.
- Main, Bookmark & Delete: star a Main (
M) per frame and knob (each frame remembers its combo across knobs), Bookmark (K) runners-up, and Delete (X) options you don't want — they vanish at once, wait on the Sheet to be restored, and stay silently ruled out for the agent. - Pick one or Keep all (Sets): flip any idea between picking one winner or keeping all
items as a Set (like a collection of hero illustrations that all ship), each styled with its
own
★ Mainper knob. - Save a preset, the knob values you changed, and give it to another frame or design with one click. A changed knob shows a dot and ↺ Reset on its own row; there's no undo to learn.
- Tune the knobs the agent declared, borrow a part from another alternative, comment on any part, and ask for more like this. All of it waits in Send's list.
- Use your decisions: picks (or every live item in a Set, wearing its
★ Mainvalues) go into the product design, and the agent hears "put this in the code". - Answer the agent's questions from pictures, side by side at full height.
Two places. The Board lays a project out like a designer's file: a page per area, a section
per flow, every frame under its name, a map of what's left to design, and a mark on what the
agent just changed. Focus is one design, live, with its question, its spec and the agent's
activity. A link an agent sends opens Focus on that design, on its question when one waits;
the viewer's own links open on the Board, fit to that design, where Enter or a double-click opens
Focus. If you open the viewer at another address than agents reach the server at (a tailnet name,
a tunnel), start the server with MOCKPIT_PUBLIC_URL=https://that-host:8228 so their links use it. Needs you lists what's waiting on you. On a phone the Board is rows you swipe, and Focus
is one frame with the question in a sheet.
What it shows
Html with parts and knobs, plus markdown, diff, terminal, image, mermaid, json and code. All of it renders in a sandboxed frame.
Agent side
Twelve verbs, the same on the zero-dependency CLI, MCP (stdio, or HTTP at /mcp) and plain
HTTP: publish, ask, read, feedback, say, move, edit, system, export,
upload, guide, run. mockpit watch wakes a waiting agent on each Send.
Agents read a short brief before their first publish (/agent-howto). Add your own taste in
~/.mockpit/rules.md, or per repo in .mockpit/rules.md.
examples/rules.md is one.
Where it runs
Locally, a small Node server with SQLite at ~/.mockpit/mockpit.db. When the agent and browser
are on different machines, deploy it to Cloudflare Workers: docs/deploying.md.
Development
git clone https://github.com/fabiogaliano/mockpit && cd mockpit
npm install
npm run dev # server + viewer watch build
npm run typecheck && npm run lint && npm run format:check
Architecture and rules: AGENTS.md.
Credits
A fork of sideshow by Ben Vinegar, sponsored by Modem. The renderer, sandboxing, agent tiers and Cloudflare deploy started there.
MIT. The original sideshow copyright is retained.