Skip to content

apm targets

Show which agent harnesses APM will deploy to from the current project, and why.

Terminal window
apm targets [OPTIONS]

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:

  1. --target / --all on the command line (not applicable to apm targets itself, but reflected by compile and install).
  2. targets: field in apm.yml.
  3. 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.

apm targets is a Click command group, but no subcommands ship today. Invoking apm targets without arguments prints the resolved-target table.

FlagDescription
--jsonEmit machine-readable JSON instead of the table. One object per canonical target with target, status, source, deploy_dir, needs.
--allIn --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.

Show the resolved target table:

Terminal window
apm targets

Sample output in a project with CLAUDE.md and .cursor/:

TARGET STATUS SOURCE DEPLOY DIR
------------ ---------- ---------------------------------------- ----------
claude active CLAUDE.md .claude/
copilot inactive needs .github/copilot-instructions.md .github/
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/

Machine-readable form:

Terminal window
apm targets --json
apm targets --json --all

Auto-detection walks the project root for these markers. The first match per target is enough to activate it.

TargetSignal(s) APM looks forDeploy directory
claude.claude/ directory, or CLAUDE.md file.claude/
copilot.github/copilot-instructions.md file.github/
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/
agent-skillsMeta-target; never auto-detected. Opt in via targets: in apm.yml or --target agent-skills on apm compile..agents/skills/

Notes:

  • Detection is filesystem-only. APM does not inspect file contents to decide whether a marker is “real”.
  • A CLAUDE.md written as documentation will still activate the claude target. Pin targets: in apm.yml to override.
  • If no signals are found and apm.yml declares no targets:, apm targets prints the full table with every row inactive and an info hint to create a harness config or declare targets: explicitly.
CodeMeaning
0Table or JSON printed (including the all-inactive case).