{"id":50638085,"url":"https://github.com/Chemaclass/phel-cli-gui","last_synced_at":"2026-06-24T01:01:07.600Z","repository":{"id":37576870,"uuid":"502235888","full_name":"Chemaclass/phel-cli-gui","owner":"Chemaclass","description":"Some Phel functions to render in the terminal. It uses the Cursor from the Symfony Command module.","archived":false,"fork":false,"pushed_at":"2026-06-14T15:43:35.000Z","size":199,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-14T16:36:24.450Z","etag":null,"topics":["cli","phel","php","terminal"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/chemaclass/phel-cli-gui","language":"PHP","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/Chemaclass.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":"2022-06-11T03:02:04.000Z","updated_at":"2026-06-14T15:43:38.000Z","dependencies_parsed_at":"2023-02-15T15:31:50.703Z","dependency_job_id":"bec74a14-7712-4562-8248-08e6f2d907e2","html_url":"https://github.com/Chemaclass/phel-cli-gui","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":"0.40384615384615385","last_synced_commit":"b3c8aad63b296ecc85e3acba3665976c21237de9"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":"phel-lang/phel-scaffolding","purl":"pkg:github/Chemaclass/phel-cli-gui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-cli-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-cli-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-cli-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-cli-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chemaclass","download_url":"https://codeload.github.com/Chemaclass/phel-cli-gui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-cli-gui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34712578,"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-23T02:00:07.161Z","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":["cli","phel","php","terminal"],"created_at":"2026-06-07T05:00:23.532Z","updated_at":"2026-06-24T01:01:07.575Z","avatar_url":"https://github.com/Chemaclass.png","language":"PHP","funding_links":[],"categories":["Packages \u0026 Libraries"],"sub_categories":["CLI"],"readme":"# Phel CLI GUI\n\nBuild rich terminal interfaces in [Phel](https://phel-lang.org/) — render text\nat arbitrary coordinates, draw framed boxes, paint regions, read raw keypresses,\nand style output with named formatters.\n\nPowered by Symfony's [Console Cursor](https://symfony.com/doc/current/console/coloring.html),\nexposed behind a small, data-first Phel API.\n\n- Works with any TTY (ANSI-capable).\n- Zero globals — one managed `TerminalGui` singleton per process.\n- Pure helpers (`parse-key`) are easy to test without a real terminal.\n- Diff rendering writes only the cells that changed each frame — see [docs/api.md](docs/api.md#diff-rendering).\n\n## Requirements\n\n- PHP 8.4+\n- `ext-pcntl`, `ext-posix`, `ext-readline`\n- Phel `^0.44`\n\n## Install\n\n```bash\ncomposer require chemaclass/phel-cli-gui\n```\n\nRequire the namespace in your Phel file:\n\n```phel\n(ns my-app.main\n  (:require phel-cli-gui.terminal-gui :refer [render read-key draw-box clear-screen]))\n```\n\n## Quick start\n\nDraw a bordered box, render text inside it, wait for a key, quit.\n\n```phel\n(ns my-app.hello\n  (:require phel-cli-gui.terminal-gui\n            :refer [clear-screen draw-box render read-key cleanup-gui]))\n\n(defn main []\n  (clear-screen)\n  (draw-box {:x 2 :y 1 :width 30 :height 5 :fill-char \\space})\n  (render 4 3 \"Press any key to exit\")\n  (loop []\n    (if (read-key)\n      (cleanup-gui)\n      (do (php/usleep 10000) (recur)))))\n\n(main)\n```\n\nRun:\n\n```bash\nvendor/bin/phel run src/phel/hello.phel\n```\n\n## Docs\n\n- [API reference](docs/api.md) — every public function, grouped by concern.\n- [Recipes](docs/recipes.md) — copy-paste patterns (diff loop, bordered UI, …).\n\n## Example projects\n\n- [phel-snake](https://github.com/Chemaclass/phel-snake) — classic Snake built with this library.\n\n## Development\n\n```bash\ncomposer install\ncomposer test     # Phel tests + PHPUnit (test:phel / test:php to scope)\ncomposer format   # phel format\n```\n\nLayout: `src/phel/` public API · `src/php/` rendering core (Symfony Console\nwrapper + pure helpers) · `tests/` Phel, PHPUnit \u0026 bashunit suites · `tools/`\nrelease automation.\n\nCut a release with `tools/release.sh \u003cversion\u003e` (add `--dry-run` to preview) —\nit gates, rolls the CHANGELOG, tags, pushes, and publishes the GitHub release.\n\nAI-assistant config is managed with [agnostic-ai](https://github.com/Chemaclass/agnostic-ai):\nedit the source under `.agnostic-ai/`, run `agnostic-ai sync`; the per-tool\nfiles (`CLAUDE.md`, `.claude/…`) are generated and git-ignored.\n\n## License\n\nMIT © [Jose M Valera Reales](https://chemaclass.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChemaclass%2Fphel-cli-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChemaclass%2Fphel-cli-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChemaclass%2Fphel-cli-gui/lists"}