Skip to content

cwp projects

shipped 1.0.0
cwp projects [flags]

Local only — it acts on no environment.

Plus the shared flags --json, --verbose and --dry-run.

SubcommandWhat it does
cwp projects pathPrint one project’s directory to stdout, for cd "$(cwp projects path <n>)"
cwp projects rmDrop one entry from the registry (the directory is not touched)

What it does

The registry of every cwp project on this machine. cwp init writes to it; this is the half that reads it back.

✓ example.com — /Users/you/Code/example/example.com
✓ atelier-nord — /Users/you/Code/atelier-nord — current
! old-experiment — /Users/you/Code/old-experiment — path no longer exists

This is the one command that works outside a project. “Which projects do I have” is a question you ask from ~, so it never looks for a .cwp.yml around the current directory — it just marks the entry you happen to be standing in.

Stale entries are reported, not hidden

cwp init only ever adds, so a renamed, moved or deleted project leaves an entry pointing nowhere. Each one is resolved and classified:

StatusWhat it meansFix
okthe path exists and holds a valid .cwp.yml
no readable .cwp.ymlthe directory is there but unusablecwp init there
path no longer existsthe entry points at nothingcwp projects rm

The listing still exits 0 with stale entries — it is a listing, not a check. Only an explicitly named unknown project fails, with exit 2 and the names that do exist.

What it does not do

It contacts no remote, changes no working directory, reads or writes no project’s config, and deletes no project.

--dry-run is ignored by the read-only forms, exactly as cwp status ignores it.