cwp projects
shipped 1.0.0cwp projects [flags]
Local only: it acts on no environment.
| Flag | What it does | Default |
|---|---|---|
--with-agent | with —dry-run on a host with no shell: install and remove the PHP agent so the plan is real | off |
Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.
| Subcommand | What it does |
|---|---|
cwp projects path | Print one project’s directory to stdout, for cd "$(cwp projects path <n>)" |
cwp projects rm | Drop 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:
| Status | What it means | Fix |
|---|---|---|
| ok | the path exists and holds a valid cwp.yml | — |
no readable cwp.yml | the directory is there but unusable | cwp init there |
path no longer exists | the entry points at nothing | cwp 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.