npm package: @jayson991/create-app
Description: A CLI Tool To Create Apps You Want Like create-react-app | @vue/cli | @angular/cli
Author: Jayson Wu
Latest version: 2.0.0

# create-app

> A modern CLI tool to quickly scaffold projects from pre-configured templates, similar to create-react-app, @vue/cli, or @angular/cli

[![npm version](https://img.shields.io/npm/v/@jayson991/create-app.svg)](https://www.npmjs.com/package/@jayson991/create-app)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- Fast project scaffolding with pre-configured templates
- Support for React, Vue 2.x, and Vue 3.x templates
- Easy template management (list, add custom templates)
- Interactive CLI prompts for project configuration
- Built with modern tooling (Vite, TypeScript, Vitest)

## Installation

```bash
npm install -g @jayson991/create-app
```

Or use with npx (no installation required):

```bash
npx @jayson991/create-app init
```

## Quick Start

Initialize a new project:

```bash
create-app init
```

The CLI will guide you through:
1. Project name selection
2. Template selection
3. Project description
4. Author information

## Commands

### Init Project

Initialize a new project from a template:

```bash
create-app init
```

### List Templates

View all available templates:

```bash
create-app list
```

### Add Custom Template

Add your own template to the CLI:

```bash
create-app add
```

You'll be prompted for:
- Template name
- GitHub username
- Description
- Platform (GitHub)
- Branch (main/master)

### Version

Check the installed version:

```bash
create-app -v
# or
create-app --version
```

### Help

Display help information:

```bash
create-app -h
# or
create-app --help
```

### Info

Display project information:

```bash
create-app info
```

## Development

This project uses modern tooling for development:

- **Vite**: Fast build tool for bundling the CLI
- **Vitest**: Fast unit testing framework
- **oxlint**: Fast linter built with Rust
- **TypeScript**: Type-safe development
- **pnpm**: Fast, disk space efficient package manager

### Setup

```bash
# Clone the repository
git clone https://github.com/jaysonwu991/create-app.git
cd create-app

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Run in development mode (watch mode)
pnpm run dev
```

### Available Scripts

```bash
# Build the project
pnpm run build

# Build in watch mode
pnpm run dev

# Lint the code
pnpm run lint

# Lint and fix issues
pnpm run lint:fix

# Format code (dangerous fixes)
pnpm run format

# Type check without emitting files
pnpm run type-check

# Run tests in watch mode
pnpm run test

# Run tests once
pnpm run test:run

# Prepare for publishing (runs type-check, tests, and build)
pnpm run prepublishOnly
```

### Project Structure

```
create-app/
├── src/
│   ├── index.ts              # Main CLI entry point
│   ├── templates.json        # Template definitions
│   └── utils/
│       ├── displayBanner.ts  # Banner display utility
│       └── downloadRepo.ts   # Repository download utility
├── lib/                      # Built output
├── package.json
├── tsconfig.json
├── vite.config.ts           # Build configuration
└── vitest.config.ts         # Test configuration
```

## Available Templates

| Template Name | Description | Framework | Main Language |
| :------------ | :---------- | :-------- | :------------ |
| [react-template](https://github.com/jaysonwu991/react-template) | A React Template Project | React | JavaScript |
| [react-typescript-template](https://github.com/jaysonwu991/react-typescript-template) | A React Typescript Template Project | React | TypeScript |
| [vue2-template](https://github.com/jaysonwu991/vue2-template) | A Vue 2.x Template Project Using Webpack | Vue 2.x | JavaScript (Webpack 5.x) |
| [vue2-library-template](https://github.com/jaysonwu991/vue2-library-template) | A Vue 2.x Library Template Project Using Webpack | Vue 2.x | npm Library |
| [vue3-boilerplate](https://github.com/jaysonwu991/vue3-boilerplate) | A Vue 3.x Boilerplate Project Using Webpack | Vue 3.x | JavaScript (Webpack 5.x) |
| [vue3-library-boilerplate](https://github.com/jaysonwu991/vue3-library-boilerplate) | A Vue 3.x Library Boilerplate Project Using Webpack | Vue 3.x | npm Library |

All templates are production-ready and include:
- Modern build tooling
- ESLint configuration
- Testing setup
- Development server
- Production build optimization

## Requirements

- Node.js >= 18.0.0
- npm, pnpm, or yarn

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

[MIT](https://opensource.org/licenses/MIT)

## Author

**Jayson Wu** - [jaysonwu991@outlook.com](mailto:jaysonwu991@outlook.com)

## Links

- [npm Package](https://www.npmjs.com/package/@jayson991/create-app)
- [GitHub Repository](https://github.com/jaysonwu991/create-app)
- [Issue Tracker](https://github.com/jaysonwu991/create-app/issues)

## Changelog

### v1.2.0
- Updated build configuration to use Vite
- Modernized tooling (oxlint, Vitest)
- Fixed bin entry point to use correct output file
- Added prepublishOnly script for safer publishing
- Improved documentation
- Added engines field for Node.js version requirement
- Enhanced package.json exports configuration

### v1.1.6
- Previous stable release