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.
Add a marketplace
Section titled “Add a marketplace”Register it once per machine, pinned to a tag:
apm marketplace add contoso/agent-marketplace#v2.0.0 --name contosoWithout #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.
Find a plugin
Section titled “Find a plugin”apm marketplace browse contosoapm search review@contosobrowse lists every entry; search takes QUERY@MARKETPLACE and matches
names, descriptions and tags. Each row prints the install name, such as
review-kit@contoso.
Install patterns
Section titled “Install patterns”Through APM:
apm install review-kit@contosoAPM 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:
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:
| Tool | Install command |
|---|---|
| APM (project lockfile) | apm marketplace add OWNER/REPO then apm install NAME@MARKETPLACE |
| GitHub Copilot CLI | copilot 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.
How marketplace installs lock
Section titled “How marketplace installs lock”The lockfile records the plugin’s commit and file hashes like any package, plus where it was found:
- 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 installandapm install --frozenreplay the locked commit without contacting the marketplace, so an edit tomarketplace.jsonchanges nothing until you update. A package whose locked MCP or LSP servers have no copy inapm_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; runapm update <plugin>@<marketplace>to move to it.- An entry the marketplace routes through a package registry locks the exact
version,
resolved_urlandresolved_hashinstead of a commit, and replays through a registry declared inapm.yml, like any registry dependency; the archive hash is checked before anything is extracted.apm install <plugin>@<marketplace>writes such an entry toapm.ymlin registry form (id,registry,version), never as a Git entry. - A plugin from a local catalog (a directory or a
marketplace.jsonfile) is locked by its content, not a commit.apm installreads the catalog again, so catalog edits apply.apm install --frozenpasses while the catalog still selects the locked plugin directory and its content is unchanged, and otherwise fails without writing anything; runapm installto lock the change. apm updateandapm install --refreshrevalidate the marketplace and fail rather than use stale data.apm marketplace updaterefreshes the cached list and nothing else.- The name
contosois local to your machine. If it later points at a different marketplace,apm update,apm install <plugin>@contoso(with or without-g),apm outdatedand 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:
marketplaces: - name: contoso source: https://github.com/contoso/agent-marketplace ref: v2.0.0APM 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:.
Declare marketplaces in a project
Section titled “Declare marketplaces in a project”Commit the marketplaces a project installs from in its root apm.yml, in
the same shape as the user manifest:
marketplaces: - name: contoso source: https://github.com/contoso/agent-marketplace ref: maindependencies: 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.yamlrecords each catalog’s URL and the resolved commit, socontosocannot 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.yamlrecorded a package from another catalog (for example, locked through a registration), the nextapm installorapm updatere-resolves it through the map and prints one[i]line.apm install --frozenrefuses 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.allowlist.
A committed marketplace is reviewed intent, like a committed Git URL: declaring it grants no trust beyond your org policy.
Codex compatibility bundles through APM
Section titled “Codex compatibility bundles through APM”A plugin that ships .codex-plugin/plugin.json can be registered with Codex
as a whole bundle:
apm install -g contoso/review-kit --target codexThis 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.
Verify
Section titled “Verify”apm deps listThe plugin appears with its primitive counts. Commit apm.yml and
apm.lock.yaml.
When things go wrong
Section titled “When things go wrong”ref changed: was '...', now '...'. The marketplace moved a plugin version you already installed to another commit. Confirm with the publisher, then runapm updateto 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.jsonchanged but my install did not. Expected: runapm outdatedto see it, thenapm update.- Refused bare cross-repo source on
*.ghe.com. The entry would fall back to publicgithub.com, so APM refuses it as a dependency-confusion risk. Ask the publisher to host-qualify the entry. A bareowner/repois accepted when yourGITHUB_HOSTis the marketplace host, because it then resolves to that host. Adefault_host:inapm.ymldoes 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.