Skip to content

Install from a marketplace

Use this page when someone tells you “install review-kit from the Contoso marketplace”. A marketplace is a published list of plugins and packages: a marketplace.json file in a git repository or at an HTTPS URL. Each entry names a plugin and the repository and version it comes from. Organizations run private marketplaces to offer a curated set of approved agent capabilities; see Build your organization’s marketplace.

APM installs marketplace plugins into the same manifest and lockfile as any other package, so teammates and CI get the same files.

Register it once per machine, pinned to a tag:

Terminal window
apm marketplace add contoso/agent-marketplace#v2.0.0 --name contoso

Without #ref (or --ref), APM tracks the default branch and warns that it can move. SOURCE can also be a GitLab, Azure DevOps or other git URL, an SSH URL, a local folder, or a hosted marketplace.json URL. APM downloads hosted URLs over HTTPS anonymously unless you register them with --name; a private hosted list then authenticates with APM_MARKETPLACE_TOKEN_<NAME> (private hosted catalogs). If the file is not in a default location, pass --path.

apm marketplace list shows what you registered; apm marketplace remove contoso forgets it.

Terminal window
apm marketplace browse contoso
apm search review@contoso

browse lists every entry; search takes QUERY@MARKETPLACE and matches names, descriptions and tags. Each row prints the install name, such as review-kit@contoso.

Through APM:

Terminal window
apm install review-kit@contoso

APM looks up review-kit, installs it from the source and ref the marketplace lists, and records the plugin in apm.lock.yaml. Append #v2.0.0 to install a specific tag instead of the listed one. To follow a version range, declare the entry in apm.yml:

apm.yml
dependencies:
apm:
- name: review-kit
marketplace: contoso
version: "^2.0.0"

APM picks the highest release tag that matches, using the tag pattern the publisher declared, and fails if none matches.

The same marketplace often works in each harness’s own commands too (a harness is the agent tool that reads the files, such as Claude Code). Those install the plugin for one user, with no project lockfile, policy check or apm audit:

ToolInstall command
APM (project lockfile)apm marketplace add OWNER/REPO then apm install NAME@MARKETPLACE
GitHub Copilot CLIcopilot plugin marketplace add OWNER/REPO then copilot plugin install NAME@MARKETPLACE
Claude Code/plugin marketplace add OWNER/REPO then /plugin install NAME@MARKETPLACE
Codex CLI 0.163.0+codex plugin marketplace add ... then codex plugin add NAME@MARKETPLACE

Use the native command for a personal tool. Use apm install when the plugin belongs to the project.

A Claude Code plugin installed with apm install <plugin>@<marketplace> for claude or copilot is deployed whole to .agents/plugins/ and declared in the harness settings; see Native plugins.

The lockfile records the plugin’s commit and file hashes like any package, plus where it was found:

apm.lock.yaml
- repo_url: contoso/review-kit
resolved_commit: 8c1f0b2...
discovered_via: contoso
marketplace_plugin_name: review-kit
source_url: https://github.com/contoso/agent-marketplace
source_digest: sha256:...
  • apm install and apm install --frozen replay the locked commit without contacting the marketplace, so an edit to marketplace.json changes nothing until you update. A package whose locked MCP or LSP servers have no copy in apm_modules/ still reads the marketplace for those definitions only; the locked commit still pins the download. If the marketplace now selects another source or commit, install fails; run apm update <plugin>@<marketplace> to move to it.
  • An entry the marketplace routes through a package registry locks the exact version, resolved_url and resolved_hash instead of a commit, and replays through a registry declared in apm.yml, like any registry dependency; the archive hash is checked before anything is extracted. apm install <plugin>@<marketplace> writes such an entry to apm.yml in registry form (id, registry, version), never as a Git entry.
  • A plugin from a local catalog (a directory or a marketplace.json file) is locked by its content, not a commit. apm install reads the catalog again, so catalog edits apply. apm install --frozen passes while the catalog still selects the locked plugin directory and its content is unchanged, and otherwise fails without writing anything; run apm install to lock the change.
  • apm update and apm install --refresh revalidate the marketplace and fail rather than use stale data. apm marketplace update refreshes the cached list and nothing else.
  • The name contoso is local to your machine. If it later points at a different marketplace, apm update, apm install <plugin>@contoso (with or without -g), apm outdated and any other re-resolution fail and name both origins instead of switching.

