claude-theater 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .pytest_cache/
9
+ .venv/
10
+ venv/
11
+
12
+ # OS / editor
13
+ .DS_Store
14
+ Thumbs.db
15
+ .vscode/
16
+ .idea/
17
+
18
+ # Internal launch/strategy/planning notes — kept local, not shipped.
19
+ DISTRIBUTION.md
20
+ UPGRADE-PLAN.md
21
+
22
+ # VS Code extension build artifacts (the bundled server copy is generated at
23
+ # package time by vscode:prepublish; the .vsix is a build output)
24
+ vscode-extension/claude_theater.py
25
+ vscode-extension/*.vsix
@@ -0,0 +1,41 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project aims
5
+ to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ SemVer policy for this tool:
8
+
9
+ - **PATCH** — parser fixes / new Claude Code build adapters.
10
+ - **MINOR** — new format adapters, themes, languages, dashboard additions.
11
+ - **MAJOR** — breaking changes to the dashboard or the emitted API shape.
12
+
13
+ ## Tested against Claude Code
14
+
15
+ | Claude Theater | Claude Code |
16
+ | -------------- | ----------- |
17
+ | 0.1.x | 2.1.x |
18
+
19
+ ## [Unreleased]
20
+
21
+ ## [0.1.0] - 2026-06-06
22
+
23
+ ### Added
24
+
25
+ - Initial release: a single-file, pure-stdlib web app that visualizes Claude
26
+ Code subagents as a live office (one room per conversation), served on
27
+ `127.0.0.1:7333`.
28
+ - Isolated parser `parse_agent_event(line) -> Event` — the only code that
29
+ touches the raw journal format — with degrade-not-crash handling.
30
+ - Non-blocking version banner when journals come from an untested Claude Code
31
+ version.
32
+ - Bilingual UI: English by default, Hebrew toggle (persisted, RTL-aware).
33
+ - `--demo` mode: a synthetic, populated office (no real journals read) for a
34
+ zero-setup first run and for capturing screenshots / the Hero GIF.
35
+ - `--version`, `--help`, `--no-browser` flags; the app opens the browser itself
36
+ once the port is bound.
37
+ - Packaging for PyPI/pipx (`claude-theater` / `python -m claude_theater`) and
38
+ CI across Windows/macOS/Linux × Python 3.9–3.13.
39
+
40
+ [Unreleased]: https://github.com/asafabram-ship-it/claude-theater/compare/v0.1.0...HEAD
41
+ [0.1.0]: https://github.com/asafabram-ship-it/claude-theater/releases/tag/v0.1.0
@@ -0,0 +1,55 @@
1
+ # Contributing to Claude Theater
2
+
3
+ Thanks for helping! The single most valuable contribution is a **journal sample
4
+ from a Claude Code version we haven't tested** — that's what keeps the parser
5
+ honest as the format evolves.
6
+
7
+ ## #1 contribution: a format-drift report
8
+
9
+ If you see the yellow banner ("Tested up to Claude Code X · detected Y") or an
10
+ agent renders oddly, please:
11
+
12
+ 1. Find a recent `agent-*.jsonl` under
13
+ `~/.claude/projects/<encoded-cwd>/<session-id>/subagents/`.
14
+ 2. **Scrub it.** These files contain real conversation content. Replace every
15
+ task/prompt and every result/text with synthetic placeholder text. Keep the
16
+ structure (the `type`, `message.content` block shapes, `tool_use` names,
17
+ `stop_reason`, `version`) — that's all the parser cares about.
18
+ 3. Drop it under `fixtures/cc-<major.minor>/` and open a PR (or attach it to an
19
+ issue). Mention the exact `claude --version`.
20
+
21
+ A scrubbed fixture + the version string is enough for us to add an adapter case.
22
+ **Never commit unscrubbed journal content.**
23
+
24
+ ## Adding a language
25
+
26
+ The UI is bilingual (English/Hebrew) and the server is language-neutral. To add
27
+ a language, edit the `I18N` table (and the `PERSONAS_*` / `TOOLS_*` tables) in
28
+ `claude_theater.py` — one file, no Python logic changes. Keep the key set
29
+ identical across languages (the tests and `t()` fallback assume parity).
30
+
31
+ ## Dev setup
32
+
33
+ Pure standard library — nothing to install to run or test:
34
+
35
+ ```bash
36
+ python -m claude_theater # run it
37
+ python -m unittest discover -s tests -v # golden parser + contract tests
38
+ ```
39
+
40
+ Optional, matching CI:
41
+
42
+ ```bash
43
+ pipx run ruff check . # lint (real bugs only: pyflakes + syntax)
44
+ pipx run build # build sdist + wheel
45
+ pipx run twine check dist/*
46
+ ```
47
+
48
+ ## Ground rules
49
+
50
+ - **Privacy first.** Keep everything local; never add telemetry or outbound
51
+ calls. The server binds `127.0.0.1` only.
52
+ - **No runtime dependencies.** The tool stays single-file stdlib.
53
+ - **Keep the parser isolated.** `parse_agent_event(line) -> Event` is the only
54
+ code that touches raw JSONL; everything else consumes the stable `Event`.
55
+ - Add or update a fixture + test when you change parsing or the emitted payload.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Asaf Abramzon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: claude-theater
3
+ Version: 0.1.0
4
+ Summary: Watch your Claude Code subagents work — a live office for every conversation.
5
+ Project-URL: Homepage, https://github.com/asafabram-ship-it/claude-theater
6
+ Project-URL: Issues, https://github.com/asafabram-ship-it/claude-theater/issues
7
+ Author-email: Asaf Abramzon <asafabram@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,claude,claude-code,dashboard,dev-tools,subagents,visualizer
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.9
25
+ Description-Content-Type: text/markdown
26
+
27
+ <!-- markdownlint-disable MD033 MD041 -->
28
+ <div align="center">
29
+
30
+ # 🎭 Claude Theater
31
+
32
+ **Watch your Claude Code conversations and subagents work — a live office, in real time.**
33
+
34
+ [![CI](https://github.com/asafabram-ship-it/claude-theater/actions/workflows/ci.yml/badge.svg)](https://github.com/asafabram-ship-it/claude-theater/actions/workflows/ci.yml)
35
+ [![PyPI](https://img.shields.io/pypi/v/claude-theater.svg)](https://pypi.org/project/claude-theater/)
36
+ [![Python](https://img.shields.io/pypi/pyversions/claude-theater.svg)](https://pypi.org/project/claude-theater/)
37
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
38
+
39
+ <!-- Absolute raw URL so the image renders on PyPI too (relative paths don't). -->
40
+ <img src="https://raw.githubusercontent.com/asafabram-ship-it/claude-theater/main/docs/screenshot.png" alt="Claude Theater — a live office of Claude Code subagents at work" width="820">
41
+
42
+ <sub>The demo office (`claude-theater --demo`): conversations and subagents at work, each agent walks in, sits, head-bobs while it types, then confetti on finish. A community visualizer **for Claude Code** — not affiliated with Anthropic.</sub>
43
+
44
+ </div>
45
+
46
+ Try it now, no Claude Code session required — `pipx run claude-theater --demo`
47
+ spins up the office above with synthetic agents.
48
+
49
+ ---
50
+
51
+ Claude Theater reads the journals Claude Code writes for your conversations and
52
+ the subagents they spawn, and renders them as a live office: **every conversation
53
+ is a room** (titled by its subject), and inside it the conversation itself plus
54
+ each subagent is a little character at a desk — avatar, name, the tool it's using
55
+ right now, and a timer. Click any character to read its full task and result.
56
+ When an agent finishes: confetti, a chime, and it quietly steps off the floor —
57
+ and each room has its own **show-finished** toggle, so you control the history
58
+ per conversation.
59
+
60
+ The UI is **bilingual** — English by default, Hebrew one click away (the choice
61
+ is remembered, and the layout flips to RTL). Adding another language is a single
62
+ edit to the `I18N` table in `claude_theater.py`; the server stays language-neutral.
63
+
64
+ ## Quick start
65
+
66
+ Zero install — run it straight from PyPI with [pipx](https://pipx.pypa.io/):
67
+
68
+ ```bash
69
+ pipx run claude-theater
70
+ ```
71
+
72
+ Or install it:
73
+
74
+ ```bash
75
+ pipx install claude-theater # or: pip install claude-theater
76
+ claude-theater
77
+ ```
78
+
79
+ Or run from a clone (pure standard library, nothing to install):
80
+
81
+ ```bash
82
+ python -m claude_theater
83
+ ```
84
+
85
+ Then open **http://localhost:7333**. On Windows you can also just run
86
+ `start.cmd`, which launches the server and opens your browser.
87
+
88
+ > Requires Python 3.9+ and a Claude Code install that writes journals under
89
+ > `~/.claude/projects/`.
90
+
91
+ ## VS Code extension
92
+
93
+ Prefer it inside your editor? `vscode-extension/` packages Claude Theater as a
94
+ VS Code extension: it runs the server in the background (start/stop it from a
95
+ status-bar button) and opens the office in an interactive panel — no separate
96
+ terminal. The server is bundled into the extension, so it works without a
97
+ separate install. Build a `.vsix` with [`@vscode/vsce`](https://github.com/microsoft/vscode-vsce)
98
+ (`cd vscode-extension && npx @vscode/vsce package`) and install it from the
99
+ Extensions view.
100
+
101
+ ## How it works
102
+
103
+ - Polls the journals Claude Code already writes — both the session files (your
104
+ conversations) and `**/subagents/agent-*.jsonl` (the subagents they spawn).
105
+ Claude Theater only reads them; it never starts or controls agents.
106
+ - A single adapter, `parse_agent_event(line) -> Event`, is the **only** code
107
+ that touches the raw journal format. Everything else consumes the stable
108
+ `Event`, so a Claude Code format change is absorbed in one place.
109
+ - **Degrades, never crashes:** corrupt lines are skipped (and counted), unknown
110
+ keys are ignored, and an agent missing fields still shows up instead of
111
+ vanishing.
112
+ - A non-blocking **version banner** appears when a journal comes from a Claude
113
+ Code version this build hasn't been tested against — output may be partial,
114
+ but the office keeps running.
115
+
116
+ ## Privacy
117
+
118
+ Your journals contain real conversation content, so Claude Theater is built to
119
+ keep them on your machine:
120
+
121
+ - Binds to **`127.0.0.1` only** — never reachable from the network.
122
+ - **Never transmits** anything anywhere. No telemetry, no remote calls.
123
+ - The committed `fixtures/` are 100% synthetic — no real prompts or results.
124
+
125
+ ## Development
126
+
127
+ ```bash
128
+ python -m unittest discover -s tests # golden parser tests, zero dependencies
129
+ ```
130
+
131
+ The tests run synthetic journal fixtures through the adapter and fail loudly if
132
+ the format drifts. Contributing a journal sample from a new Claude Code build is
133
+ the most valuable contribution — **scrub every prompt and result first.**
134
+
135
+ ## Compatibility
136
+
137
+ Tested against Claude Code **2.1.x**. Newer builds will trigger the version
138
+ banner; please open a *format-drift report* with a scrubbed sample so we can add
139
+ a fixture and an adapter case.
140
+
141
+ ## License
142
+
143
+ [MIT](LICENSE) © 2026 Asaf Abramzon. "Claude" is a trademark of Anthropic;
144
+ this is an independent, community project for Claude Code.
@@ -0,0 +1,118 @@
1
+ <!-- markdownlint-disable MD033 MD041 -->
2
+ <div align="center">
3
+
4
+ # 🎭 Claude Theater
5
+
6
+ **Watch your Claude Code conversations and subagents work — a live office, in real time.**
7
+
8
+ [![CI](https://github.com/asafabram-ship-it/claude-theater/actions/workflows/ci.yml/badge.svg)](https://github.com/asafabram-ship-it/claude-theater/actions/workflows/ci.yml)
9
+ [![PyPI](https://img.shields.io/pypi/v/claude-theater.svg)](https://pypi.org/project/claude-theater/)
10
+ [![Python](https://img.shields.io/pypi/pyversions/claude-theater.svg)](https://pypi.org/project/claude-theater/)
11
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+
13
+ <!-- Absolute raw URL so the image renders on PyPI too (relative paths don't). -->
14
+ <img src="https://raw.githubusercontent.com/asafabram-ship-it/claude-theater/main/docs/screenshot.png" alt="Claude Theater — a live office of Claude Code subagents at work" width="820">
15
+
16
+ <sub>The demo office (`claude-theater --demo`): conversations and subagents at work, each agent walks in, sits, head-bobs while it types, then confetti on finish. A community visualizer **for Claude Code** — not affiliated with Anthropic.</sub>
17
+
18
+ </div>
19
+
20
+ Try it now, no Claude Code session required — `pipx run claude-theater --demo`
21
+ spins up the office above with synthetic agents.
22
+
23
+ ---
24
+
25
+ Claude Theater reads the journals Claude Code writes for your conversations and
26
+ the subagents they spawn, and renders them as a live office: **every conversation
27
+ is a room** (titled by its subject), and inside it the conversation itself plus
28
+ each subagent is a little character at a desk — avatar, name, the tool it's using
29
+ right now, and a timer. Click any character to read its full task and result.
30
+ When an agent finishes: confetti, a chime, and it quietly steps off the floor —
31
+ and each room has its own **show-finished** toggle, so you control the history
32
+ per conversation.
33
+
34
+ The UI is **bilingual** — English by default, Hebrew one click away (the choice
35
+ is remembered, and the layout flips to RTL). Adding another language is a single
36
+ edit to the `I18N` table in `claude_theater.py`; the server stays language-neutral.
37
+
38
+ ## Quick start
39
+
40
+ Zero install — run it straight from PyPI with [pipx](https://pipx.pypa.io/):
41
+
42
+ ```bash
43
+ pipx run claude-theater
44
+ ```
45
+
46
+ Or install it:
47
+
48
+ ```bash
49
+ pipx install claude-theater # or: pip install claude-theater
50
+ claude-theater
51
+ ```
52
+
53
+ Or run from a clone (pure standard library, nothing to install):
54
+
55
+ ```bash
56
+ python -m claude_theater
57
+ ```
58
+
59
+ Then open **http://localhost:7333**. On Windows you can also just run
60
+ `start.cmd`, which launches the server and opens your browser.
61
+
62
+ > Requires Python 3.9+ and a Claude Code install that writes journals under
63
+ > `~/.claude/projects/`.
64
+
65
+ ## VS Code extension
66
+
67
+ Prefer it inside your editor? `vscode-extension/` packages Claude Theater as a
68
+ VS Code extension: it runs the server in the background (start/stop it from a
69
+ status-bar button) and opens the office in an interactive panel — no separate
70
+ terminal. The server is bundled into the extension, so it works without a
71
+ separate install. Build a `.vsix` with [`@vscode/vsce`](https://github.com/microsoft/vscode-vsce)
72
+ (`cd vscode-extension && npx @vscode/vsce package`) and install it from the
73
+ Extensions view.
74
+
75
+ ## How it works
76
+
77
+ - Polls the journals Claude Code already writes — both the session files (your
78
+ conversations) and `**/subagents/agent-*.jsonl` (the subagents they spawn).
79
+ Claude Theater only reads them; it never starts or controls agents.
80
+ - A single adapter, `parse_agent_event(line) -> Event`, is the **only** code
81
+ that touches the raw journal format. Everything else consumes the stable
82
+ `Event`, so a Claude Code format change is absorbed in one place.
83
+ - **Degrades, never crashes:** corrupt lines are skipped (and counted), unknown
84
+ keys are ignored, and an agent missing fields still shows up instead of
85
+ vanishing.
86
+ - A non-blocking **version banner** appears when a journal comes from a Claude
87
+ Code version this build hasn't been tested against — output may be partial,
88
+ but the office keeps running.
89
+
90
+ ## Privacy
91
+
92
+ Your journals contain real conversation content, so Claude Theater is built to
93
+ keep them on your machine:
94
+
95
+ - Binds to **`127.0.0.1` only** — never reachable from the network.
96
+ - **Never transmits** anything anywhere. No telemetry, no remote calls.
97
+ - The committed `fixtures/` are 100% synthetic — no real prompts or results.
98
+
99
+ ## Development
100
+
101
+ ```bash
102
+ python -m unittest discover -s tests # golden parser tests, zero dependencies
103
+ ```
104
+
105
+ The tests run synthetic journal fixtures through the adapter and fail loudly if
106
+ the format drifts. Contributing a journal sample from a new Claude Code build is
107
+ the most valuable contribution — **scrub every prompt and result first.**
108
+
109
+ ## Compatibility
110
+
111
+ Tested against Claude Code **2.1.x**. Newer builds will trigger the version
112
+ banner; please open a *format-drift report* with a scrubbed sample so we can add
113
+ a fixture and an adapter case.
114
+
115
+ ## License
116
+
117
+ [MIT](LICENSE) © 2026 Asaf Abramzon. "Claude" is a trademark of Anthropic;
118
+ this is an independent, community project for Claude Code.
@@ -0,0 +1,37 @@
1
+ # Roadmap
2
+
3
+ Directional, not a promise. Issues and PRs welcome — see
4
+ [CONTRIBUTING.md](CONTRIBUTING.md). The guiding constraints don't change:
5
+ **local-only, zero runtime dependencies, single-file stdlib, degrade-not-crash.**
6
+
7
+ ## Now — 0.1.x
8
+
9
+ - Single-file, pure-stdlib web app; one room per conversation.
10
+ - Isolated parser with degrade-not-crash and a version banner.
11
+ - Bilingual UI (English / Hebrew), instant toggle, RTL-aware.
12
+ - `--demo` office for screenshots and a zero-setup first run.
13
+ - PyPI / pipx packaging; CI across Windows/macOS/Linux × Python 3.9–3.13.
14
+
15
+ ## Next
16
+
17
+ - **Claude Code version adapters** as the format evolves — driven by
18
+ community format-drift reports (the #1 contribution).
19
+ - **VS Code extension**: reuse the existing HTML/JS inside a `WebviewPanel`
20
+ (also mirrored to Open VSX for VSCodium / Cursor).
21
+ - **npx** entry point for the Node-native crowd.
22
+ - **More languages** — each is a single edit to the `I18N` table.
23
+ - Labels for **tools** beyond the current set (broader MCP coverage).
24
+
25
+ ## Ideas (v2, unscheduled)
26
+
27
+ - Native finish notifications (e.g. Windows toast via an optional, lazy import).
28
+ - Themes / skins.
29
+ - Friendly room labels derived from the conversation title instead of the cwd.
30
+ - Per-agent timing stats (durations, tool histograms).
31
+
32
+ ## Non-goals
33
+
34
+ - No telemetry, no network calls, nothing that leaves `127.0.0.1`.
35
+ - No required runtime dependencies.
36
+ - No control over agents — Claude Theater only *watches* the journals Claude
37
+ Code already writes.