Skip to content

About

Autonomous multi-agent TUI builder — studies real TUIs, learns patterns, generates new ones (incl. Termux variants). Comeback arc for the GitHub Finish-Up-A-Thon.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

TUI Master Agent

Point it at a real GitHub TUI repo. It studies the code, figures out the framework, and generates a small original TUI in that same framework — then proves the result actually runs.

CI license python

Full pipeline demo: clone, detect, generate, verify

One real, uncut run (long waits trimmed): clone → detect → generate → headless-verify → the generated app's code.

python tui_master.py https://github.com/Textualize/textual
# Cloning https://github.com/Textualize/textual
# Framework detected -> textual (signatures=3212, files=918)
# Generating with claude-opus-4-7 ...
# Wrote 1 file(s) to output/textual - "Pixel Pond"
# Verifying the generated TUI runs ...
# run_test headless -> exit 0
# OK - python main.py from output/textual

The comeback arc

This project was scoped on January 23, 2026 as an ambitious multi-agent system — three sub-agents, a compounding learning database, six frameworks, a Termux converter. The full spec is preserved, untouched, in ARCHITECTURE.md, frozen at the v0.0.1-before tag.

Then it hit a wall. The hard part was designing "patterns as a data structure," the scope was wide, and it sat dormant for four and a half months — an architecture spec and zero implementation.

The GitHub Finish-Up-A-Thon was the forcing function. In the final sprint I deliberately cut the scope to the spine and shipped the one thing that makes the whole idea real: a working single-agent generator. The sub-agents, learning DB, and Termux converter are honest roadmap items (see below), not claims.

This isn't the finished vision. It's the start of finishing.

Verify the comeback yourself

Exhibit Link
The "before": the frozen spec, zero implementation repo at v0.0.1-before
The whole comeback in one diff v0.0.1-before...main
The original Jan 23 spec, untouched since ARCHITECTURE.md

(One honest note on dates: the spec is dated January 23; the public repo was created May 26 to freeze that spec verbatim as the v0.0.1-before exhibit before the build began. The dormant months lived in a drawer, not in git.)

What it actually does (today)

A single-file orchestrator, tui_master.py, runs the whole pipeline inline:

  1. Clone the given GitHub repo (shallow).
  2. Detect the TUI framework with heuristics, not AI — file-extension counts plus import-signature grep. A Rich-only repo is never mistaken for Textual; a Go repo is recognized as Bubble Tea.
  3. Gather the README plus the few most framework-dense source files.
  4. Generate a small, original TUI in the same framework in a single claude-opus-4-7 call.
  5. Write it to output/<framework>/.
  6. Verify it runs — framework-native and headless, no TTY required: Textual via its official run_test() pilot, Bubble Tea via go build.

Detected vs verified

Framework Language Detection Generation Headless run-verification
Textual Python ✅ ✅ ✅ run_test()
Bubble Tea Go ✅ ✅ ✅ go build
Rich Python ✅ ✅ ✅ headless render run
Ratatui Rust ✅ ✅ not yet
Ink JS/TS ✅ ✅ not yet
Cursive Rust ✅ ✅ not yet

Three frameworks across two languages are wired end-to-end with automated run-verification. The detector covers all six.

Quickstart

uv venv && uv pip install -e ".[dev]"        # or: pip install -e ".[dev]"

# Anthropic SDK creds (ANTHROPIC_API_KEY; ANTHROPIC_BASE_URL if self-routed)
export ANTHROPIC_API_KEY=sk-...

python tui_master.py https://github.com/Textualize/textual
python tui_master.py https://github.com/charmbracelet/bubbletea

Useful flags: --framework {textual,rich,bubbletea,...} to force one, --out DIR, --max-files N, --dry-run (clone + detect only, no API call), --no-verify, --local PATH (skip cloning).

See examples/ for sample generated TUIs (a Textual "Pixel Pond" and a Bubble Tea Pomodoro timer) — committed verbatim as the model produced them.

Roadmap

The original ARCHITECTURE.md vision, tracked as issues and explicitly not built yet:

  • Pattern Learner sub-agent — extract reusable UX primitives across studied repos
  • TUI Validator sub-agent — score output against an "awesome-tuis" quality bar
  • Termux Converter sub-agent — Android-friendly variant of each generated TUI
  • learning_db.json — compounding symbolic memory across study sessions
  • Headless run-verification for Rust / JS frameworks (Ratatui, Ink, Cursive)

Built with

Architecture, orchestration, and the verification harness: Claude Code (claude-opus-4-7). Generation calls go through the Anthropic Python SDK. Conventional Commits; MIT licensed.

Acknowledgements

Frameworks studied and credited: Textualize/textual, charmbracelet/bubbletea, Textualize/rich, ratatui/ratatui, vadimdemedes/ink, gyscos/cursive.

License

MIT. See LICENSE.

About

Autonomous multi-agent TUI builder — studies real TUIs, learns patterns, generates new ones (incl. Termux variants). Comeback arc for the GitHub Finish-Up-A-Thon.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages