{"repo":"privatenumber/cleye","free":true,"listed":false,"github":"https://github.com/privatenumber/cleye","clone":"git clone https://github.com/privatenumber/cleye.git","description":"👁‍🗨 Strongly typed CLI development for Node.js","language":"TypeScript","stars":688,"topics":["cli","node","typescript","parameters","argv","typed","flags","commandline-interface","commandline-parser"],"license":"MIT","category":"cli-tools","readme_excerpt":"cleye The intuitive command-line interface (CLI) development tool. Features - Minimal API surface - Powerful flag parsing - Strongly typed parameters and flags - Command support - Help documentation generation (customizable too!) → Try it out online Already a sponsor? Join the discussion in the Development repo ! Install About Cleye makes it very easy to develop command-line scripts in Node.js. It handles argv parsing to give you strongly typed parameters + flags and generates --help documentation based on the provided information. Here's an example script that simply logs: Good morning/evening ! : greet.js: 🛠 In development, type hints are provided on parsed flags and parameters: Type hints for Cleye's output are very verbose and readable 📖 Generated help documentation can be viewed with the --help flag: ✅ Run the script to see it in action: Examples Want to dive right into some code? Check out some of these examples: - greet.js : Working example from above - npm install : Reimplementation of npm install 's CLI - tsc : Reimplementation of TypeScript tsc 's CLI - snap-tweet : Reimplementation of snap-tweet 's CLI - pkg-size : Reimplementation of pkg-size 's CLI Usage Arguments Arguments are values passed into the script that are not associated with any flags/options. For example, in the following command, the first argument is file-a.txt and the second is file-b.txt : Arguments can be accessed from the array-property of the returned object. Example: Parameters Parameters (a","default_branch":null,"files":null,"tree":[],"storefront":"/r/privatenumber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/privatenumber/cleye/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}