Compile and targets
Named apply-from-manifest entry and preview of the resolved apply harness set.
ht compile is a named entry over the existing apply-from-manifest path used by ht install / ht apply with no plugin selector. Same writers, same apm.lock.yaml local_deployed_file_hashes. It is not a second output tree and not a second compile engine.
ht targets previews the resolved apply harness set (active / source / deploy dir). It is not ht harness list.
ht compile
ht compile --target cursor
ht compile -t claude,cursor --dry-run
ht compile --all
ht compile --harness claude-code,cursor
ht compile --project .
ht targets
ht targets --json
ht targets --allFlags
ht compile [--target <apm-tokens>|--all] [--harness <ht-slugs>] [--dry-run] [--project]
ht targets [--json] [--all]
--target / --all are also on ht apply / ht install. --target and --harness occupy the same slot and are mutually exclusive with --all.
Compile does not take a plugin selector or --global.
Resolution order
--target/--all/--harnesson the command lineapm.ymltargets/target, elsecompilation.target- Project harness preference, then global harness preference (
ht init --main/ht harness set) - APM filesystem signals (empty
.cursor/counts), then HTdetectPlatforms
Preview the table with ht targets (or ht targets --json) before compiling. Pin targets: so every machine, CI job, and cloud agent writes the same files:
name: demo
version: "1.0.0"
targets: [cursor, claude]Declared targets: wins over harness preference and whichever tool folders happen to exist on the current machine. When targets: is omitted, preference keeps ht apply <plugin> / install portable across machines that already ran ht init --main.
Canonical slugs: copilot, claude, grok-build, cursor, opencode, codex, gemini, antigravity, windsurf, kiro, agent-skills. --all expands the HT-mapped set including antigravity and kiro. agent-skills is a meta-target and is skipped as a HarnessTap harness. Experimental APM targets that need a feature flag are not accepted.
When nothing resolves after that chain, ht compile fails closed the same way as ht install / apply-from-manifest.
ht targets --json emits one object per canonical target plus the resolved list. ht targets --all includes the agent-skills meta-target row.
What compile does not do
Compile does not take a plugin selector or --global. There is no --watch and no --clean. compilation.strategy: distributed is a warning only — output stays the existing single-file root context (AGENTS.md / CLAUDE.md). Use ht harness list for the 43-harness registry; ht targets is the apply-target preview.
See also: Install, Apply, Command reference.