chainsaw org

Manage the active organization (delete with safety gate)

Manage the active organization (delete with safety gate)

SubcommandWhat it does
chainsaw org deleteDelete the active organization (requires simulate-then-confirm)
chainsaw org [command]

Aliases: organization

Manage the active organization.

The only verb today is delete — purges the org and every artifact that belongs to it (packages, repos, audit rows, exceptions, policies, SSO providers, members, blob store). Deletion runs behind a simulate-then-confirm safety gate (the W0 contract): you must first preview the inventory with --dry-run, then re-submit the returned simulate_id with --confirm within 5 minutes. If the inventory has shifted in that window the confirm is refused with CHW-4928 and you must re-preview.

chainsaw org delete

Delete the active organization (requires simulate-then-confirm)

chainsaw org delete [flags]

Delete the active organization.

This is a hard delete — every artifact owned by the org is purged (packages, repos, audit rows, exceptions, policies, SSO providers, members, blob store). To prevent fat-finger destruction the operation runs behind a two-step safety gate:

  1. chainsaw org delete --dry-run Walks the cascade tables and returns a simulate_id plus a snapshot of everything that would be destroyed.

  2. chainsaw org delete --simulate-id <id> --confirm Re-walks the inventory and compares against the snapshot. If anything has changed the delete is refused (CHW-4928) and you must re-preview. If unchanged the org is purged.

The simulate_id is short-lived (5 minutes) and kind-tagged: a simulate_id minted for any other action will be refused with CHW-4929.

Flags

FlagTypeDefaultDescription
--confirmbool—Commit the delete. Requires –simulate-id from a recent –dry-run.
--dry-runbool—Preview the inventory that would be destroyed; mint a simulate_id (does not delete).
--jsonbool—Emit machine-readable JSON instead of pretty-printed output.
--simulate-idstring—Confirm a previously previewed delete. Pair with –confirm to commit, omit –confirm to re-diff only.
--slugstring—Org slug OR org id to delete. Resolved against the orgs this account can see; defaults to the org_id from config (–org flag or ‘chainsaw auth login’).
--yesbool—Skip the interactive y/N prompt. Required for non-TTY runs.

The global flags apply here too.