@chaibuilder/create
Version:
Create a new app with Chai template
53 lines (36 loc) • 1.07 kB
Markdown
# @chaibuilder/create
A professional CLI to bootstrap a new app from ChaiBuilder templates with automated `.env` setup.
**Usage:** Run with npx:
```bash
npx @chaibuilder/create <app-name> -key=<your-api-key>
```
## Features
- Clones a starter [Nextjs repository](https://github.com/chaibuilder/chaibuilder-nextjs)
- Sets up `.env` variables from CLI arguments
- Removes git history for a clean start
- Validates app name
- Checks for existing directory
- Prints *steps to run* for development
## Getting Started
You do **not** need to install this CLI globally. Just use:
```bash
npx @chaibuilder/create <app-name> -key=<your-api-key>
```
Or, if you prefer the scoped package name:
```bash
npx @chaibuilder/create <app-name> -key=<your-api-key>
```
### Example
```bash
npx @chaibuilder/create my-new-app -key=1234
```
This will:
- Scaffold a new project in `my-new-app`
- Set up your `.env` file with the provided variables
- Remove the git history from the template for a clean start
## Requirements
- Node.js >= 14
- npm >= 6 (for npx support)