CLI Reference¶
Commands¶
kiln init¶
Create kiln.yaml interactively. Asks for database driver, DSN, output directory, and API base path.
kiln generate¶
Generate your API from the database schema. Reads kiln.yaml, introspects the database via bob, and writes generated code.
kiln generate
kiln generate --table users # only regenerate one table
kiln generate --no-bob # skip schema reading, use existing models
kiln generate --force # overwrite files even if manually edited
| Flag | Effect |
|---|---|
--table X |
Only regenerate a specific table |
--no-bob |
Skip schema introspection, use existing bob models |
--force |
Overwrite user-modified files |
kiln diff¶
Preview what would be generated without writing any files.
kiln doctor¶
Check project health without modifying any files. Validates config, schema, generated file integrity, and overrides.
Reports: - Config validity (driver, output dir) - Schema tables and M2M relationships - Generated file status (in sync, user-modified, or stale) - Override table names that don't match the schema - Go module presence
kiln introspect¶
Print the parsed schema IR (useful for debugging).
kiln version¶
Print the kiln version.
Global Flags¶
| Flag | Effect |
|---|---|
--config path/to/kiln.yaml |
Use a custom config file (default: kiln.yaml) |