{"id":24709107,"url":"https://github.com/shobrook/termite","last_synced_at":"2025-08-22T18:22:28.366Z","repository":{"id":270005677,"uuid":"826127627","full_name":"shobrook/termite","owner":"shobrook","description":"Generative UI in your terminal","archived":false,"fork":false,"pushed_at":"2025-01-06T01:54:56.000Z","size":26774,"stargazers_count":380,"open_issues_count":7,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-17T04:33:30.208Z","etag":null,"topics":["code-generation","generative-ui","terminal-app","tui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shobrook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-09T06:26:48.000Z","updated_at":"2025-08-16T22:12:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"e66c21b0-7870-4227-830a-5f94aa1faaae","html_url":"https://github.com/shobrook/termite","commit_stats":null,"previous_names":["shobrook/termite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shobrook/termite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shobrook%2Ftermite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shobrook%2Ftermite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shobrook%2Ftermite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shobrook%2Ftermite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shobrook","download_url":"https://codeload.github.com/shobrook/termite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shobrook%2Ftermite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271680831,"owners_count":24802077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-generation","generative-ui","terminal-app","tui"],"created_at":"2025-01-27T07:00:59.756Z","updated_at":"2025-08-22T18:22:28.291Z","avatar_url":"https://github.com/shobrook.png","language":"Python","funding_links":[],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT","Python"],"sub_categories":[],"readme":"# 🐛 Termite\n\nGenerate terminal UIs (TUIs) with simple text prompts.\n\n![Demo](assets/demo.gif)\n\nTermite lets you quickly prototype a terminal app to solve a problem. It works well for tasks like:\n\n- \"Show me which ports are active\"\n- \"Make me a throughput monitor for my Redis queue\"\n- \"Help me manage my Docker containers\"\n- \"Diff these two SQL tables\"\n\nUnder the hood, an LLM is generating and auto-executing a Python script that implements the UI. By default, UIs are built with the [urwid](https://urwid.org/) library, but you can also use [rich](https://rich.readthedocs.io/en/latest/), [curses](https://docs.python.org/3/library/curses.html), or [textual](https://textual.textualize.io/).\n\nPlease use with caution. Termite is still very experimental and it's obviously risky to run AI-generated code.\n\n## Installation\n\n```bash\n\u003e pipx install termite-ai\n```\n\nOnce installed, you can use OpenAI or Anthropic as your LLM provider. Just add the appropriate API key to your environment:\n\n```bash\n\u003e export OPENAI_API_KEY=\"...\" # For GPT\n\u003e export ANTHROPIC_API_KEY=\"...\" # For Claude\n```\n\nIf you're using OpenAI, you can also set your API URL by adding the following to your environment:\n\n```bash\n\u003e export OPENAI_BASE_URL=\"...\" # Default to None\n```\n\nFor the best results, use Anthropic. For faster and cheaper results, use OpenAI.\n\n## Usage\n\nTo use, run the following:\n\n```bash\n\u003e termite\n```\n\nYou'll be asked to describe what you want to build. Do this, and then Termite will execute the following steps:\n\n1. Generate a design document based on your prompt.\n2. Implement the TUI in Python.\n3. Iteratively fix runtime errors, if any exist.\n4. (Optional) Iteratively refine the TUI based on self-reflections.\n\nOnce finished, your TUI will be saved to the `~/.termite` directory and automatically started up for you to use.\n\n### Advanced Usage\n\nYou can configure the steps above with the following command-line arguments:\n\n- `--library`: Specify the library Termite should use to build the TUI. Options are: urwid, rich, textual, and curses. Default is urwid.\n- `--refine`: Setting this will improve the output by adding a self-reflection and refinement step to the process.\n- `--refine-iters`: Controls the number of times the TUI should be refined, if `--refine` is enabled. Default is 1.\n- `--fix-iters`: Controls the maximum number of attempts Termite should make at fixing a bug with the TUI. Default is 10.\n\n## Examples\n\n\u003e Built something cool? [Submit a PR](https://github.com/shobrook/termite/pulls) to add your example here.\n\n**\"Make me a simple process monitor\"**\n\n![Process](./assets/process.png)\n\n**\"Help me manage my Git branches (view, create, switch, etc.)\"**\n\n![Git](./assets/git.png)\n\n**\"I need a quick way to test some RegEx patterns\"**\n\n![RegEx](./assets/regex.png)\n\n## Roadmap\n\nThe bottleneck in most code generation pipelines is the verifier. That is, how can we verify that the generated code is what we want? Termite currently does the bare minimum for verification –– we execute the TUI in a pseudo-terminal to detect runtime exceptions. But a TUI can still look or behave improperly even if it runs without errors...\n\nSome ideas:\n\n1. Capture an image of what the TUI looks like and feed it to GPT-4o Vision for evaluation. This could help verify UI correctness.\n2. Use an agent to simulate user actions in the TUI and record the results. This could help verify functionality correctness. But the problem here is some actions in a TUI can be destructive (e.g. killing a process in `htop`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshobrook%2Ftermite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshobrook%2Ftermite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshobrook%2Ftermite/lists"}