{"id":34787333,"url":"https://github.com/erf/termio","last_synced_at":"2026-02-16T01:05:31.689Z","repository":{"id":69768370,"uuid":"253294219","full_name":"erf/termio","owner":"erf","description":"A minimal lib for console apps in Dart.","archived":false,"fork":false,"pushed_at":"2025-12-22T20:24:58.000Z","size":106,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-24T09:50:01.891Z","etag":null,"topics":["cli","console","dart","terminal","vt100"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/erf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-05T17:38:17.000Z","updated_at":"2025-12-22T20:25:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5619d86-c1d2-47e1-8f34-5b6175c4a4d0","html_url":"https://github.com/erf/termio","commit_stats":null,"previous_names":["erf/termio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erf/termio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Ftermio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Ftermio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Ftermio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Ftermio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erf","download_url":"https://codeload.github.com/erf/termio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Ftermio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28025577,"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-12-25T02:00:05.988Z","response_time":58,"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":["cli","console","dart","terminal","vt100"],"created_at":"2025-12-25T09:31:30.758Z","updated_at":"2025-12-25T09:31:31.424Z","avatar_url":"https://github.com/erf.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# termio\n\nA minimal library for building interactive terminal applications in Dart.\n\nNo dependencies. Just pure Dart.\n\n## Installation\n\n```sh\ndart pub add termio\n```\n\n## Usage\n\n```dart\nimport 'dart:io';\nimport 'package:termio/termio.dart';\n\nvoid main() {\n  final terminal = Terminal();\n  terminal.rawMode = true;\n  terminal.write(Ansi.cursorVisible(false));\n  terminal.write(Ansi.clearScreen());\n\n  // Colors: enum, 256-palette index, or RGB\n  terminal.write(Ansi.fg(Color.cyan));\n  terminal.write(Ansi.fgIndex(208));\n  terminal.write(Ansi.fgRgb(255, 128, 0));\n\n  terminal.write(Ansi.bold());\n  terminal.write('Hello, Terminal! Press q to quit.');\n  terminal.write(Ansi.reset());\n\n  terminal.input.listen((codes) {\n    final str = String.fromCharCodes(codes);\n    if (str == 'q') {\n      terminal.write(Ansi.cursorVisible(true));\n      terminal.write(Ansi.reset());\n      terminal.write(Ansi.clearScreen());\n      terminal.rawMode = false;\n      exit(0);\n    } else if (str == Keys.arrowUp) {\n      terminal.write('\\nUp arrow pressed!');\n    }\n  });\n\n  terminal.resize.listen((_) {\n    terminal.write('Resized: ${terminal.width}x${terminal.height}');\n  });\n}\n```\n\n## Features\n\n- **Ansi** - Escape codes for cursor, colors, text styles, and terminal modes\n- **Terminal** - Raw mode, terminal size, input stream, resize events\n- **Keys** - Constants for keyboard input (arrows, function keys, ctrl combinations)\n- **Color** - 16 standard colors, 256-color palette, and 24-bit RGB\n- **ThemeDetector** - Detect terminal background color for automatic light/dark theme selection\n\n## Examples\n\nSee the `example/` folder for complete examples:\n\n- **sweep** - Minesweeper game\n- **snake** - Classic snake game\n- **life** - Conway's Game of Life\n- **simple** - Minimal centered text example\n- **colors** - 256-color palette display\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Ftermio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferf%2Ftermio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Ftermio/lists"}