Modern CLI for scaffolding CxJS applications
npm install cx-clibash
npm install -g cx-cli
`
Or use with npx (no installation required):
`bash
npx cx-cli create my-app
`
Usage
$3
Interactive mode:
`bash
cx create
`
With options:
`bash
cx create my-app --template basic
`
Skip dependency installation:
`bash
cx create my-app --no-install
`
Dry run (see what would be created):
`bash
cx create my-app --dry-run
`
$3
- basic - Basic CxJS application template
- tailwind - CxJS with Tailwind CSS styling
- codesandbox - CodeSandbox compatible template
- material-sidebar - Material Design with sidebar navigation
- phone-dark - Mobile-optimized with dark theme
Command Options
`
cx create [name] [options]
Options:
-t, --template Template to use
--dry-run Show what would be created without creating files
-i, --install Install dependencies after creation
--no-install Skip installing dependencies
-h, --help Display help for command
`
Requirements
- Node.js >= 18.0.0
Development
`bash
Install dependencies
yarn install
Build the CLI
yarn build
Run in development mode
yarn dev
Test locally
node dist/cli.js create test-app
`
Architecture
The CLI downloads templates directly from GitHub repositories, ensuring you always get the latest version. Templates are extracted and customized with your project name.
`
cx-cli/
āāā src/
ā āāā cli.ts # Entry point & command definitions
ā āāā commands/
ā ā āāā create.ts # Project creation with interactive prompts
ā ā āāā upgrade.ts # CxJS upgrade command
ā āāā types/
ā ā āāā templates.ts # TypeScript interfaces
ā āāā utils/
ā āāā templates.ts # Download & extraction utilities
āāā app-templates.json # Template configuration
``