safeslice

CLI reference

Every Safeslice command and flag, for scripting and continuous integration.

The wizard is for humans. These are for pipelines.

CommandPurpose
safesliceThe guided workflow
safeslice initRead the schema, generate a reviewable safeslice.yaml
safeslice planShow what a run would do — reads no table data
safeslice runExtract, mask in transit, load into a target or write SQL
safeslice verifyAudit a database for surviving personal data
safeslice reportShow and open the last run’s report
safeslice demoStart or stop the throwaway demo database
safeslice profilesList saved profiles, or past runs with --history
safeslice connectionsList saved connections

Global flags

FlagEffect
-c, --configConfig file. Defaults to ./safeslice.yaml when present
--schemaSchema to include, repeatable; overrides the config
--no-colorDisable colour and box drawing
-q, --quietSuppress the banner and footer
-v, --verboseShow the full log instead of the progress display
--no-openNever open the generated report in a browser

run

safeslice run --config safeslice.yaml --to "$DATABASE_URL"
FlagEffect
--fromSource connection string, or SAFESLICE_SOURCE / DATABASE_URL
--toTarget connection string to load into
--outWrite SQL to a file instead of loading. - means stdout
--tableRoot table to slice from
--whereSQL predicate applied to the root table
--limitMaximum root rows
--child-depthLevels of child rows to follow
--child-limitCap on child rows pulled per batch. Default 100,000
--keysKey-set file to keep, which enables resume
--seedMasking seed
--reportDirectory for the generated artifacts
--no-reportSkip generating artifacts
-i, --interactiveAsk for anything missing instead of failing

verify

safeslice verify --target "$DATABASE_URL"
FlagEffect
--targetDatabase to scan
--sampleRows to examine per column. Default 1,000
--ignoreColumns 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"
FlagEffect
--fromSource connection string
-o, --outFile to write. Default safeslice.yaml
--tableRoot table. Defaults to the most referenced table
--forceOverwrite an existing file