Skip to content

Commit 28cd314

Browse files
benvinegarclaude
andauthored
docs: rework README as a marketing page, move agent setup to docs (#63)
* docs: rework README as a marketing page, move agent setup to docs Simplify the README to focus on the value for a human running sideshow: why it helps (see what the agent means, cheaper than hand-writing HTML, comment instead of re-prompting), a tight quick start, and the surface gallery. Move the agent-facing integration commands (CLI, MCP, Pi, plain HTTP, Claude Code skill/plugin) into docs/connecting-agents.md and the Cloudflare instructions into docs/deploying.md, linked from a Docs section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: note the viewer's in-app agent setup / connect links in quick start Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: condense the token-efficiency benefit Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: lead the token-efficiency point with the HTML surface Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: reword the efficiency benefit in plainer terms Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 99112c7 commit 28cd314

4 files changed

Lines changed: 175 additions & 151 deletions

File tree

.changeset/violet-colts-chew.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

README.md

Lines changed: 49 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,34 @@
33
[![CI](https://github.com/modem-dev/sideshow/actions/workflows/ci.yml/badge.svg)](https://github.com/modem-dev/sideshow/actions/workflows/ci.yml)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
55

6-
A live visual surface for terminal coding agents.
6+
**A live visual surface for your terminal coding agent.**
77

8-
Let agents say it in more than text — HTML diagrams and UI sketches, rendered
9-
markdown, syntax-highlighted diffs, terminal output, images. sideshow is a
10-
small server with a browser viewer: agents publish **surfaces** from the
11-
terminal, they render live, and you comment back. Your comments reach the agent.
8+
Your agent works in a wall of text. sideshow gives it a screen. It publishes
9+
**surfaces** — diagrams, UI sketches, rendered markdown, syntax-highlighted
10+
diffs, terminal output, images — and they render live in your browser while it
11+
works. You comment back, and your comments reach the agent. Publish, render,
12+
comment, revise: a two-way loop, right next to the conversation.
1213

1314
<picture>
1415
<source media="(prefers-color-scheme: dark)" srcset="docs/sideshow-dark.png">
1516
<img alt="The sideshow viewer: agent sessions in a sidebar, a published JWT-flow diagram with a comment thread between the user and claude-code, and an interactive backoff explainer below" src="docs/sideshow-light.png">
1617
</picture>
1718

18-
An agent sketched a sequence diagram during an auth refactor; the user asked a
19-
question under it, and the agent replied and revised.
19+
![Animated demo: an agent publishes a diagram that appears live in the viewer, the user types a question under it, and the agent revises the snippet to a second version and replies in the thread](docs/sideshow-demo.gif)
2020

21-
The loop — publish, render, comment, revise:
21+
## Why
2222

23-
![Animated demo: an agent publishes a diagram that appears live in the viewer, the user types a question under it, and the agent revises the snippet to a second version and replies in the thread](docs/sideshow-demo.gif)
23+
- **See what your agent means.** An architecture it's proposing, a flow it's
24+
tracing, a UI it's about to build — shown, not described in a paragraph you
25+
have to picture in your head.
26+
- **Faster, and fewer tokens.** sideshow surfaces are optimized for LLMs, so the
27+
agent produces higher-fidelity diagrams and visualizations faster and using
28+
fewer tokens.
29+
- **Comment instead of re-prompting.** Click a card, leave a note. The agent
30+
reads it and revises — no copy-pasting screenshots or re-describing what you
31+
meant.
32+
- **Works with the agent you already use.** Any agent with a shell can drive it
33+
over `curl`; richer tiers exist for CLI, MCP, Pi, and Claude Code.
2434

2535
## Quick start
2636

@@ -31,107 +41,36 @@ npm install
3141
npx sideshow serve --open # viewer on http://localhost:4242
3242
```
3343

34-
Then point your agent at the surface:
44+
Then point your agent at the surface — paste the setup block into its
45+
instructions:
3546

3647
```sh
3748
curl -s http://localhost:4242/setup >> AGENTS.md
3849
```
3950

40-
That block teaches any agent with a shell (pi, opencode, amp, codex, Claude
41-
Code) to publish surfaces and poll for comments over curl.
42-
43-
No agent handy? `npx sideshow demo` seeds two example sessions to look around.
44-
45-
## Connecting agents
46-
47-
Pick whichever tier the agent supports — each one covers the full loop.
48-
49-
**Shell.** The `sideshow` CLI has no dependencies and groups sessions for you:
50-
51-
```sh
52-
sideshow publish sketch.html --title "Cache layout"
53-
sideshow diff change.patch --title "Refactor" # or markdown / image / terminal
54-
sideshow wait # block until the user comments
55-
```
56-
57-
**Pi extension.** Pi users can install the package directly. It adds native
58-
`sideshow_*` tools for publishing/updating surfaces, uploading assets, waiting
59-
for feedback, and replying in browser threads:
60-
61-
```sh
62-
pi install npm:sideshow
63-
# or try it for one run:
64-
pi -e npm:sideshow
65-
```
66-
67-
**MCP.** Tools: `publish_surface`, `update_surface`, `publish_snippet`,
68-
`update_snippet`, `wait_for_feedback`, `reply_to_user`, `list_surfaces`,
69-
`upload_asset`, `get_design_guide`. Connect over stdio or straight to the
70-
server at `/mcp`:
71-
72-
```sh
73-
claude mcp add --scope user sideshow -- npx -y sideshow mcp
74-
# or, no local process:
75-
claude mcp add --scope user --transport http sideshow http://localhost:4242/mcp
76-
```
77-
78-
**Plain HTTP.** `POST /api/surfaces`, `PUT /api/surfaces/:id`, `POST /api/assets`
79-
for blob uploads, and `GET /api/comments?wait=60` for long-polling. The legacy
80-
`/api/snippets` endpoints still work as html-only aliases. Documented at `/guide`.
51+
That teaches any agent with a shell (Pi, opencode, amp, codex, Claude Code) to
52+
publish surfaces and read your comments. Ask it to "sketch this on sideshow" and
53+
watch the card appear.
8154

82-
MCP agents get usage instructions automatically; everything else uses the
83-
`/setup` block above. Claude Code users can also install the skill in
84-
`skills/sideshow/` (`cp -r skills/sideshow ~/.claude/skills/`).
55+
The running viewer has the same handoff built in: its sidebar footer carries an
56+
**agent setup** link (the block above) and a **Connect Claude Code** button, so
57+
you can grab it without leaving the browser.
8558

86-
### Claude Code plugin
59+
No agent handy? `npx sideshow demo` seeds two example sessions to look around.
8760

88-
Claude Code users can install a plugin that bundles all three at once — the
89-
MCP server, the skill, and a **background monitor** that streams your browser
90-
comments to the agent as notifications, so feedback arrives without pasting or
91-
re-arming a watcher:
61+
**Going further:** richer integration tiers (CLI, MCP, the Pi extension, and the
62+
Claude Code skill + plugin) are in **[docs/connecting-agents.md](docs/connecting-agents.md)**.
9263

93-
```text
94-
/plugin marketplace add modem-dev/sideshow
95-
/plugin install sideshow@sideshow
96-
```
64+
## What your agent can show
9765

98-
On install it asks for your **Sideshow URL** (default `http://localhost:4242`,
99-
or your deployed instance) and an optional token. The monitor runs
100-
`sideshow watch` against your board; comments are delivered to the agent
101-
exactly once. Requires Claude Code ≥ 2.1.105. The viewer's "connect Claude
102-
Code" link (sidebar footer) shows the same steps. The plugin lives in
103-
[`plugin/`](plugin/).
104-
105-
## Concepts
106-
107-
- **Session** — one agent conversation. Sessions appear in the viewer sidebar;
108-
click a title to rename, hover to delete.
109-
- **Surface** — one published card, built from an ordered list of **parts**.
110-
Each part has a kind: `html`, `markdown`, `diff`, `terminal`, or `image`.
111-
Combine them — e.g. a markdown rationale above a diff. `html` parts
112-
render in a sandboxed iframe (`sandbox="allow-scripts"`, no same-origin) under
113-
a CSP that limits external resources to a short CDN allowlist; the other kinds
114-
are data the trusted viewer renders natively. Updating a surface creates a new
115-
version; old versions stay viewable. A _snippet_ is sugar for a single `html`
116-
part.
117-
- **Comment thread** — every surface has one. You write in the browser; agents
118-
read via long-poll (`sideshow wait` or `wait_for_feedback`) and reply. An
119-
`html` part can also call `sendPrompt('...')` to post to its own thread.
120-
121-
The design contract at `/guide` tells agents how to write surfaces that fit the
122-
viewer: fragment-only HTML, theme CSS variables, dark mode rules, and when to
123-
reach for each part kind.
124-
125-
## Surface kinds
126-
127-
Every card below is real — published over the same API and captured straight
128-
from the viewer. Regenerate them with `node scripts/shoot-surfaces.mjs`.
66+
Every card below is real — published over the API and captured straight from the
67+
viewer. A surface is an ordered list of **parts**; one card can carry several.
12968

13069
<table>
13170
<tr>
13271
<td width="50%" valign="top">
13372
<img src="docs/surfaces/01-html.png" width="100%" alt="html part — an interactive diagram you author">
134-
<p><b><code>html</code></b> — markup you author, rendered sandboxed. Shapes and buttons call <code>sendPrompt()</code> to post back to the thread.</p>
73+
<p><b><code>html</code></b> — markup the agent authors, rendered sandboxed. Shapes and buttons can call <code>sendPrompt()</code> to post back to the thread.</p>
13574
</td>
13675
<td width="50%" valign="top">
13776
<img src="docs/surfaces/02-markdown.png" width="100%" alt="markdown part — prose, tables and code, rendered">
@@ -170,62 +109,21 @@ from the viewer. Regenerate them with `node scripts/shoot-surfaces.mjs`.
170109
</tr>
171110
</table>
172111

173-
## Architecture
174-
175-
- `server/app.ts` — runtime-agnostic Hono app: REST API, SSE live feed,
176-
long-poll comments, surface renderer, asset upload/serve.
177-
- `server/types.ts` — data model (surfaces, parts, assets) and the `Store`
178-
interface.
179-
- `server/storage.ts``JsonFileStore` (local Node); `workers/sqlStore.ts` is
180-
the Durable Object SQLite store. Both pass the same store contract.
181-
- `server/surfacePage.ts` — the sandboxed document and postMessage bridge for an
182-
`html` part. `server/mcpHttp.ts` — stateless MCP at `/mcp`.
183-
- `viewer/` — the viewer (Solid), Vite-built into a single self-contained
184-
`viewer/dist/index.html`.
185-
- `bin/sideshow.js` — CLI, Node built-ins only.
186-
- `mcp/server.ts` — stdio MCP server, a thin client over the HTTP API.
187-
- `workers/` — Cloudflare entry point and SQLite store.
188-
- `server/public.ts` — the `sideshow/server` package export, for embedding the
189-
app in your own Node process.
190-
191-
## Deploying to Cloudflare
192-
193-
The same app runs on Cloudflare Workers — for when agents run on a different
194-
machine than the browser, or you want the viewer on your phone.
195-
196-
```sh
197-
npx wrangler login
198-
npx wrangler secret put SIDESHOW_TOKEN # any long random string
199-
npm run deploy # https://sideshow.<account>.workers.dev
200-
```
201-
202-
A deployed instance requires the token on every request. Open the viewer once
203-
as `/?key=<token>` to set a cookie. Agents need two environment variables; the
204-
CLI and stdio MCP pick them up automatically:
205-
206-
```sh
207-
export SIDESHOW_URL=https://sideshow.<account>.workers.dev
208-
export SIDESHOW_TOKEN=<token>
209-
```
210-
211-
Remote agents can connect MCP straight to the deployment:
212-
213-
```sh
214-
claude mcp add --transport http sideshow https://sideshow.<account>.workers.dev/mcp \
215-
--header "Authorization: Bearer $SIDESHOW_TOKEN"
216-
```
112+
## Run it anywhere
217113

218-
The whole app runs inside a single Durable Object with SQLite storage. One
219-
instance per board keeps the in-memory event bus authoritative, so SSE and
220-
long-polling behave the same as the local server.
114+
sideshow runs locally as a small Node server, or on Cloudflare Workers when your
115+
agent and your browser live on different machines (or you want the viewer on your
116+
phone). See **[docs/deploying.md](docs/deploying.md)**.
221117

222-
## Terminal surface (experimental)
118+
## Docs
223119

224-
[`sideshow-term/`](sideshow-term/) is an early **alpha** sibling that renders to
225-
a TUI instead of the browser: agents publish STML (a small HTML-like markup) and
226-
you watch it render live in a spare terminal. It ships as its own package and
227-
requires [Bun](https://bun.sh) for the viewer. APIs are unstable — see
228-
[`sideshow-term/README.md`](sideshow-term/README.md).
120+
- **[Connecting agents](docs/connecting-agents.md)** — every integration tier in
121+
detail: CLI, MCP, Pi, plain HTTP, and the Claude Code skill + plugin.
122+
- **[Deploying to Cloudflare](docs/deploying.md)** — run a shared, tokened
123+
instance.
124+
- **[AGENTS.md](AGENTS.md)** — architecture and contributor guide.
125+
- **Terminal surface (alpha).** [`sideshow-term/`](sideshow-term/) is an early
126+
sibling that renders to a TUI instead of the browser. APIs are unstable.
229127

230128
## Development
231129

@@ -239,9 +137,9 @@ npm run format # oxfmt
239137

240138
The server and CLI have no build step — TypeScript runs directly on Node via
241139
native type-stripping, and the npm package ships compiled JS built on prepack.
242-
The viewer (`viewer/src/`, Solid) is the exception: Vite builds it into a
243-
single self-contained `viewer/dist/index.html` (`npm run build:viewer`). See
244-
[AGENTS.md](AGENTS.md) for architecture rules.
140+
The viewer (`viewer/src/`, Solid) is Vite-built into a single self-contained
141+
`viewer/dist/index.html` (`npm run build:viewer`). See
142+
[AGENTS.md](AGENTS.md) for the full architecture and rules.
245143

246144
## License
247145

docs/connecting-agents.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Connecting agents
2+
3+
sideshow meets an agent wherever it is. Pick whichever tier the agent supports —
4+
each one covers the full loop: publish a surface, render it live, read the user's
5+
comments, reply or revise.
6+
7+
The fastest path for any agent with a shell is to paste the setup block into its
8+
instructions:
9+
10+
```sh
11+
curl -s http://localhost:4242/setup >> AGENTS.md
12+
```
13+
14+
That block teaches any agent (Pi, opencode, amp, codex, Claude Code) to publish
15+
surfaces and poll for comments over plain `curl`. The sections below are the
16+
underlying tiers it builds on.
17+
18+
## Shell (CLI)
19+
20+
The `sideshow` CLI has no dependencies and groups a conversation's surfaces into
21+
one session for you:
22+
23+
```sh
24+
sideshow publish sketch.html --title "Cache layout"
25+
sideshow diff change.patch --title "Refactor" # or markdown / image / terminal
26+
sideshow wait # block until the user comments
27+
sideshow guide # print the design contract
28+
```
29+
30+
## Pi extension
31+
32+
Pi users can install the package directly. It adds native `sideshow_*` tools for
33+
publishing/updating surfaces, uploading assets, waiting for feedback, and
34+
replying in browser threads:
35+
36+
```sh
37+
pi install npm:sideshow
38+
# or try it for one run:
39+
pi -e npm:sideshow
40+
```
41+
42+
## MCP
43+
44+
Tools: `publish_surface`, `update_surface`, `publish_snippet`, `update_snippet`,
45+
`wait_for_feedback`, `reply_to_user`, `list_surfaces`, `upload_asset`,
46+
`get_design_guide`. Connect over stdio or straight to the server at `/mcp`:
47+
48+
```sh
49+
claude mcp add --scope user sideshow -- npx -y sideshow mcp
50+
# or, no local process:
51+
claude mcp add --scope user --transport http sideshow http://localhost:4242/mcp
52+
```
53+
54+
MCP agents get the usage instructions automatically.
55+
56+
## Plain HTTP
57+
58+
`POST /api/surfaces`, `PUT /api/surfaces/:id`, `POST /api/assets` for blob
59+
uploads, and `GET /api/comments?wait=60` for long-polling. The legacy
60+
`/api/snippets` endpoints still work as html-only aliases. Documented at
61+
`/guide`.
62+
63+
## Claude Code
64+
65+
Claude Code users have two extra options.
66+
67+
**Skill.** Install the bundled skill:
68+
69+
```sh
70+
cp -r skills/sideshow ~/.claude/skills/
71+
```
72+
73+
**Plugin.** A plugin bundles all three integrations at once — the MCP server, the
74+
skill, and a **background monitor** that streams your browser comments to the
75+
agent as notifications, so feedback arrives without pasting or re-arming a
76+
watcher:
77+
78+
```text
79+
/plugin marketplace add modem-dev/sideshow
80+
/plugin install sideshow@sideshow
81+
```
82+
83+
On install it asks for your **Sideshow URL** (default `http://localhost:4242`, or
84+
your deployed instance) and an optional token. The monitor runs `sideshow watch`
85+
against your board; comments are delivered to the agent exactly once. Requires
86+
Claude Code ≥ 2.1.105. The viewer's "connect Claude Code" link (sidebar footer)
87+
shows the same steps. The plugin lives in [`../plugin/`](../plugin/).
88+
89+
## The design contract
90+
91+
The contract at `/guide` tells agents how to write surfaces that fit the viewer:
92+
fragment-only HTML, theme CSS variables, dark mode rules, and when to reach for
93+
each part kind. Agents should fetch it once before their first publish
94+
(`sideshow guide`, `get_design_guide`, or `curl -s …/guide`).

docs/deploying.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Deploying to Cloudflare
2+
3+
The same app runs on Cloudflare Workers — for when agents run on a different
4+
machine than the browser, or you want the viewer on your phone.
5+
6+
```sh
7+
npx wrangler login
8+
npx wrangler secret put SIDESHOW_TOKEN # any long random string
9+
npm run deploy # https://sideshow.<account>.workers.dev
10+
```
11+
12+
A deployed instance requires the token on every request. Open the viewer once as
13+
`/?key=<token>` to set a cookie. Agents need two environment variables; the CLI
14+
and stdio MCP pick them up automatically:
15+
16+
```sh
17+
export SIDESHOW_URL=https://sideshow.<account>.workers.dev
18+
export SIDESHOW_TOKEN=<token>
19+
```
20+
21+
Remote agents can connect MCP straight to the deployment:
22+
23+
```sh
24+
claude mcp add --transport http sideshow https://sideshow.<account>.workers.dev/mcp \
25+
--header "Authorization: Bearer $SIDESHOW_TOKEN"
26+
```
27+
28+
The whole app runs inside a single Durable Object with SQLite storage. One
29+
instance per board keeps the in-memory event bus authoritative, so SSE and
30+
long-polling behave the same as the local server.

0 commit comments

Comments
 (0)