What is promptarc and how does it work?
What is promptarc and how does it work?
Jan 15, 2026 · 10:00 AM · 8m · created Jan 15, 2026 · 10:00 AM
promptarc is a local-first viewer for AI coding agent sessions.
It reads your local ~/.claude/, ~/.codex/, and ~/.cursor/ directories, parses each session into a normalized timeline, and renders messages alongside their tool calls, file diffs, and task lists. It supports Claude Code, OpenAI Codex, and Cursor in one dashboard with tabs to filter by agent.
When you want to share a session, it builds a self-contained, redacted artifact and uploads it to a hosted backend.
Let me show you the core type that holds a session:
Three things make a session view possible:
- The message stream — every prompt and response, in order, with parent links so we can reconstruct the conversation tree.
- The file edits — every change linked back to the tool call that made it, with full before/after content for inline diffs.
- The task list — planning artifacts the agent created during the session, with dependencies preserved.
How does the share button handle secrets? I'm worried about leaking API keys.
Thinking135 chars
The user is concerned about secret leakage in shared replays. I should walk through the redactor pipeline and show the actual patterns.
Good question. The share pipeline has three layers of defense:
Layer 1 — Pattern matching. A library of regexes catches API keys, JWTs, AWS keys, GitHub tokens, and similar high-entropy formats before anything leaves your machine.
Layer 2 — Path stripping. Your home directory is replaced with ~, removing usernames and absolute paths.
Layer 3 — Optional thinking removal. The model's internal reasoning blocks are stripped by default, since they often contain raw context. Here's the actual redactor:
Even truncated forms get caught — every strong-prefix pattern uses a 3-character floor so things like sk-ant-abc... in markdown tables match too. A regression test pins this in place:
Show me how an inline diff renders.
Diffs come from file-history snapshots in ~/.claude/. Each Edit or Write tool call is paired with its before/after content via the snapshot file's trackedFileBackups field. Here's a real refactor — adding an options parameter and the redaction pipeline:
packages/core/src/share/build.tsThe viewer renders this as a GitHub-style unified diff inline beneath the tool call — line numbers in two columns, additions in green, deletions in red, and a +N -N summary in the header. The diff is computed server-side using jsdiff, so no client JavaScript is required.
This is exactly what I needed. How do I install it?
One command:
npx promptarc
The browser opens to http://localhost:3030 and the dashboard reads ~/.claude/ automatically — no accounts, no config. The first time you click Share, you sign in via GitHub once and every share after that is one click. The artifact is uploaded to your promptarc account, never to a third party.