CanxJS provides a powerful CLI to help you scaffold, develop, and maintain your applications.
Create and run your first CanxJS application in seconds.
# Create a new projectbunx create-canx my-app# Navigate to projectcd my-app# Install dependenciesbun install# Start development serverbun run dev
$ bunx create-canx my-appCreate a new CanxJS project with the default MVC template
$ bunx create-canx my-app --apiCreate an API-only project without views
$ bunx create-canx my-app --microCreate a minimal microservice setup
$ bunx create-canx my-app --tsCreate project with strict TypeScript configuration
$ bun run devStart development server with hot reload
$ bun run buildBuild for production
$ bun run startStart production server
$ bun run lintRun ESLint on your codebase
$ bun run canx tinkerInteract with your application in REPL mode
$ bun run migrateRun pending migrations
$ bun run migrate:rollbackRollback the last batch of migrations
$ bun run migrate:freshDrop all tables and re-run all migrations
$ bun run canx seedRun database seeders
$ bun run make:migration create_usersCreate a new migration file
$ bun run make:seeder UserSeederCreate a new seeder file
$ bun run make:controller UserControllerCreate a new controller
$ bun run make:model UserCreate a new model
$ bun run make:middleware AuthCreate a new middleware
$ bun run canx make:microservice PaymentServiceGenerate a new microservice boilerplate
$ bun run canx make:cqrs-command CreateOrderGenerate a new CQRS Command and Handler
$ bun run canx cache:clearClear application cache
$ bun run canx optimizeOptimize framework for production (clear caches, etc)
$ bun run canx schedule:runRun scheduled tasks manually
$ bun run canx routesList all registered routes
$ bun run canx envDisplay current environment configuration
The CLI generators create boilerplate code for you, following CanxJS conventions.
# Create a controllerbun run make:controller UserController# Creates: src/controllers/UserController.ts# With basic CRUD methods: index, show, store, update, destroy