CLI Reference
Complete reference for all Yama CLI commands.
Project Commands
yama create
Create a new Yama project.
yama create <project-name> [options]Alias: yama new
Options:
| Option | Description |
|---|---|
--database <type> | Database type: postgresql, pglite, none |
-y, --yes | Skip prompts and use defaults |
--template <name> | Project template to use |
Examples:
yama create my-api
yama create my-api --database postgresql
yama create my-api -yyama dev
Start the development server with hot reload.
yama dev [options]Options:
| Option | Description |
|---|---|
-p, --port <port> | Server port (default: 4000) |
--host <host> | Server host (default: localhost) |
--no-watch | Disable file watching |
--config <path> | Path to config file |
--env <environment> | Environment to use |
--generate | Auto-generate on startup |
Examples:
yama dev
yama dev --port 3000
yama dev --env stagingyama start
Start the production server.
yama start [options]Options:
| Option | Description |
|---|---|
-p, --port <port> | Server port |
--config <path> | Path to config file |
yama build
Build the application for production.
yama build [options]Code Generation
yama generate
Generate TypeScript types and SDK from your configuration.
yama generate [options]Alias: yama gen
Options:
| Option | Description |
|---|---|
--types-only | Generate types only |
--sdk-only | Generate SDK only |
--watch | Watch for changes |
--framework <name> | Target framework: react, nextjs, node |
--output <dir> | Output directory |
Examples:
yama generate
yama generate --types-only
yama generate --watchyama docs
Generate API documentation.
yama docs [options]Options:
| Option | Description |
|---|---|
--format <type> | Output format: openapi, markdown |
--output <path> | Output file path |
Examples:
yama docs --format openapi --output openapi.json
yama docs --format markdown --output API.mdSchema & Migrations
yama schema:generate
Generate a new migration from schema changes.
yama schema:generate [options]Options:
| Option | Description |
|---|---|
--name <name> | Migration name (required) |
--env <environment> | Target environment |
Example:
yama schema:generate --name add_users_tableyama schema:apply
Apply pending migrations to the database.
yama schema:apply [options]Options:
| Option | Description |
|---|---|
--env <environment> | Target environment |
--force | Skip confirmation prompts |
--dry-run | Show what would be applied |
Examples:
yama schema:apply
yama schema:apply --env production
yama schema:apply --dry-runyama schema:status
Check migration status.
yama schema:status [options]Options:
| Option | Description |
|---|---|
--env <environment> | Target environment |
yama schema:history
View migration history.
yama schema:history [options]yama schema:rollback
Roll back migrations.
yama schema:rollback [options]Options:
| Option | Description |
|---|---|
--steps <n> | Number of migrations to roll back |
--env <environment> | Target environment |
yama schema:check
Check if database is in sync with schema.
yama schema:check [options]yama schema:scaffold
Scaffold common schema changes.
yama schema:scaffold <action> [args]Actions:
| Action | Description |
|---|---|
add-table <name> | Add a new table |
add-column <table> <column> | Add a column to a table |
add-index <table> <column> | Add an index |
Examples:
yama schema:scaffold add-table posts
yama schema:scaffold add-column users avatar_urlDatabase Commands
yama db list
List database tables.
yama db list [options]yama db inspect
Inspect a tableās schema and data.
yama db inspect <table> [options]Options:
| Option | Description |
|---|---|
--limit <n> | Number of rows to show |
Validation
yama validate
Validate your configuration file.
yama validate [options]Options:
| Option | Description |
|---|---|
--strict | Enable strict validation |
--config <path> | Path to config file |
yama endpoints
List all defined endpoints.
yama endpointsyama schemas
List all defined schemas.
yama schemasPlugin Commands
yama plugin list
List installed plugins.
yama plugin listyama plugin install
Install a plugin.
yama plugin install <name>yama plugin validate
Validate plugin configuration.
yama plugin validateUtility Commands
yama config
Show current configuration.
yama config [options]Options:
| Option | Description |
|---|---|
--env <environment> | Target environment |
yama add
Add resources to your project.
yama add:endpoint
yama add:schema
yama add:entity
yama add:pluginGlobal Options
These options work with all commands:
| Option | Description |
|---|---|
--help | Show help for a command |
--version | Show CLI version |
--debug | Enable debug output |
--quiet | Suppress output |