termite  by shobrook

CLI tool for generative terminal UI (TUI) creation

Created 1 year ago
386 stars

Top 74.1% on SourcePulse

GitHubView on GitHub
Project Summary

Termite enables users to rapidly prototype terminal-based applications (TUIs) using natural language prompts. It's designed for developers and power users needing quick solutions for tasks like port monitoring, data visualization, or system management directly within their terminal environment. The primary benefit is accelerating TUI development by leveraging AI for code generation and iterative refinement.

How It Works

Termite utilizes a large language model (LLM) to interpret user prompts and generate Python scripts for TUIs. It supports multiple TUI libraries including urwid (default), rich, curses, and textual. The process involves generating a design document, implementing the TUI, and iteratively fixing runtime errors, with an optional self-reflection and refinement step for improved output. This approach automates much of the boilerplate TUI development, allowing for faster iteration.

Quick Start & Requirements

  • Primary install: pipx install termite-ai
  • Prerequisites: OpenAI or Anthropic API key set as environment variables (OPENAI_API_KEY or ANTHROPIC_API_KEY). Optionally, OPENAI_BASE_URL for custom OpenAI endpoints.
  • Setup time: Minimal, dependent on API key configuration.
  • Docs: https://github.com/shobrook/termite

Highlighted Details

  • Supports multiple TUI libraries: urwid, rich, curses, textual.
  • Iterative refinement and bug-fixing capabilities.
  • Saves generated TUIs to ~/.termite for persistence.
  • Recommended providers: Anthropic for best results, OpenAI for speed/cost.

Maintenance & Community

The project is maintained by shobrook. Further community engagement details (Discord, Slack, roadmap) are not explicitly provided in the README.

Licensing & Compatibility

The README does not specify a license. Users should exercise caution due to the experimental nature and AI-generated code.

Limitations & Caveats

Termite is experimental and carries inherent risks associated with running AI-generated code. Current verification is limited to detecting runtime exceptions, meaning generated TUIs may still exhibit incorrect behavior or appearance. Destructive TUI actions are a potential concern during the refinement process.

Health Check
Last Commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.