@woodman231/create-typescript-cli
v2.2.1
Published
Create a new TypeScript CLI application
Maintainers
Readme
@woodman231/create-typescript-cli
A template generator for creating modern TypeScript CLI applications with best practices built-in.
Usage
npm create @woodman231/typescript-cli my-new-appOr with other package managers:
# With yarn
yarn create @woodman231/typescript-cli my-new-app
# With pnpm
pnpm create @woodman231/typescript-cli my-new-app
# With bun
bun create @woodman231/typescript-cli my-new-appWhat's Included
The generated project includes:
- ✅ TypeScript with strict configuration
- ✅ ESLint for code quality
- ✅ Commander.js for CLI argument parsing
- ✅ Modern ES modules support
- ✅ Development scripts (dev, build, lint)
- ✅ Proper package.json configuration for CLI apps
- ✅ Git ready with .gitignore
- ✅ README with documentation
Project Structure
my-new-app/
├── src/
│ └── index.ts # Main CLI entry point
├── package.json # Package configuration
├── tsconfig.json # TypeScript configuration
├── .eslintrc.json # ESLint configuration
├── .gitignore # Git ignore patterns
└── README.md # Project documentationInteractive Setup
The generator will prompt you for:
- Project name: The name of your CLI application
- Description: A brief description of what your CLI does
- Author: Your name
- Command name: The CLI command users will type (defaults to project name)
After Creation
- Navigate to your project:
cd my-new-app - Install dependencies:
npm install - Start development:
npm run dev - Edit
src/index.tsto implement your CLI logic
Development Scripts
npm run dev- Run in development mode with hot reloadnpm run build- Build for productionnpm run lint- Check code qualitynpm run lint:fix- Fix linting issuesnpm start- Run the built version
Example CLI
The generated CLI includes a complete example with:
- Command-line argument parsing
- Options and flags
- Help documentation
- Version command
- TypeScript types
Contributing
Issues and pull requests are welcome! Visit the repository to contribute.
License
MIT
