Operator CLI for batch owner/account erasure across multiple owners.
Thin wrapper over Rindle.preview_batch_owner_erasure/2 and
Rindle.erase_batch_owner_erasure/2 — no new orchestration logic.
Usage
mix rindle.batch_owner_erasure --owners-file PATH [--dry-run | --no-dry-run | --execute] [--format text|json] [--max-owners N]Options
--owners-file PATH— required JSON file with an array of owner entries--dry-run— explicitly request preview mode (also the default when no destructive flag is given)--no-dry-run— perform destructive batch erasure--execute— alias for destructive batch erasure (same as--no-dry-run)--format—text(default) orjson--max-owners N— per-call owner limit passed to the batch facade
Owners file format
JSON array of objects with string keys owner_type and owner_id:
[
{"owner_type": "Elixir.MyApp.User", "owner_id": "11111111-2222-3333-4444-555555555555"}
]owner_type must be a fully-qualified module name that already exists in the
VM (String.to_existing_atom/1). owner_id must be a valid UUID. Each entry
becomes struct(Module, id: uuid) with no database fetch.
Exit codes
0— batch completed successfully (preview or execute)1— any error, including partial batch failure after printing the partial report
Safety default
Preview (dry-run) unless --no-dry-run or --execute is given. Destructive
batch erasure always requires an explicit opt-in flag.
Examples
# Preview what would be detached/purged (safe default)
mix rindle.batch_owner_erasure --owners-file owners.json
# Explicit preview
mix rindle.batch_owner_erasure --owners-file owners.json --dry-run
# Destructive execute
mix rindle.batch_owner_erasure --owners-file owners.json --execute
# Machine-readable preview report
mix rindle.batch_owner_erasure --owners-file owners.json --format jsonSee also guides/operations.md and guides/user_flows.md for operator workflows.