Complete command reference and common recipes for apm-overlay.
- All commands accept
-g/--globalto operate on user scope (~/.apm/). Without it, they operate on the current working directory (project scope). - All mutating commands accept:
--dry-run— print the resolvedapmcommand without executing.-v/--verbose— echo the resolvedapmcommand before executing.
- Overlay names are directory names under
$APM_OVERLAYS_DIR(default~/.apm/overlays/).
Show available overlays. No flags.
$ apm-overlay list
Overlays in /Users/me/src/imenkov/apm-overlay/overlays:
automation — Automation plugins from the awesome-copilot marketplace
docs-design — Documentation writing, designing, and brainstorming technical solutions plugins from the awesome-copilot marketplacePrint the overlay's apm.yml (useful when authoring or auditing).
$ apm-overlay show automation
name: automation
...
dependencies:
apm:
- github/awesome-copilot/plugins/automate-this
- ChromeDevTools/chrome-devtools-mcp
- github/awesome-copilot/plugins/testing-automation
mcp: []Show which overlays are currently applied, along with the exact packages each overlay added.
- With no flag, lists both project and global scopes (global overlays are always active in every project).
- With
-g, restricts output to the global scope only.
$ apm-overlay status -g
Active overlays at global (~/.apm/):
automation (applied 2026-06-02T12:39:48+00:00)
+ apm: github/awesome-copilot/plugins/automate-this
+ apm: ChromeDevTools/chrome-devtools-mcp
+ apm: github/awesome-copilot/plugins/testing-automationIf nothing is active at a given scope you get (no overlays active at ...).
Apply an overlay. Behavior:
- Reads
<APM_OVERLAYS_DIR>/<name>/apm.yml. - Refuses if
<name>is already active at the chosen scope. - Computes
to_install = overlay.deps − active.deps(set difference). - Runs
apm install [-g] [--target <target>] <to_install...>(single invocation; one lockfile update). - On success, records the additions in the state file.
# preview
apm-overlay install automation -g --target copilot --dry-run
# real run, with the underlying command echoed
apm-overlay install automation -g --target copilot -vIf every overlay package is already in the baseline, no apm install is run,
but an empty state entry is recorded so uninstall is a clean no-op.
Remove an overlay. Behavior:
- Refuses if the overlay is not active at the chosen scope.
- Computes
to_remove = state[name].added − ⋃(other_active.added)— any package still claimed by another active overlay is kept. - Runs
apm uninstall [-g] [--target <target>] <to_remove...>. - On success, drops the state entry.
# preview
apm-overlay uninstall automation -g --target copilot --dry-run
# real run
apm-overlay uninstall automation -g --target copilot -vWhen packages are skipped because another overlay still claims them, the tool prints them so you know nothing was missed.
apm-overlay install adr-tools -g
# ... do the task ...
apm-overlay uninstall adr-tools -gapm-overlay install adr-tools -g
apm-overlay install security-review -g
apm-overlay status -g # both listed
apm-overlay uninstall security-review -g # only its packages removed
apm-overlay status -g # adr-tools still activeIf two overlays share a package, it stays until all claiming overlays are uninstalled.
cd path/to/my-project # must have an apm.yml
apm-overlay install code-review
# project apm.yml now includes the overlay's packages
apm-overlay status # shows project-scope state + global overlays
apm-overlay uninstall code-reviewProject-scope state lives at <project>/apm.overlays.json — add it to your
project's .gitignore if you don't want to commit it.
cd "$APM_OVERLAYS_DIR"
apm plugin init my-task -y --target copilot
cd my-task
$EDITOR apm.yml # add packages under dependencies.apm
# optionally test the overlay as a standalone apm project:
apm install --dry-run
# then publish via your overlay library repo (git push, etc.)apm-overlay status -g # overlay contributions only
cat ~/.apm/apm.yml # full baseline + overlay state from apm's POVapm-overlay uninstall my-task -g
$EDITOR "$APM_OVERLAYS_DIR/my-task/apm.yml"
apm-overlay install my-task -g(There is no --force re-apply in v1 by design — see
architecture.md.)
| Variable | Purpose | Default |
|---|---|---|
APM_OVERLAYS_DIR |
Where to find overlay subdirectories | ~/.apm/overlays/ |
Set it in your shell rc, e.g.:
export APM_OVERLAYS_DIR="$HOME/src/imenkov/apm-overlay/overlays"| Code | Meaning |
|---|---|
| 0 | Success (including successful --dry-run) |
| 1 | Click usage error (bad flag, missing argument, etc.) |
| 1 | ClickException raised by the tool (missing overlay, already active, etc.) — message printed to stderr |
| ≠0 | apm itself failed; state file is left untouched |
APM_OVERLAYS_DIR is unset and ~/.apm/overlays/ does not exist. Either set
the env var or mkdir -p ~/.apm/overlays.
The directory <APM_OVERLAYS_DIR>/<x>/ either does not exist or has no
apm.yml. Run apm-overlay list to see what's available.
You tried to install an overlay that's already recorded as active at the
chosen scope. Either apm-overlay status to confirm, or apm-overlay uninstall <x> first.
You tried to uninstall an overlay that's not in the state file. Probably the
wrong scope flag (-g) or the state file was cleared. apm-overlay status
to see what's actually tracked.
The tool will print the error and refuse to update the state file. Once you
fix the underlying problem (network, auth, conflicting version, etc.),
re-run apm-overlay install <name> — it is safe to retry.
Corrupt state file /Users/.../overlays.state.json: ...
Delete the file. You lose overlay tracking (so future uninstall won't know
what to remove), but apm's own state — apm.yml, lockfile, modules,
deployed primitives — is untouched. You can manually inspect apm.yml and
apm uninstall what shouldn't be there.
That's an apm limitation, not this tool's. apm prints:
Some primitives are not supported: copilot (instructions); cursor (instructions); ...
If you need those primitives, install the affected packages at project scope instead.
[!] MCP overlay dependencies are not yet supported by apm-overlay; ignoring: ...
v1 does not install MCP entries. Install them manually with apm install --mcp ... if needed.