{"repo":"vadimdemedes/pastel","free":true,"listed":false,"github":"https://github.com/vadimdemedes/pastel","clone":"git clone https://github.com/vadimdemedes/pastel.git","description":"🎨 Next.js-like framework for CLIs made with Ink","language":"TypeScript","stars":2407,"topics":["ink","cli","command-line","react"],"license":"MIT","category":"cli-tools","readme_excerpt":"Pastel Next.js-like framework for CLIs made with Ink. Features - Create files in commands folder to add commands. - Create folders in commands to add subcommands. - Define options and arguments via Zod. - Full type-safety of options and arguments thanks to Zod. - Auto-generated help message for commands, options and arguments. - Uses battle-tested Commander package under the hood. Install Getting started Use create-pastel-app to quickly scaffold a Pastel app with TypeScript, linter and tests set up. Manual setup 1. Set up a new project. 2. Install Pastel and TypeScript. 3. Create a tsconfig.json file to set up TypeScript. 4. Create a source folder for the source code. 5. Create a source/cli.ts file with the following code, which will be CLI's entrypoint: 6. Create source/commands folder for defining CLI's commands. 7. Create an source/commands/index.tsx file for a default command, with the following code: 8. Build your CLI. 9. Set up an executable file. 9.1. Add bin field to package.json , which points to the compiled version of source/cli.ts file. 9.2. Make your CLI available globally. 10. Run your CLI. Table of contents - Commands - Index commands - Default commands - Subcommands - Aliases - Options - Types - String - Number - Boolean - Enum - Array - Set - Optional or required options - Default value - Alias - Arguments - Types - String - Number - Enum - Custom app - Custom program name - Custom description - Custom version - API Commands Pastel treats every file in the co","default_branch":null,"files":null,"tree":[],"storefront":"/r/vadimdemedes","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vadimdemedes/pastel/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."}