Skip to content
Quickstart

CLI commands

Brume exposes a small set of subcommands. All of them read the same .env and brume.yml from the current working directory.

Available on every subcommand:

FlagEffect
-v · --verboseDEBUG logs on stderr
-q · --quietERROR-level logs only (the final report is always visible on stdout)
--jsonMachine-readable output on stdout, JSON logs on stderr
-h · --helpShow help for the command

Read-only audit. Estimates row volumes, walks foreign keys up to fk_depth, and lists columns that look like PII but aren’t covered by any rule.

Terminal window
brume plan

Output:

  • A volumetric summary per table (rows extracted, rows traversed via FK).
  • A list of uncovered columns (heuristically detected: email, phone, *_name, address, iban, …).
  • A list of validation warnings (nullable mismatches, missing types, etc.).

Always run plan before execute. It doesn’t open a write connection on the target.

Runs the full pipeline — extraction, transformation, write — but the write goes to a NullSink. Catches configuration errors that plan can’t (invalid JSONB paths, type/strategy mismatches, FK resolution failures).

Terminal window
brume dry-run

Use it as the final config validation before execute.

Runs the actual pseudonymization. Reads from the source, transforms, writes to the target (database or .sql file depending on .env).

Terminal window
brume execute

Exits with a per-table summary and total wall-time.

Measures residual re-identification risk on a pseudonymized dataset using k-anonymity (Sweeney 2002). See the dedicated page for details: k-Anonymity audit.

Terminal window
brume audit --anonymity \
--quasi-id "users:birth_date,zip_code,gender" \
--report-format markdown
FlagRequiredDescription
--quasi-id "table:col1,col2,…"yesDeclares the quasi-identifier columns to test. Repeat for multiple tables.
--report-format markdown|jsonnoOutput format. Default: markdown.
--report-out PATHnoWrite the report to a file instead of stdout.

Self-diagnostic. Verifies that the environment is sane: pg_dump is on PATH, secrets are loaded, source and target are reachable.

Terminal window
brume diag

Useful as the first command after installing Brume on a new machine, and as a CI gate before running execute.

CodeMeaning
0Success
1Configuration error (invalid brume.yml, missing .env variable)
2Runtime error (connection refused, query failed, write failed)
3Validation failure (uncovered PII column with --strict, k-anonymity threshold breached)

These are stable across versions and safe to use in CI gates.