{"id":50704311,"url":"https://github.com/nberlette/tui","last_synced_at":"2026-06-09T10:32:01.157Z","repository":{"id":339037243,"uuid":"996965277","full_name":"nberlette/tui","owner":"nberlette","description":"Lightweight cross-runtime framework for building reactive Terminal User Interfaces (TUI) in TypeScript.","archived":false,"fork":false,"pushed_at":"2026-03-12T00:43:40.000Z","size":1119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-12T06:25:51.521Z","etag":null,"topics":["ansi","bun","cli","deno","framework","nodejs","reactive","reactivity","terminal","terminal-app","terminal-ui","tui","tui-library","typescript"],"latest_commit_sha":null,"homepage":"https://jsr.io/@nick/tui/doc","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nberlette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"nberlette"}},"created_at":"2025-06-05T18:28:41.000Z","updated_at":"2026-03-12T00:43:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nberlette/tui","commit_stats":null,"previous_names":["nberlette/tui"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nberlette/tui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Ftui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Ftui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Ftui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Ftui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nberlette","download_url":"https://codeload.github.com/nberlette/tui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Ftui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34103355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["ansi","bun","cli","deno","framework","nodejs","reactive","reactivity","terminal","terminal-app","terminal-ui","tui","tui-library","typescript"],"created_at":"2026-06-09T10:32:00.378Z","updated_at":"2026-06-09T10:32:01.147Z","avatar_url":"https://github.com/nberlette.png","language":"TypeScript","funding_links":["https://ko-fi.com/nberlette"],"categories":[],"sub_categories":[],"readme":"# ⌨️ Tui\n\n\u003cimg src=\"https://raw.githubusercontent.com/Im-Beast/deno_tui/main/docs/logo-transparent.png\" align=\"right\" width=\"250\" height=\"250\" alt=\"Deno mascot made as ASCII art\" /\u003e\n\n[![Deno](https://github.com/Im-Beast/deno_tui/actions/workflows/deno.yml/badge.svg)](https://github.com/Im-Beast/deno_tui/actions/workflows/deno.yml)\n[![Deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https://deno.land/x/tui/mod.ts)\n\nSimple [Deno](https://github.com/denoland/deno/) module that allows easy\ncreation of\n[Terminal User Interfaces](https://en.wikipedia.org/wiki/Text-based_user_interface).\n\n### 🔩 Features\n\n- 🔰 Ease of use\n- 👁️‍🗨️ Reactivity\n- 🖇️ No dependencies\n- 📄 Decent documentation\n- [📦 Multiple ready-to-use components](./src/components/)\n- 🎨 Styling framework agnostic\n  - This means you can use whatever terminal styling module you want\n  - [🖍️ Crayon](https://github.com/crayon-js/crayon) is recommended _but not\n    imposed_ as it greatly integrates with Tui\n- 🪶 Relatively lightweight\n\n## 🖥️ OS Support\n\n| Operating system     | Linux | macOS | Windows¹ | WSL  |\n| -------------------- | ----- | ----- | -------- | ---- |\n| Base                 | ✔️    | ✔️    | ✔️       | ✔️   |\n| Keyboard support     | ✔️    | ✔️    | ✔️       | ✔️   |\n| Mouse support        | ✔️    | ✔️    | ✔️       | ✔️   |\n| Required permissions | none  | none  | none     | none |\n\n¹ - If unicode characters are displayed incorrectly type `chcp 65001` into the\nconsole to change active console code page to use UTF-8 encoding.\n\n## 🎓 Get started\n\n#### Replace {version} with relevant module versions\n\n1. Create Tui instance\n\n```ts\nimport { crayon } from \"https://deno.land/x/crayon@$MODULE_VERSION/mod.ts\";\nimport { Canvas, Tui } from \"https://deno.land/x/tui@$MODULE_VERSION/mod.ts\";\n\nconst tui = new Tui({\n  style: crayon.bgBlack, // Make background black\n  refreshRate: 1000 / 60, // Run in 60FPS\n});\n\ntui.dispatch(); // Close Tui on CTRL+C\n```\n\n2. Enable interaction using keyboard and mouse\n\n```ts\nimport { handleInput, handleKeyboardControls, handleMouseControls } from \"https://deno.land/x/tui@$MODULE_VERSION/mod.ts\";\n...\n\nhandleInput(tui);\nhandleMouseControls(tui);\nhandleKeyboardControls(tui);\n```\n\n3. Add some components\n\n```ts\nimport { Button } from \"https://deno.land/x/tui@$MODULE_VERSION/src/components/mod.ts\";\nimport { Signal, Computed } from \"https://deno.land/x/tui@$MODULE_VERSION/mod.ts\";\n\n...\n\n// Create signal to make number automatically reactive\nconst number = new Signal(0);\n\nconst button = new Button({\n  parent: tui,\n  zIndex: 0,\n  label: {\n    text: new Computed(() =\u003e number.value.toString()), // cast number to string\n  },\n  theme: {\n    base: crayon.bgRed,\n    focused: crayon.bgLightRed,\n    active: crayon.bgYellow,\n  },\n  rectangle: {\n    column: 1,\n    row: 1,\n    height: 5,\n    width: 10,\n  },\n});\n\n  // If button is active (pressed) make number bigger by one\nbutton.state.when(\"active\", (state) =\u003e {\n  ++number.value;\n});\n\n// Listen to mousePress event\nbutton.on(\"mousePress\", ({ drag, movementX, movementY }) =\u003e {\n  if (!drag) return;\n\n  // Use peek() to get signal's value when it happens outside of Signal/Computed/Effect\n  const rectangle = button.rectangle.peek();\n  // Move button by how much mouse has moved while dragging it\n  rectangle.column += movementX;\n  rectangle.row += movementY;\n});\n```\n\n4. Run Tui\n\n```ts\n...\n\ntui.run();\n```\n\n## 🤝 Contributing\n\n**Tui** is open for any contributions.\n\u003cbr /\u003e If you feel like you can enhance this project - please open an issue\nand/or pull request.\n\u003cbr /\u003e Code should be well document and easy to follow what's going on.\n\nThis project follows\n[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) spec.\n\u003cbr /\u003e If your pull request's code can be hard to understand, please add\ncomments to it.\n\n## 📝 Licensing\n\nThis project is available under **MIT** License conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnberlette%2Ftui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnberlette%2Ftui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnberlette%2Ftui/lists"}