|
| 1 | +# CLI Command Reference |
| 2 | + |
| 3 | +## Project setup |
| 4 | + |
| 5 | +| Command | Purpose | Key flags | |
| 6 | +|---------|---------|-----------| |
| 7 | +| `apm init [NAME]` | Initialize a new APM project | `-y` skip prompts, `--plugin` authoring mode | |
| 8 | + |
| 9 | +## Dependency management |
| 10 | + |
| 11 | +| Command | Purpose | Key flags | |
| 12 | +|---------|---------|-----------| |
| 13 | +| `apm install [PKGS...]` | Install packages | `--update` refresh refs, `--force` overwrite, `--dry-run`, `--verbose`, `--only [apm\|mcp]`, `--target`, `--dev`, `-g` global, `--trust-transitive-mcp`, `--parallel-downloads N` | |
| 14 | +| `apm uninstall PKGS...` | Remove packages | `--dry-run`, `-g` global | |
| 15 | +| `apm prune` | Remove orphaned packages | `--dry-run` | |
| 16 | +| `apm deps list` | List installed packages | `-g` global, `--all` both scopes | |
| 17 | +| `apm deps tree` | Show dependency tree | -- | |
| 18 | +| `apm deps info PKG` | Show package details | -- | |
| 19 | +| `apm deps clean` | Clean dependency cache | `--dry-run`, `-y` skip confirm | |
| 20 | +| `apm deps update [PKGS...]` | Update specific packages | `--verbose`, `--force`, `--target`, `--parallel-downloads N` | |
| 21 | + |
| 22 | +## Compilation |
| 23 | + |
| 24 | +| Command | Purpose | Key flags | |
| 25 | +|---------|---------|-----------| |
| 26 | +| `apm compile` | Compile agent context | `-o` output, `-t` target, `--chatmode`, `--dry-run`, `--no-links`, `--watch`, `--validate`, `--single-agents`, `-v` verbose, `--local-only`, `--clean`, `--with-constitution/--no-constitution` | |
| 27 | + |
| 28 | +## Scripts |
| 29 | + |
| 30 | +| Command | Purpose | Key flags | |
| 31 | +|---------|---------|-----------| |
| 32 | +| `apm run SCRIPT` | Execute a named script | `-p name=value` (repeatable) | |
| 33 | +| `apm preview SCRIPT` | Preview script without running | `-p name=value` | |
| 34 | +| `apm list` | List available scripts | -- | |
| 35 | + |
| 36 | +## Security and audit |
| 37 | + |
| 38 | +| Command | Purpose | Key flags | |
| 39 | +|---------|---------|-----------| |
| 40 | +| `apm audit [PKG]` | Scan for security issues | `--file PATH`, `--strip`, `--dry-run`, `-v`, `-f [text\|json\|sarif\|md]`, `-o PATH`, `--ci`, `--policy SOURCE`, `--no-cache`, `--no-fail-fast` | |
| 41 | + |
| 42 | +## Distribution |
| 43 | + |
| 44 | +| Command | Purpose | Key flags | |
| 45 | +|---------|---------|-----------| |
| 46 | +| `apm pack` | Bundle package for distribution | `-o PATH`, `-t TARGET`, `--archive`, `--dry-run`, `--format [apm\|plugin]`, `--force` | |
| 47 | +| `apm unpack BUNDLE` | Extract a bundle | `-o PATH`, `--skip-verify`, `--force`, `--dry-run` | |
| 48 | + |
| 49 | +## Marketplace |
| 50 | + |
| 51 | +| Command | Purpose | Key flags | |
| 52 | +|---------|---------|-----------| |
| 53 | +| `apm marketplace add OWNER/REPO` | Register a marketplace | `-n NAME`, `-b BRANCH` | |
| 54 | +| `apm marketplace list` | List registered marketplaces | -- | |
| 55 | +| `apm marketplace browse NAME` | Browse marketplace packages | -- | |
| 56 | +| `apm marketplace update [NAME]` | Update marketplace index | -- | |
| 57 | +| `apm marketplace remove NAME` | Remove a marketplace | `-y` skip confirm | |
| 58 | +| `apm search QUERY@MARKETPLACE` | Search marketplace | `--limit N` | |
| 59 | + |
| 60 | +## MCP servers |
| 61 | + |
| 62 | +| Command | Purpose | Key flags | |
| 63 | +|---------|---------|-----------| |
| 64 | +| `apm mcp list` | List MCP servers in project | `--limit N` | |
| 65 | +| `apm mcp search QUERY` | Search MCP registry | `--limit N` | |
| 66 | +| `apm mcp show SERVER` | Show server details | -- | |
| 67 | + |
| 68 | +## Runtime management (experimental) |
| 69 | + |
| 70 | +| Command | Purpose | Key flags | |
| 71 | +|---------|---------|-----------| |
| 72 | +| `apm runtime setup {copilot\|codex\|llm}` | Install a runtime | `--version`, `--vanilla` | |
| 73 | +| `apm runtime list` | Show installed runtimes | -- | |
| 74 | +| `apm runtime remove {copilot\|codex\|llm}` | Remove a runtime | `--yes` | |
| 75 | +| `apm runtime status` | Show active runtime | -- | |
| 76 | + |
| 77 | +## Configuration and updates |
| 78 | + |
| 79 | +| Command | Purpose | Key flags | |
| 80 | +|---------|---------|-----------| |
| 81 | +| `apm config` | Show current configuration | -- | |
| 82 | +| `apm config get [KEY]` | Get a config value | -- | |
| 83 | +| `apm config set KEY VALUE` | Set a config value | -- | |
| 84 | +| `apm update` | Update APM itself | `--check` only check | |
0 commit comments