CLI reference
Every Safeslice command and flag, for scripting and continuous integration.
The wizard is for humans. These are for pipelines.
| Command | Purpose |
|---|
safeslice | The guided workflow |
safeslice init | Read the schema, generate a reviewable safeslice.yaml |
safeslice plan | Show what a run would do — reads no table data |
safeslice run | Extract, mask in transit, load into a target or write SQL |
safeslice verify | Audit a database for surviving personal data |
safeslice report | Show and open the last run’s report |
safeslice demo | Start or stop the throwaway demo database |
safeslice profiles | List saved profiles, or past runs with --history |
safeslice connections | List saved connections |
Global flags
| Flag | Effect |
|---|
-c, --config | Config file. Defaults to ./safeslice.yaml when present |
--schema | Schema to include, repeatable; overrides the config |
--no-color | Disable colour and box drawing |
-q, --quiet | Suppress the banner and footer |
-v, --verbose | Show the full log instead of the progress display |
--no-open | Never open the generated report in a browser |
run
safeslice run --config safeslice.yaml --to "$DATABASE_URL"
| Flag | Effect |
|---|
--from | Source connection string, or SAFESLICE_SOURCE / DATABASE_URL |
--to | Target connection string to load into |
--out | Write SQL to a file instead of loading. - means stdout |
--table | Root table to slice from |
--where | SQL predicate applied to the root table |
--limit | Maximum root rows |
--child-depth | Levels of child rows to follow |
--child-limit | Cap on child rows pulled per batch. Default 100,000 |
--keys | Key-set file to keep, which enables resume |
--seed | Masking seed |
--report | Directory for the generated artifacts |
--no-report | Skip generating artifacts |
-i, --interactive | Ask for anything missing instead of failing |
verify
safeslice verify --target "$DATABASE_URL"
| Flag | Effect |
|---|
--target | Database to scan |
--sample | Rows to examine per column. Default 1,000 |
--ignore | Columns to skip, as table.column, repeatable |
Exits non-zero when it finds anything, so it gates a pipeline as-is.
plan
Shows the tables, the traversal order and the masking rules that would apply. It reads pg_catalog and nothing else — no table data is touched, so it is safe to run against production while you are still deciding.
init
safeslice init --from "$PROD_URL"
| Flag | Effect |
|---|
--from | Source connection string |
-o, --out | File to write. Default safeslice.yaml |
--table | Root table. Defaults to the most referenced table |
--force | Overwrite an existing file |