CLI Reference
Core Commands
zin new <name>: Create a new projectzin add <type> [name]: Add a component to existing projectzin migrate: Run database migrationszin d1:migrate: Run Cloudflare D1 migrationszin config: Manage project configurationzin start: Start the application (dev watch, production, or Wrangler mode)zin debug: Start debug dashboardzin logs: View application logszin fix: Run automated code fixeszin qa: Run full Quality Assurance suitezin --version: Show CLI versionzin --help: Show help for any command
The add Command
The add command is the primary way to scaffold new components.
Usage
bash
zin add <type> [name] [options]Available Types
| Type | Description |
|---|---|
service | Create a new microservice |
feature | Add a new feature module |
model | Create an ORM model |
controller | Create an HTTP controller |
migration | Create a database migration |
routes | Create a new route file |
factory | Create a model factory for tests |
seeder | Create a database seeder |
requestfactory | Create a service request factory |
responsefactory | Create a mock response factory |
workflow | Create GitHub Actions deployment workflows |
Workflow Options
When adding a workflow, you can specify the platform:
bash
zin add workflow --platform lambdaSupported platforms: lambda, fargate, cloudflare, deno, all.
Database Commands
zin migrate: Run all pending migrationszin migrate:rollback: Rollback the last migration batchzin migrate:fresh: Drop all tables and re-run all migrationszin seed: Run database seeders
Plugin Commands
zin plugin list(alias:zin p -l): List available pluginszin plugin install <id>(alias:zin p -i): Install a pluginzin plugin uninstall <id>(alias:zin p -u): Uninstall a plugin
Configuration Commands
zin key:generate: Generate and set the application keyzin key:generate --show: Display the key without modifying .envzin config list: List all configuration valueszin config get <key>: Get a specific configuration valuezin config set <key> <value>: Set a configuration valuezin config reset: Reset configuration to defaultszin config edit: Open configuration in default editorzin config export <file>: Export configuration to a file
Quality & Maintenance
zin fix: Run automated code fixes (ESLint, Prettier)zin fix --dry-run: Show what would be fixed without applying changeszin qa: Run full QA suite (Lint, Type-check, Test, Sonar)zin qa --no-sonar: Skip SonarQube analysis during QAzin qa --report: Generate and open HTML QA report
Cloudflare D1 Commands
zin d1:migrate: Run Cloudflare D1 migrationszin d1:migrate --local: Run migrations against local D1 databasezin d1:migrate --remote: Run migrations against remote D1 database
Start Command
Usage:
bash
zin start [options]Options:
-w, --wrangler- Start with Wrangler dev mode (Cloudflare Workers)--watch- Force watch mode (Node only)--no-watch- Disable watch mode (Node only)--mode <development|production|testing>- Override app mode--runtime <nodejs|cloudflare|lambda|deno|auto>- SetRUNTIMEfor spawned Node process--port <number>- Override server port
Examples:
bash
zin start
zin start --mode production
zin start -w
zin start --no-watch --port 3001