{"id":49223294,"url":"https://github.com/mistralys/cli-menu","last_synced_at":"2026-04-24T05:04:22.579Z","repository":{"id":351523287,"uuid":"1211235893","full_name":"Mistralys/cli-menu","owner":"Mistralys","description":"CLI menu library for building interactive menus based on node.","archived":false,"fork":false,"pushed_at":"2026-04-15T10:09:35.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T12:13:12.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/Mistralys.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T07:36:53.000Z","updated_at":"2026-04-15T07:36:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Mistralys/cli-menu","commit_stats":null,"previous_names":["mistralys/cli-menu"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Mistralys/cli-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fcli-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fcli-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fcli-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fcli-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mistralys","download_url":"https://codeload.github.com/Mistralys/cli-menu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mistralys%2Fcli-menu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32209897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-24T05:04:01.783Z","updated_at":"2026-04-24T05:04:22.573Z","avatar_url":"https://github.com/Mistralys.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI Menu\n\n[![CI](https://github.com/Mistralys/cli-menu/actions/workflows/ci.yml/badge.svg)](https://github.com/Mistralys/cli-menu/actions/workflows/ci.yml)\n\nZero-dependency TypeScript library for building interactive CLI menus.\n\n## What it does\n\nCLI Menu turns a list of typed command definitions into a fully-wired CLI tool —\nan interactive keypress-driven TUI for human use *and* a direct dispatch path for scripting,\nall from a single `createMenu()` call. No dependencies, no framework, no boilerplate.\n\n## Features\n\n- **Interactive TUI menu** — keypress navigation with categories, labels, and descriptions\n- **Direct command dispatch** — invoke any command by name from the shell (`node cli.js build`)\n- **Auto-generated help** — `--help` renders a formatted reference from your command definitions\n- **Setup wizard** — guided multi-step environment setup via `--setup`\n- **Pre-flight checks** — validate the environment at startup before anything runs\n- **Script runners** — synchronous and async child-process helpers with cross-platform defaults\n- **Changelog utilities** — read versions from changelog files, `package.json`, or `pyproject.toml`\n- **Terminal color helpers** — composable ANSI color wrappers, no external packages needed\n- **Zero runtime dependencies** — only Node.js built-ins\n\n## Requirements\n\n- Node.js ≥ 18.0.0\n\n## Quick Start\n\n```bash\nnpm install @mistralys/cli-menu\n```\n\nDefine your commands and hand the result to `process.exit()`:\n\n```ts\nimport { createMenu } from '@mistralys/cli-menu';\n\nconst menu = createMenu({\n  name:          'My CLI',\n  banner:        ['=== My CLI Tool ==='],\n  version:       '1.0.0',\n  workspaceRoot: import.meta.dirname,\n  commands: [\n    {\n      id:          'build',\n      key:         'b',\n      label:       'Build',\n      category:    'Dev',\n      description: 'Compile the project',\n      run:         async (_args) =\u003e { /* … */ },\n    },\n  ],\n});\n\nprocess.exit(await menu.run(process.argv.slice(2)));\n```\n\nRun it interactively:\n\n```\nnode cli.js\n```\n\nOr dispatch a command directly:\n\n```\nnode cli.js build\nnode cli.js --help\n```\n\nThe library **never** calls `process.exit()` itself. `menu.run()` resolves to a numeric exit\ncode — `0` on success, non-zero on failure — so you stay in control.\n\n## Sub-path Exports\n\nThe package ships two sub-paths:\n\n| Import | Contents |\n|--------|----------|\n| `@mistralys/cli-menu` | Core library — `createMenu`, runners, colors, preflight, etc. |\n| `@mistralys/cli-menu/changelog` | Changelog and version reading utilities |\n\nThe changelog utilities are in a separate sub-path so consumers who don't need them pay zero\nimport cost.\n\n```ts\nimport { readChangelogVersion } from '@mistralys/cli-menu/changelog';\n```\n\n## Learn More\n\n| Resource | Description |\n|----------|-------------|\n| [Configuration Reference](docs/configuration.md) | All `MenuConfig`, `Command`, and `SetupComponent` properties with examples |\n| [Changelog Utilities](docs/changelog-utilities.md) | Reading versions from changelogs, `package.json`, and `pyproject.toml` |\n| [CHANGELOG.md](CHANGELOG.md) | Version history |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistralys%2Fcli-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmistralys%2Fcli-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistralys%2Fcli-menu/lists"}