create-chai-app
v1.0.5
Published
Create a new app with Chai template
Downloads
15
Readme
create-chai-app
A professional CLI to bootstrap a new app from ChaiBuilder templates with .env setup.
Features
- Clones a starter repository
- Sets up
.envvariables - Removes git history for a clean start
- Shows next steps for development
Usage
You do not need to install this CLI globally. Just use:
npx create-chai-app <app-name> [ENV_VARS...]Or, if using the scoped package:
npx @chaibuilder/create-app <app-name> [ENV_VARS...]Example
npx create-chai-app my-new-app API_KEY=12345 NODE_ENV=developmentThis will:
- Scaffold a new project in
my-new-app - Set up your
.envfile with the provided variables - Remove the git history from the template for a clean start
Requirements
- Node.js >= 14
- npm >= 6 (for npx support)
Publishing
If you are the maintainer:
- Bump the version in
package.json - Run
npm publish --access public
Example
npx create-chai-app my-app API_KEY=abc123 NODE_ENV=developmentFeatures
- Validates app name
- Checks for existing directory
- Shows colored output and spinners
- Creates .env file from CLI args
- Removes .git for a fresh start
- Clear error handling and user guidance
After publishing, users can run:
npx create-chai-app my-app API_KEY=abc123 NODE_ENV=developmentPublishing Steps
- Update your npm credentials:
npm login - Publish the package:
npm publish --access public - Test:
npx create-chai-app my-app
