Skip to content

cwp projects

shipped 1.0.0
cwp projects [flags]

Local only: it acts on no environment.

FlagWhat it doesDefault
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

Plus the shared flags --json, -v, --verbose, -q, --quiet 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

cwp projects lists 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. You ask “which projects do I have” from ~. So the command never looks for a cwp.yml around the current directory. It marks the entry you happen to be standing in.

The listing reports stale entries rather than hiding them

cwp init only ever adds, so a renamed, moved or deleted project leaves an entry pointing nowhere. The listing resolves and classifies each one:

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 unknown project you name 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.

The read-only forms ignore --dry-run, exactly as cwp status ignores it.