Skip to main content

crewship nuke

The nuke group is the single home for workspace teardown. Each subcommand maps to exactly one server capability, so there’s one CLI command per endpoint.
Everything targets the active workspace (from crewship login / --workspace). All subcommands are destructive and admin-only (OWNER/ADMIN).

Subcommands

nuke runtimes never removes cached devcontainer images (crewship-cache:<hash>). A reseed reuses them instead of forcing a rebuild — teardown is fast and leaves the image cache warm.

Why a full teardown needs all four

Deleting a crew is a soft-delete of its database row. On its own that leaves two kinds of orphan behind:
  • Inbox items and escalationsinbox_items has no cascade from the per-entity deletes, and escalations carries a workspace_id but no foreign key, so neither is cleared by a data-only wipe. The accumulated failed-run notifications a broken scheduled routine piles up live here.
  • Docker containers and volumes — crew soft-delete never touches docker, so the agent container and its home/crew volumes survive.
nuke all clears all of them. The crew-scoped pieces (escalations, runtimes) run before the crew rows are deleted, since they need the crews to still exist.

Confirmation

The two full-DB wipes — nuke all and nuke data — use the typed-slug gate: they print a blast-radius summary and require you to type the workspace slug exactly (or pass --yes for CI). A non-interactive session refuses to run without --yes. The narrower purges — nuke inbox, nuke escalations, nuke runtimes — use a lighter gate: they require --yes and refuse to run non-interactively without it.
--yes removes the only interactive safety on the most destructive commands in the CLI. Reserve it for automation against throwaway/dev instances; never wire it into a script that could point at a real workspace.

Flags

Relationship to seed --nuke

crewship seed --nuke is an alias for nuke all followed by a reseed — it calls the same orchestrator. Use seed --nuke when you want a fresh demo workspace; use the nuke subcommands when you only want to tear something down (or clear a single surface) without reseeding.