source_url records the origin; the digest records provenance and is not a trust anchor.

APM also remembers, under APM_HOME, which git ref each plugin version resolved to the first time an install committed it. If the marketplace later points that same version at another ref, apm install (with or without -g) refuses and names both refs. Run apm update to accept the new ref, only once the publisher confirms the change. A failed or --dry-run install records nothing.

Declare marketplaces in your user manifest

Section titled “Declare marketplaces in your user manifest”

To register the same marketplaces on every machine, list them in your user manifest (~/.apm/apm.yml, or $APM_HOME/apm.yml) and run apm install -g:

~/.apm/apm.yml
marketplaces:
- name: contoso
source: https://github.com/contoso/agent-marketplace
ref: v2.0.0

APM adds missing entries, updates changed ones, and removes ones it added that you deleted. It leaves registrations you made with apm marketplace add alone. Registering grants no trust and installs nothing. A project can also declare its marketplaces (next section); a package (dependency) apm.yml may not declare marketplaces:.

Commit the marketplaces a project installs from in its root apm.yml, in the same shape as the user manifest:

apm.yml
marketplaces:
- name: contoso
source: https://github.com/contoso/agent-marketplace
ref: main
dependencies:
apm:
- { name: security-review, marketplace: contoso }

Then apm install and apm update resolve marketplace: contoso through this map, on a fresh clone or in CI, with no apm marketplace add:

  • The map is never written to your marketplace registry. Names are local to the file, and apm.lock.yaml records each catalog’s URL and the resolved commit, so contoso cannot mean a different catalog on another machine.
  • Inside the project the file wins over a registration with the same name. APM prints one [i] line naming both catalogs.
  • The file also wins over the lock: if apm.lock.yaml recorded a package from another catalog (for example, locked through a registration), the next apm install or apm update re-resolves it through the map and prints one [i] line. apm install --frozen refuses instead.
  • A dependency’s own marketplace: <name> entries may only use names the root map declares. Otherwise the install fails and shows the entry to add.
  • A dependency that declares marketplaces: is refused: a package cannot add marketplaces.
  • Your org can restrict the catalogs a project may declare, and the catalogs locked packages came from, with the policy marketplace.allow list.

A committed marketplace is reviewed intent, like a committed Git URL: declaring it grants no trust beyond your org policy.

A plugin that ships .codex-plugin/plugin.json can be registered with Codex as a whole bundle:

Terminal window
apm install -g contoso/review-kit --target codex

This needs Codex CLI 0.163.0 or later on PATH and works at user scope (-g); project scope fails. Approve the package’s executables before you install (Approve hooks and MCP servers). APM scans and copies the complete bundle, registers it through Codex’s configuration interface disabled, and never runs plugin code or grants Codex trust. Enable it in Codex. APM keeps its ownership journal in $APM_HOME/.codex-native/; keep that folder. It was qualified on macOS arm64. See Install plugins for current limits.

Terminal window
apm deps list

The plugin appears with its primitive counts. Commit apm.yml and apm.lock.yaml.

  • ref changed: was '...', now '...'. The marketplace moved a plugin version you already installed to another commit. Confirm with the publisher, then run apm update to accept it, or, when a package you are adding brings the plugin, apm install <package> --accept-ref-change. A catalog SHA that the pinned tag points to is the same commit: it is accepted and the pin moves to the SHA. If APM cannot read the tag’s commit (offline, no access), it refuses; retry when the remote is reachable. Pins belong to the catalog, not its name: re-adding a name for another catalog starts without pins, and removing a marketplace keeps its catalog pinned.
  • marketplace.json changed but my install did not. Expected: run apm outdated to see it, then apm update.
  • Refused bare cross-repo source on *.ghe.com. The entry would fall back to public github.com, so APM refuses it as a dependency-confusion risk. Ask the publisher to host-qualify the entry. A bare owner/repo is accepted when your GITHUB_HOST is the marketplace host, because it then resolves to that host. A default_host: in apm.yml does not admit it: an operator setting, not a manifest, decides which host a bare entry trusts.
  • The plugin installs but is incomplete in Claude Code. See Install plugins.

Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.