Skip to main content
Version: 0.0.5

Destroy a workspace

graft destroy tears down graft's managed state for the current workspace. Your provider agent files (.claude/, .codex/, .cursor/, etc.) are never touched.

What it removes

By default, graft destroy removes:

  • The .graft/ directory (config, db artifacts, lock).
  • The workspace row and all associated run, branch, and agent rows from the global sqlite database.
  • The workspace lock file.

Provider files are always preserved.

How to use

Interactive (prompts for confirmation):

graft destroy

Non-interactive (CI / scripted):

graft destroy --yes
graft destroy --ci

Keep the canonical store (.graft/agents/) but drop everything else:

graft destroy --keep-store

With --keep-store, the canonical agent.yaml and instructions.md files survive. You can re-initialize the workspace later with graft init and the store will be picked up again.

Flags

FlagTypeDefaultDescription
--yesboolfalseSkip the confirmation prompt.
--ciboolfalseNon-interactive (alias for --yes).
--keep-storeboolfalseRetain .graft/agents/ (canonical store).
-o, --outputstringtableOutput format: json, yaml, or table.

After destroying

To reinitialize graft in the same directory:

graft init

If you used --keep-store, existing canonical agents will be detected and can be synced out again.