CLI reference

Every Ghostrow command and its options: seed, haunt, twin, activate, deactivate and status.

Global options

OptionMeaning
--db <url>Connect to a database (Postgres, MySQL, SQLite or SQL Server URL)
--schema <file>Read a schema file or ORM models instead of a live database
--code <dir>Also read application code for validation rules (Pro and Max)
--rules <file>Rules file to read and update. Default: ghostrow.rules.yaml
--seed <n>Random seed. The same seed gives the same output
--quiet, --jsonLess output, or machine-readable output

ghostrow seed

Generates consistent data.

OptionMeaning
--rows <n>Rows for the largest table; others scale with their relations
--table <name=n>Rows for a specific table. Repeat for more tables
--out <dir>Write files instead of inserting
--format csv|sql|jsonFile format for --out. Default: csv
--dry-runShow inferred meanings and rules without writing rows

ghostrow haunt (Pro, Max)

Generates edge-case rows and, with --tests, runs your test command and reports which rows broke which tests.

OptionMeaning
--tests "<cmd>"Test command to run, for example "npm test"
--cases <n>Maximum number of edge-case rows. Default: 300
--report <file>Where to write the report. Default: haunt-report.json

ghostrow twin (Max)

Measures a database you point it at, on your machine, and generates a synthetic copy with the same shape. It never copies a real row.

OptionMeaning
--from <url>Database to measure (read-only access is enough)
--to <url> or --out <dir>Where to write the synthetic copy
--scale <factor>Make the copy larger or smaller, for example 0.1

License commands

CommandMeaning
ghostrow activate <key>Activate this machine for your license
ghostrow deactivateFree this machine so you can use the seat elsewhere
ghostrow statusShow the plan, seat, machines used and updates end date

Exit codes

CodeMeaning
0Success
1Invalid input or configuration
2A constraint could not be satisfied; see the message
3haunt --tests found failing tests
4License problem (not activated, limit reached, expired activation)