{"id":17680337,"url":"https://github.com/docelic/term_app","last_synced_at":"2025-08-04T11:35:02.758Z","repository":{"id":66956519,"uuid":"225083550","full_name":"docelic/term_app","owner":"docelic","description":"Functional term/console app environment","archived":false,"fork":false,"pushed_at":"2020-04-12T10:03:19.000Z","size":45,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T23:02:12.448Z","etag":null,"topics":["console","console-application","crystal","crystal-lang","terminal","terminal-based","terminal-graphics","tui"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docelic.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":"2019-11-30T23:40:35.000Z","updated_at":"2022-10-12T23:32:45.000Z","dependencies_parsed_at":"2023-02-28T02:45:37.040Z","dependency_job_id":null,"html_url":"https://github.com/docelic/term_app","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/docelic/term_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docelic%2Fterm_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docelic%2Fterm_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docelic%2Fterm_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docelic%2Fterm_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docelic","download_url":"https://codeload.github.com/docelic/term_app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docelic%2Fterm_app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268689510,"owners_count":24291077,"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-04T02:00:09.867Z","response_time":79,"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":["console","console-application","crystal","crystal-lang","terminal","terminal-based","terminal-graphics","tui"],"created_at":"2024-10-24T09:06:38.872Z","updated_at":"2025-08-04T11:35:02.728Z","avatar_url":"https://github.com/docelic.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/crystallabs/term_app.svg?branch=master)](https://travis-ci.com/crystallabs/term_app)\n[![Version](https://img.shields.io/github/tag/crystallabs/term_app.svg?maxAge=360)](https://github.com/crystallabs/term_app/releases/latest)\n[![License](https://img.shields.io/github/license/crystallabs/term_app.svg)](https://github.com/crystallabs/term_app/blob/master/LICENSE)\n\n# Term_app\n\nTerm_app is a minimal functional term/console app environment for Crystal.\n\nIt is closely related to shards [Terminfo](https://github.com/crystallabs/terminfo) and\n[Tput](https://github.com/crystallabs/tput):\n\nTerminfo parses terminfo files into instances of `Terminfo::Data` or custom classes.\n\nTput uses Terminfo data and additional methods to configure itself for outputting correct terminal sequences.\n\nTerm_app uses Tput and implements a completely usable term/console environment.\nIt sets up event handlers, keys and mouse listeners, and everything else needed to\nprovide a minimal working application.\n\nIt is implemented natively and does not depend on ncurses or other external library.\n\n## Installation\n\nAdd the dependency to `shard.yml`:\n\n```yaml\ndependencies:\n  term_app:\n    github: crystallabs/term_app\n    version: 0.1.2\n```\n\n## Usage in a nutshell\n\nHere is a basic example that starts the application, waits for keypresses or\npasted data, prints the received content, and then sets the cursor at screen\nposition x = 10, y = 10:\n\n```crystal\nrequire \"term_app\"\n\nmy = TermApp::Data.new\n\nmy.input.on(TermApp::DataEvent) { |e|\n  my.tput.print e.data[...e.len]\n  my.tput.sety 10\n  my.tput.setx 10\n}\n\nsleep 10\n```\n\n## API documentation\n\nRun `crystal docs` as usual, then open file `docs/index.html`.\n\nAlso, see examples in the directory `examples/`.\n\n## Testing\n\nRun `crystal spec` as usual.\n\nAlso, see examples in the directory `examples/`.\n\n## Thanks\n\n* All the fine folks on FreeNode IRC channel #crystal-lang and on Crystal's Gitter channel https://gitter.im/crystal-lang/crystal\n\n## Other projects\n\nList of interesting or similar projects in no particular order:\n\n- https://github.com/crystallabs/crysterm - Complete term/console toolkit for Crystal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocelic%2Fterm_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocelic%2Fterm_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocelic%2Fterm_app/lists"}