CLI Reference
Run dbsprout --help for the live command list, or dbsprout <command> --help for any command’s options.
Global Options
| Flag | Description |
|---|---|
--verbose, -v | Show full tracebacks on error |
--install-completion | Install shell completion |
--show-completion | Print shell completion script |
--help | Show help for any command |
dbsprout init
Introspect a database schema and generate configuration.
| Option | Description |
|---|---|
--db | Database URL (env: DBSPROUT_TARGET_DB) |
--file | Schema file (.sql, .dbml, .mmd, .puml, .prisma) |
--django | Introspect Django models |
--django-apps | Comma-separated Django app labels to include |
--output-dir, -o | Output directory (default: .) |
--dry-run | Preview without writing files |
dbsprout generate
Generate seed data from the schema snapshot.
| Option | Description | Default |
|---|---|---|
--rows, -n | Rows per table (≥ 1) | 100 |
--seed, -s | Deterministic seed (≥ 0) | 42 |
--output-format, -f | sql, csv, json, jsonl, direct | sql |
--output-dir, -o | Output directory | ./seeds |
--dialect, -d | SQL dialect | postgresql |
--engine, -e | heuristic, spec, statistical, finetuned | heuristic |
--privacy | Privacy tier (local, redacted, cloud) | local |
--reference-data | Reference CSV (file or per-table dir) for --engine statistical | — |
--db | Target DB URL for direct insertion (env: DBSPROUT_TARGET_DB) | — |
--upsert | Emit insert-or-update SQL | false |
--insert-method | Direct insertion: auto, copy, load_data, batch | auto |
--file | Schema file for --incremental | — |
--incremental | Apply only schema-diff-driven updates to existing seed data | false |
--snapshot | Base snapshot hash prefix | latest |
--lora | Path to a .gguf LoRA adapter (requires --engine spec) | — |
--schema-snapshot | Explicit schema snapshot path | — |
--config | Explicit config path | — |
dbsprout validate
Validate integrity of generated seed data.
| Option | Description | Default |
|---|---|---|
--rows, -n | Rows per table | 100 |
--seed, -s | Seed | 42 |
--engine, -e | Generation engine to validate | heuristic |
--format, -f | rich, json | rich |
--reference-data | Reference CSV for fidelity comparison | — |
--detection | Run C2ST detection metrics | false |
--output | Write JSON output to file | — |
--compact | Minified JSON output | false |
dbsprout diff
Report schema changes since the last snapshot.
| Option | Description | Default |
|---|---|---|
--db | Database URL (env: DBSPROUT_TARGET_DB) | — |
--file, -f | Schema file (SQL/DBML/Mermaid/PlantUML/Prisma) | — |
--snapshot | Base snapshot hash prefix | latest |
--format | rich, json | rich |
--output-dir, -o | Project root containing .dbsprout/ | . |
dbsprout report
Generate an HTML report from recorded generation runs — no regeneration.
| Option | Description | Default |
|---|---|---|
--output, -o | Report destination path | ./seeds/report.html |
--run-id | Render a specific historical run id | most recent |
dbsprout audit
Show the LLM interaction audit log.
dbsprout audit # All audit entries
dbsprout audit --last 10 # 10 most recent entries
dbsprout doctor
Diagnose the local environment for common configuration issues (Python version, drivers, models, disk space, secrets, plugins, training accelerator).
| Option | Description | Default |
|---|---|---|
--db | Database URL to test (env: DBSPROUT_TARGET_DB) | — |
--config | Config file to scan for secrets | dbsprout.toml |
dbsprout models
List, download, and inspect embedded GGUF models.
dbsprout models list # Registry + locally installed models
dbsprout models info <model-id> # Details for one registry model
dbsprout models download <model-id> # Download into .dbsprout/models/base/
dbsprout plugins
Inspect discovered DBSprout plugins.
dbsprout plugins list # Discovered plugins by entry-point group
dbsprout plugins check <group>:<name> # Validate a plugin loads and conforms
dbsprout train
QLoRA fine-tuning pipeline. Subcommands run the stages individually; the top-level command runs them end to end.
| Option | Description | Default |
|---|---|---|
--db | Live database URL to sample (env: DBSPROUT_TARGET_DB) | — |
--sample-rows | Rows to sample (≥ 1) | 1000 |
--epochs | Training epochs | — |
--output, -o | Base directory for artifacts | .dbsprout |
--seed | Sampling seed | 0 |
--no-pii-redaction | Disable PII redaction before serialization | false |
--quiet | Suppress progress output | false |
| Subcommand | Description |
|---|---|
extract | Extract a stratified sample from a live DB into Parquet |
serialize | Serialize Parquet samples into GReaT-style JSONL |
run | Fine-tune a QLoRA adapter on a serialized corpus |