{"id":24736512,"url":"https://github.com/phukon/setup-cli-app","last_synced_at":"2026-04-29T11:03:45.929Z","repository":{"id":225412363,"uuid":"765917241","full_name":"phukon/setup-cli-app","owner":"phukon","description":"📦The easiest way to start a modern cli application with best practices and DX in mind.","archived":false,"fork":false,"pushed_at":"2024-04-02T00:37:19.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T15:52:30.382Z","etag":null,"topics":["cli","developer-experience","developer-tool","scaffold"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/setup-cli-app","language":"TypeScript","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/phukon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["phukon"],"buy_me_a_coffee":"phukon"}},"created_at":"2024-03-01T21:55:27.000Z","updated_at":"2024-04-02T07:36:08.000Z","dependencies_parsed_at":"2025-03-22T17:29:23.680Z","dependency_job_id":"b6486b06-8579-4208-8c24-42ec284695ab","html_url":"https://github.com/phukon/setup-cli-app","commit_stats":null,"previous_names":["phukon/create-cli-app","phukon/setup-cli-app"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/phukon/setup-cli-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fsetup-cli-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fsetup-cli-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fsetup-cli-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fsetup-cli-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phukon","download_url":"https://codeload.github.com/phukon/setup-cli-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phukon%2Fsetup-cli-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"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":["cli","developer-experience","developer-tool","scaffold"],"created_at":"2025-01-27T21:26:02.196Z","updated_at":"2026-04-29T11:03:45.913Z","avatar_url":"https://github.com/phukon.png","language":"TypeScript","funding_links":["https://github.com/sponsors/phukon","https://buymeacoffee.com/phukon"],"categories":[],"sub_categories":[],"readme":"\u003c!--\r\n\u003cdiv\r\n  style={{\r\n    display: 'flex',\r\n    height: '100%',\r\n    width: '100%',\r\n    alignItems: 'center',\r\n    justifyContent: 'center',\r\n    flexDirection: 'column',\r\n    backgroundImage: 'linear-gradient(to bottom, #dbf4ff, #fff1f1)',\r\n    fontSize: 60,\r\n    letterSpacing: -2,\r\n    fontWeight: 700,\r\n    textAlign: 'center',\r\n  }}\r\n\u003e\r\n  \u003cspan style={{ fontSize: '100px' }}\u003e🎈\u003c/span\u003e {/* Increased font size for the emoji */}\r\n  \u003cdiv\u003e\r\n    setup-cli-app\r\n  \u003c/div\u003e\r\n\u003c/div\u003e\r\n--\u003e\r\n\u003ca href=\"https://github.com/phukon/setup-cli-app\"\u003e\r\n  \u003cimg src=\"https://github.com/phukon/setup-cli-app/assets/60285613/e5269230-ad4a-42fd-89dd-c59cc949008b\"/\u003e\r\n\u003c/a\u003e\r\n\r\n\r\n\u003ch2 align=\"center\"\u003e📦 Setup CLI App\u003c/h2\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n    The easiest way to set up a modern CLI app by running one command.\r\n    \u003cbr /\u003e\r\n    \u003ca href=\"#features\"\u003e\u003cstrong\u003eFeatures\u003c/strong\u003e\u003c/a\u003e ·\r\n    \u003ca href=\"#%EF%B8%8F-usage\"\u003e\u003cstrong\u003eUsage\u003c/strong\u003e\u003c/a\u003e ·\r\n    \u003ca href=\"#commands\"\u003e\u003cstrong\u003eCommands\u003c/strong\u003e\u003c/a\u003e ·\r\n\u003c/p\u003e\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://github.com/phukon/setup-cli-app/blob/main/LICENSE\"\u003e\r\n   \u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/phukon/setup-cli-app\"\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cbr/\u003e\r\n\r\nThe easiest way to start a modern cli app. It supercharges your development workflow, allowing you to quickly scaffold resources for your cli application with best practices in mind.\r\n\r\n## Features\r\n\r\n- **Efficient CLI Setup**: Start building your CLI app within minutes with a well-structured template and easy-to-use commands.\r\n- **Scoped Debug Logs**: Debug logs are scoped to their names: bin, config:mgr and commands:start.\r\n- **Modular Architecture**: Built with a modular architecture, allowing for easy customization and extension as your project grows.\r\n- **Configuration Management**: Manage your application configurations effortlessly. Customize your app's behavior by modifying the configuration settings.\r\n- **Error Handling**: Robust error handling mechanisms ensure smooth execution and graceful recovery from unexpected errors.\r\n- **Build scripts**: Integrated build scripts for easy development workflow management.\r\n  - `clean`: Removes the 'dist' directory.\r\n  - `prebuild`: Executes 'clean' script before the build.\r\n  - `build`: Builds the application using 'tsup'.\r\n  - `preversion`: Executes 'build' script before versioning.\r\n  - `postversion`: Pushes tags to the repository after versioning.\r\n\r\n## 🏎️ Usage\r\n\r\n1. Run \u003ckbd\u003enpx setup-cli-app init\u003c/kbd\u003e. Follow the instructions. This scaffolds your project.\r\n2. Set your config and schema at src/config. (check schema.json)\u003cbr/\u003e\r\nUpon building this TypeScript project, priority is given to configurations specified within the `package.json` file. Consequently, removing configurations from `package.json` will prompt the tool to adopt the new settings from the \u003ckbd\u003etool.config.js\u003c/kbd\u003e file.\r\n\r\n\u003e It looks for a config file in the dir of the user who installs/uses it.\r\n```\r\n{\r\n  // Default configuration\r\n  \"properties\": {\r\n    \"port\": {\r\n      \"type\": \"number\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nTherefore, the user, who installs or utilizes the CLI tool, must include the following property within their `package.json`:\r\n\r\n```\r\n// package.json\r\n\"tool\": {\r\n  \"port\": 9999\r\n}\r\n```\r\n\r\nIn the event that it is not specified in `package.json`, the user must provide a separate file named \u003ckbd\u003etool.config.js\u003c/kbd\u003e.\r\n\r\n3. To see debug logs. Set a `DEBUG` environment variable.\r\n4. On bumping the package version. The project is build automatically and tags are pushed to remote repo.\u003cbr/\u003eOr build manually with `pnpm build`\r\n5. Run with args `setup-cli-app --start`.\r\n\r\n## Commands\r\n\r\nAll commands are run from the root of the project, from a terminal:\r\n\r\n| Command        | Action                |\r\n| :------------- | :-------------------- |\r\n| `pnpm install` | Installs dependencies |\r\n\r\n\r\n**Under the Hood:**\r\n\r\n- **`arg`:** Handles command-line arguments intuitively.\r\n- **`cosmiconfig`:** Simplifies configuration management from various sources, including the current directory, user's home directory, and project-specific locations.\r\n- **`Ajv`:** Ensures robust data validation with JSON schema support.\r\n- **`better-ajv-errors`:** Provides clear and actionable error messages when encountering configuration issues.\r\n- **`chalk`:** Enhances the user experience with colorful command-line output.\r\n- **`tsup`:** Efficient and fast TypeScript module bundler for building your CLI app.\r\n- **`rimraf`:** Cross-platform utility to remove files and directories, commonly used for cleaning build artifacts before rebuilding.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphukon%2Fsetup-cli-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphukon%2Fsetup-cli-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphukon%2Fsetup-cli-app/lists"}