Skip to main content

Live TUI for the claude-prime MQTT/Mongo stream.

Project description

MadQTT

Live TUI for the claude-prime hooks MQTT + MongoDB stream — turn the firehose into something a Mad Tinker can read.

┌ Sessions ─────────────┬ Session 4c0f8355 · madnessDesktop ──────────┐
│▶ 4c0f… madnessDesktop │ 01:06:36 Bash    grep -n private async…    │
│  ae97… element-dupe   │ 01:06:38 Bash    ✓ 1.5s                    │
│  9439… Inventorium    │ 01:06:42 Read    lib/api.ts                │
│  6465… madnessDesk    │ 01:06:44 Read    ✓ 2.2s                    │
│ failures: 3           │ 01:06:51 Bash    grep -rn ^export.func…    │
│ active:   4           │ 01:06:52 Bash    ✗ failure                 │
└───────────────────────┴─────────────────────────────────────────────┘
[s]essions [p]rojects [t]opics [c]hat [f]ilter [v]iew [m]sg [q]uit

Install

uv venv .venv
uv pip install -p .venv/bin/python -e .

If your global uv cache has root-owned subdirs from a past sudo install, route around it: UV_CACHE_DIR=.uv-cache uv pip install -p .venv/bin/python -e .

Run

.venv/bin/python -m madqtt                        # live: broker + Mongo backfill
.venv/bin/python -m madqtt --replay dataset1.txt  # replay a mosquitto_sub -v capture
.venv/bin/python -m madqtt --host eaws --port 1883

Documentation

Everything else — keys, configuration, architecture, the full topic & payload reference — lives in the docs site:

uv pip install -p .venv/bin/python -e '.[docs]'
.venv/bin/python -m madqtt --docs

Spawns mkdocs serve on a free port and opens your browser.

Optional extras

extra install what you get
[docs] uv pip install -e '.[docs]' mkdocs-material site behind --docs
[web] uv pip install -e '.[web]' textual-serve "python -m madqtt" exposes the TUI in a browser

Dev

.venv/bin/python -m pytest tests/ -q          # parser regression against dataset1.txt
.venv/bin/python scripts/smoke_replay.py      # headless: all views, SVG captures
.venv/bin/python scripts/smoke_live.py        # live: backfill + 4 synthetic publishes
.venv/bin/python -m mkdocs build --strict     # build docs site to ./site

Project layout

madqtt/                package
├── events.py          Event dataclass + topic parser
├── store.py           EventStore + ring + per-session/topic rollups + Mongo backfill
├── ingest.py          aiomqtt subscriber + replay
├── app.py             Textual App, key bindings, view switching
├── docs.py            --docs implementation
├── config.py          env-var Config
└── widgets/           sessions, projects, topics, chat, filter, transcript, message
docs/                  mkdocs-material site (built behind --docs)
tests/                 parser regression
scripts/               smoke_replay.py, smoke_live.py

Status

feature shipped
Sessions + Projects + Topics views v1.0
Filter modal (project/topic/idle) v1.0
Filter chips actually prune views v1.1
Transcript viewer (v) v1.1
Swarm chat pane (c) v1.1
Write-back (m) to swarm/chat_in v1.2
Fleet Mongo (MADQTT_MONGO_URIS) v1.2
Browser exposure (textual-serve) v1.2
Docs site + --docs CLI v1.3
Persistent memory (UI state + log) v1.4
tool_failure toast + fail/hr counter v1.5
Per-session task list (T) v1.6
Pinned sessions + unread counts v1.7
Inline transcript jumping v1.8
Export filtered transcript (e) v1.9
Global transcript search (/) v1.10
Event inspector modal (enter, i) v1.11
Agent control panel (a) v1.12

Roadmap candidates: "open cwd in editor" key, per-tool aggregate stats view.

Persistent memory

Two files under ~/.madqtt/ (override with MADQTT_STATE_DIR, disable with MADQTT_NO_PERSIST=1):

  • state.json — last view, filter chips, idle toggle, last selected session. Restored on launch, saved on quit + every 30s.
  • events.jsonl — append-only mirror of every Event. Replayed into the ring on startup so the timeline survives broker + Mongo being down.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

madqtt-0.1.0.tar.gz (61.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

madqtt-0.1.0-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file madqtt-0.1.0.tar.gz.

File metadata

  • Download URL: madqtt-0.1.0.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for madqtt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcbff774d46debedc2d18221a1d81970652258bdf066788858b0512457dd0da1
MD5 8d3062cd5d0dbc35b8d2aa7317e3ac22
BLAKE2b-256 e42dd6b237cda4400f0ec8f38f2d26a2869f3c4e37c1d224a0883ae052cfa4b9

See more details on using hashes here.

File details

Details for the file madqtt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: madqtt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for madqtt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a71a467735264d439c00694da68888cd1ef63543129ee251b9b8440df8b2d201
MD5 4452c9050706278d91f2a9b91651c3da
BLAKE2b-256 2c1be687961a370ed62cdf86dda37fc957b6dbed51b6aeef7f9d7287c73299af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page