Skip to main content

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

Project description

MadQTT

PyPI Python License: MIT

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

pip install madqtt          # from PyPI
madqtt                      # run it

Or for local dev from a checkout:

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.1.tar.gz (61.2 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.1-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: madqtt-0.1.1.tar.gz
  • Upload date:
  • Size: 61.2 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.1.tar.gz
Algorithm Hash digest
SHA256 c415f6c825b20a1e071c0b37d5485d91eedff08083210610e4dffe3e889e6a9f
MD5 dc944f00a5b43b91926e2da006733979
BLAKE2b-256 d5f6d87cc01df22b7bec687db06c87a13b076dc07ece1c1368aabcbd2e0032fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: madqtt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 50.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 255b93e317bdd244d3d486c37d0d4dafea7259ebbc57aa3572ad957beee0acf6
MD5 aeb1c5489d7c5f6e45b39cfa57cfac62
BLAKE2b-256 e703cd2ef43c565cf069e1b9d619c91e20943a792a2fe056363bf56256f7fd28

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