# summary

Remove orphan files from the Cursor canvas cache.

# description

Finds files in `~/.cursor/projects/<slug>/canvases/` that have no matching source canvas in the repo and removes them. Prompts for confirmation unless `--yes` is supplied or stdout is non-TTY.

# flags.path.summary

Target repository path (default: git root of current directory).

# flags.yes.summary

Skip confirmation prompt and remove orphans immediately.

# examples

- Remove orphans interactively:

  <%= config.bin %> <%= command.id %>

- Remove orphans without prompting:

  <%= config.bin %> <%= command.id %> --yes

# info.none

No orphan canvas files found in cache.

# info.removed

Removed %s orphan(s) from cache.

# prompt.confirm

Remove %s orphan(s) from %s? This cannot be undone.

# error.noCacheDir

No Cursor canvas cache for this project. Expected: %s. Open a .canvas.tsx in Cursor first.

# error.noSources

No .canvas.tsx files found in %s. Searched: docs/canvases, canvases, src/canvases.
