A starter kit generator for CLI applications. This tool helps you quickly scaffold a new command-line interface application with configurations.
- Generates a complete CLI application structure
- Sets up testing with Jest
- Configures ESLint for code quality
- Initializes Git repository
- Sets up Command parsing with Commander.js
- User input handling with Inquirer
# Install globally
npm install -g @richardgaunt/cli-template
# Or use directly with npx
npx @richardgaunt/cli-template my-cli-app
# For development
git clone <repository-url>
cd cli-maker
npm install
npm link# Create a new CLI application with interactive prompts
create-cli my-cli-app
# Skip prompts and use defaults
create-cli my-cli-app --yes
# Skip git initialization
create-cli my-cli-app --no-git
# Skip dependency installation
create-cli my-cli-app --no-install[name]- Project directory/package name (optional)-y, --yes- Skip all prompts and use defaults--no-git- Skip git initialization--no-install- Skip dependency installation
When creating a new CLI application, you'll be asked for:
- Package/directory name: The npm package name and directory name (lowercase with hyphens)
- Human-readable title: A prettier title for display in README and CLI output
- Project description: A brief description of what your CLI does
- Author: Your name (defaults to Git config)
- License: The license to use (MIT, ISC, Apache-2.0, GPL-3.0)
my-cli-app/
├── bin/
│ └── index.mjs # CLI entry point
├── src/
│ ├── index.mjs # Main module exports
│ └── index.test.js # Tests for main module
├── tests/
│ └── index.test.mjs # Additional tests
├── .gitignore
├── eslint.config.mjs
├── jest.config.mjs
├── package.json
└── README.md
# Clone this repository
git clone <repository-url>
cd cli-maker
# Install dependencies
npm install
# Link the package locally for testing
npm link
# Run the CLI
create-cli test-app
# Run tests
npm test
# Run specific test suites
npm run test:timing
npm run test:errors
npm run test:features
npm run test:all
# Run linting
npm run lintMIT © Richard Gaunt