apm targets
Show which agent harnesses APM will deploy to from the current project, and why.
Synopsis
Section titled “Synopsis”apm targets [OPTIONS]Description
Section titled “Description”apm targets prints the canonical target table for the current
directory: every supported harness, whether APM considers it active,
the filesystem signal that activated it, and where compiled output
will land.
Resolution order matches apm compile:
--target/--allon the command line (not applicable toapm targetsitself, but reflected bycompileandinstall).targets:field inapm.yml.- Auto-detection via filesystem signals (see Detection signals).
Use this command before apm compile or apm install to confirm
what auto-detection resolves to. If APM lists a target you do not
intend (for example, CLAUDE.md is project documentation, not a
Claude Code config), pin targets: explicitly in apm.yml.
Subcommands
Section titled “Subcommands”apm targets is a Click command group, but no subcommands ship today.
Invoking apm targets without arguments prints the resolved-target
table.
Options
Section titled “Options”| Flag | Description |
|---|---|
--json |
Emit machine-readable JSON instead of the table. One object per canonical target with target, status, source, deploy_dir, needs. |
--all |
In --json mode, include the agent-skills meta-target row (excluded by default). No effect on table output. |
The agent-skills meta-target is a multi-harness fan-out for shared
.agents/skills/ output. It is not a harness and is excluded from the
default table.
Examples
Section titled “Examples”Show the resolved target table:
apm targetsSample output in a project with CLAUDE.md and .cursor/:
TARGET STATUS SOURCE DEPLOY DIR ------------ ---------- ---------------------------------------- ---------- copilot inactive needs .github/copilot-instructions.md .github/ claude active CLAUDE.md .claude/ grok-build inactive needs .grok/ .grok/ cursor active .cursor/ .cursor/ codex inactive needs .codex/ .codex/ gemini inactive needs GEMINI.md .gemini/ opencode inactive needs .opencode/ .opencode/ windsurf inactive needs .windsurf/ .windsurf/ kiro inactive needs .kiro/ .kiro/Machine-readable form:
apm targets --jsonapm targets --json --allDetection signals
Section titled “Detection signals”Auto-detection walks the project root for these markers. The first match per target is enough to activate it.
| Target | Signal(s) APM looks for | Deploy directory |
|---|---|---|
copilot |
.github/copilot-instructions.md file, or .github/instructions/, .github/agents/, .github/prompts/, or .github/hooks/ directory |
.github/ |
claude |
.claude/ directory, or CLAUDE.md file |
.claude/ |
grok-build |
.grok/ directory |
.grok/ |
cursor |
.cursor/ directory, or .cursorrules file (legacy) |
.cursor/ |
codex |
.codex/ directory |
.codex/ |
gemini |
.gemini/ directory, or GEMINI.md file |
.gemini/ |
opencode |
.opencode/ directory |
.opencode/ |
windsurf |
.windsurf/ directory |
.windsurf/ |
kiro |
.kiro/ directory |
.kiro/ |
agent-skills |
Meta-target; never auto-detected. Opt in via targets: in apm.yml or --target agent-skills on apm install / apm deps update (compile is a no-op for this target). |
.agents/ |
Notes:
- Detection is filesystem-only. APM does not inspect file contents to decide whether a marker is “real”.
- A
CLAUDE.mdwritten as documentation will still activate theclaudetarget. Pintargets:inapm.ymlto override. - If no signals are found and
apm.ymldeclares notargets:,apm targetsprints the full table with every row inactive and an info hint to create a harness config or declaretargets:explicitly.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Table or JSON printed (including the all-inactive case). |
Related
Section titled “Related”apm install– uses the same target resolution to decide which harness configs to wire.apm compile– compiles primitives for the targets shown here.- Targets matrix – per-target output layout and feature support.
- Concepts: primitives and targets