APM Docs

CLI Reference

Complete reference for all APM CLI commands and options

Global options

OptionEnv variableDefaultDescription
--registry <url>APM_REGISTRYhttps://apm.orthg.nlAPM registry URL
--versionPrint version
--helpPrint help

Package names

All packages use scoped names in the format @scope/name. The scope is typically the GitHub owner or organization:

@anthropics/code-review
@user/my-skill
@myorg/internal-guidelines

apm install

Install a skill by scoped name from the registry.

apm install @scope/name

What it does:

  1. Fetches package metadata from the registry (/api/packages/@scope/name)
  2. Creates .skills/@scope/name/ in your project root
  3. Writes the SKILL.md file
  4. Updates apm-lock.json with the package source, path, ref, and commit SHA

Project root detection: APM walks up from the current directory looking for apm-lock.json, package.json, Cargo.toml, or .git. Falls back to the current directory.

Example:

$ apm install @anthropics/code-review
apm Fetching @anthropics/code-review...
apm Installed @anthropics/code-review to .skills/@anthropics/code-review

Result:

your-project/
├── .skills/
│   └── @anthropics/
│       └── code-review/
│           └── SKILL.md
└── apm-lock.json

Search for skills in the registry.

apm search <query>

Searches the registry using full-text search over scopes, names, and descriptions. Results show the scoped name, metadata (stars, license), description, and source repository.

Example:

$ apm search "error handling"
Found 3 skill(s) matching 'error handling':

  @user/error-handling (★ 42 · MIT)
  Best practices for error handling across languages
  user/error-handling-skill

  @org/resilient-apis (★ 18 · Apache-2.0)
  Building resilient API error responses
  org/resilient-apis

apm info

Show details about a skill.

apm info @scope/name

Fetches and displays package metadata from the registry.

Example:

$ apm info @anthropics/code-review

  @anthropics/code-review  Systematic code review checklist

  scope: @anthropics
  repo:  anthropics/skills
  path:  code-review
  ref:   main
  owner: anthropics
  stars: 87

  Install:
  apm install @anthropics/code-review

apm validate

Validate a local SKILL.md file against the specification.

apm validate <path>

Accepts either a path to a SKILL.md file or a directory containing one. Checks:

  • YAML frontmatter is present and parseable
  • name field exists, is valid (lowercase alphanumeric + hyphens, max 64 chars, no consecutive hyphens)
  • name matches the parent directory name
  • description field exists and is within 1024 characters

Exit codes:

CodeMeaning
0Valid
1Validation errors found

Example (valid):

$ apm validate ./my-skill
 SKILL.md is valid
  name: my-skill
  description: A description of what this skill does

Example (invalid):

$ apm validate ./bad-skill
 SKILL.md has 2 error(s):
  · name must be lowercase alphanumeric with hyphens
  · description must not be empty

Lockfile

APM maintains an apm-lock.json file at your project root. It tracks installed packages by their scoped name:

{
  "lockfileVersion": 1,
  "packages": {
    "@anthropics/code-review": {
      "sourceRepo": "anthropics/skills",
      "sourcePath": "code-review",
      "sourceRef": "main",
      "commitSha": "abc123...",
      "integrity": null
    }
  }
}

The lockfile ensures reproducible installs. Commit it to version control.

Environment variables

VariableDescription
APM_REGISTRYOverride the default registry URL. Same as --registry.