{"id":30864969,"url":"https://github.com/ioncakephper/cli-starter","last_synced_at":"2026-02-14T11:02:48.794Z","repository":{"id":309415643,"uuid":"1036213585","full_name":"ioncakephper/cli-starter","owner":"ioncakephper","description":"A robust and testable starter template for building command-line interface (CLI) applications with Node.js and Commander.js, featuring graceful error handling and cross-platform compatibility.","archived":false,"fork":false,"pushed_at":"2025-08-12T20:45:26.000Z","size":238,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-19T11:56:16.576Z","etag":null,"topics":["automation","boilerplate","cli","command-line","commanderjs","github-actions","javascript","jest","nodejs","release-management","starter","template","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ioncakephper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2025-08-11T18:17:45.000Z","updated_at":"2025-08-12T20:45:09.000Z","dependencies_parsed_at":"2025-08-11T20:27:51.579Z","dependency_job_id":"73643948-9e69-4628-b469-1b293e76e10e","html_url":"https://github.com/ioncakephper/cli-starter","commit_stats":null,"previous_names":["ioncakephper/cli-starter"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ioncakephper/cli-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioncakephper%2Fcli-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioncakephper%2Fcli-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioncakephper%2Fcli-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioncakephper%2Fcli-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioncakephper","download_url":"https://codeload.github.com/ioncakephper/cli-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioncakephper%2Fcli-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: 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":["automation","boilerplate","cli","command-line","commanderjs","github-actions","javascript","jest","nodejs","release-management","starter","template","testing"],"created_at":"2025-09-07T20:18:59.603Z","updated_at":"2026-02-14T11:02:48.789Z","avatar_url":"https://github.com/ioncakephper.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI Starter\n\n[![npm version](https://img.shields.io/npm/v/@shytiger/cli-starter.svg)](https://www.npmjs.com/package/@shytiger/cli-starter)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://img.shields.io/badge/build-unknown-lightgrey.svg)](https://github.com/shytiger/cli-starter/actions)\n[![npm downloads](https://img.shields.io/npm/dm/@shytiger/cli-starter.svg)](https://www.npmjs.com/package/@shytiger/cli-starter)\n\nA starter template for building command-line interface (CLI) applications with Node.js and Commander.js.\n\n## Key Features\n\n* **Robust CLI Foundation**: Built with Commander.js for easy command definition, option parsing, and help generation.\n* **Graceful Error Handling**: Safely handles missing `package.json` by providing informative messages and exiting cleanly.\n* **Cross-Platform Compatibility**: Designed to run seamlessly on various operating systems.\n* **Testable Structure**: Includes Jest for unit and integration testing, ensuring reliability.\n\n## Installation\n\nTo use this CLI, first ensure you have Node.js (\u003e=18.0.0) and npm installed.\n\n### Global Installation (Recommended for CLI Tools)\n\nYou can install `@shytiger/cli-starter` globally to use it as a command from anywhere in your terminal. Once installed, `cli-starter` becomes available on your local machine.\n\n```bash\n# Using npm\nnpm install -g @shytiger/cli-starter\n\n# Using yarn\nyarn global add @shytiger/cli-starter\n```\n\nTo verify the installation, you can check the version:\n\n```bash\ncli-starter --version\n```\n\n### Local Installation (for Development or Specific Projects)\n\nIf you prefer to clone the repository and run it locally:\n\n```bash\ngit clone https://github.com/ioncakephper/cli-starter.git\ncd cli-starter\nnpm install\n# Then you can run it using:\nnode bin/cli-starter.js \u003ccommand\u003e\n```\n\n### Using npx (No Installation Required)\n\nYou can also use `npx` to run `@shytiger/cli-starter` without installing it globally. This is convenient for one-off uses or to ensure you're always using the latest version. See the [Usage](#usage) section for examples.\n\n## Usage\n\nOnce installed, you can use `@shytiger/cli-starter` in several ways:\n\n### Global Command\n\n```bash\ncli-starter hello [name]\n# Say hello to someone. If no name is provided, it defaults to \"world\".\n# Output: Hello, world! (if no name)\n# Output: Hello, Alice! (if name is Alice)\n\ncli-starter --version\n# Output: 0.1.0\n\ncli-starter --help\n# Displays help information\n```\n\n### Using npx (No Installation Required)\n\nIf you have `npx` installed (comes with npm 5.2+), you can run the CLI without global installation:\n\n```bash\nnpx @shytiger/cli-starter hello [name]\n# Say hello to someone. If no name is provided, it defaults to \"world\".\n# Output: Hello, world! (if no name)\n# Output: Hello, Bob! (if name is Bob)\n\nnpx @shytiger/cli-starter --version\n# Output: 0.1.0\n\nnpx @shytiger/cli-starter --help\n# Displays help information\n```\n\n### Direct Execution (for Development or Local Clones)\n\nIf you have cloned the repository and installed dependencies locally:\n\n```bash\nnode bin/cli-starter.js hello [name]\n# Output: Hello, world! (if no name)\n# Output: Hello, Alice! (if name is Alice)\n\nnode bin/cli-starter.js --version\n# Output: 0.1.0\n\nnode bin/cli-starter.js --help\n# Displays help information\n```\n\n## CLI Reference\n\nThis section provides a detailed overview of `cli-starter` commands and their available options.\n\n### Global Options\n\nThese options can be used with any command.\n\n* `-V, --version`: Output the current version of the CLI.\n  * **Example**: `cli-starter --version`\n* `-h, --help`: Display help information for the CLI or a specific command.\n  * **Example**: `cli-starter --help`\n  * **Example (for a command)**: `cli-starter hello --help`\n\n### Commands\n\n#### `hello [name]`\n\nSay hello to someone. If no name is provided, it defaults to \"world\".\n\n* **Arguments**:\n  * `[name]` (optional): The name of the person to greet.\n* **Options**:\n  * (No specific options for this command yet)\n* **Examples**:\n  * `cli-starter hello`\n    * Output: `Hello, world!`\n  * `cli-starter hello Alice`\n    * Output: `Hello, Alice!`\n\n#### `init` or `i`\n\nInitialize a new project.\n\n* **Arguments**:\n  * (No specific arguments for this command)\n* **Options**:\n  * `-q, --quick`: Quick initialization without prompts.\n* **Examples**:\n  * `cli-starter init`\n    * Output: `Project initialized!`\n  * `cli-starter i --quick`\n    * Output: `Project initialized!`\n\n## Contributing\n\nWe welcome contributions to `@shytiger/cli-starter`! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started, including our code of conduct.\n\nFor bug reports, feature requests, or general discussions, please visit our [GitHub Issues](https://github.com/ioncakephper/cli-starter/issues) or [GitHub Discussions](https://github.com/ioncakephper/cli-starter/discussions).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**[ioncakephper](https://github.com/ioncakephper)**\n\n## Repository Structure\n\n\u003c!-- doc-gen fileTree maxDepth=5 showSize=true --\u003e\n```\n└── cli-starter/\n    ├── bin/\n    │   └── cli-starter.js (218 B)\n    ├── src/\n    │   ├── commands/\n    │   │   ├── hello.js (293 B)\n    │   │   └── init.js (364 B)\n    │   ├── utils/\n    │   │   ├── applyDescriptionFormatting.js (1.4 KB)\n    │   │   ├── createProgram.js (1.3 KB)\n    │   │   ├── formatDescription.js (640 B)\n    │   │   ├── getPackageJson.js (839 B)\n    │   │   └── loadCommands.js (1.2 KB)\n    │   └── index.js (1 KB)\n    ├── tests/\n    │   ├── utils/\n    │   │   ├── __mocks__/\n    │   │   │   └── commandModule.js (73 B)\n    │   │   ├── applyDescriptionFormatting.test.js (2.8 KB)\n    │   │   ├── createProgram.test.js (2.2 KB)\n    │   │   ├── formatDescription.test.js (1.2 KB)\n    │   │   ├── getPackageJson.test.js (1.8 KB)\n    │   │   └── loadCommands.test.js (1.8 KB)\n    │   └── cli.test.js (3.2 KB)\n    ├── CHANGELOG.md (3.8 KB)\n    ├── CODE_OF_CONDUCT.md (4.8 KB)\n    ├── CONTRIBUTING.md (2.1 KB)\n    ├── index.js (157 B)\n    ├── jest.config.js (99 B)\n    ├── LICENSE (1.1 KB)\n    ├── markdown-magic.config.js (155 B)\n    ├── package-lock.json (148.8 KB)\n    ├── package.json (1.2 KB)\n    └── README.md (6.8 KB)\n```\n\u003c!-- end-doc-gen --\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioncakephper%2Fcli-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fioncakephper%2Fcli-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioncakephper%2Fcli-starter/lists"}