apm marketplace
Manage marketplaces — both consuming them (registering a remote
marketplace so packages resolve by package@marketplace shorthand)
and authoring one (editing apm.yml’s marketplace: block,
validating it, and preparing artifacts for consumer repositories).
Synopsis
Section titled “Synopsis”# Consumeapm marketplace add SOURCE [--name N] [--ref R | --branch B] [--host FQDN] [--path P] [--yes] [--offline]apm marketplace listapm marketplace browse NAME [--offline]apm marketplace update [NAME]apm marketplace remove NAME [--yes]apm marketplace validate NAME
# Authorapm marketplace init [--force] [--name N] [--owner O]apm marketplace migrate [--force | --dry-run]apm marketplace check [--offline]apm marketplace audit NAME [--strict] [-v]apm marketplace outdated [--offline] [--include-prerelease]
# Edit packages in the authoring configapm marketplace package add SOURCE [...]apm marketplace package set NAME [...]apm marketplace package remove NAME [--yes]Description
Section titled “Description”A marketplace is a git-hosted index of APM packages. Two roles interact with this command:
- Consumers register marketplaces so dependencies in
apm.ymlcan resolve by short name (my-pkg@my-marketplace) instead of a full git URL. Seeapm install. - Authors maintain a marketplace’s
apm.yml(marketplace:block) and build marketplace artifacts withapm pack.
The authoring config is the marketplace: block of apm.yml in the
current working directory. Legacy marketplace.yml files are still
read; use apm marketplace migrate to fold them into apm.yml.
Subcommands
Section titled “Subcommands”apm marketplace add
Section titled “apm marketplace add”Register a marketplace from a source reference.
Declare instead of add. To register the same marketplaces on every
machine, list them under marketplaces: in the user manifest
($APM_HOME/apm.yml, default ~/.apm/apm.yml) and run
apm install -g. Manual registrations always win a name conflict. See
Declare marketplaces in your user manifest.
A project can commit its marketplaces in its own apm.yml instead; that map
is never registered and wins inside the project. See
Declare marketplaces in a project.
Accepted forms:
OWNER/REPO— GitHub shorthand (acme/marketplace).HOST/OWNER/.../REPO— non-GitHub host shorthand (gitlab.com/team/marketplace). Both shorthand forms accept#ref, for exampleacme/marketplace#v1.0.0.- HTTPS git URL — Azure DevOps Services, a configured Azure DevOps Server,
GitLab, Gitea, Bitbucket Server, or another self-hosted git server. Add
#refto pin the marketplace, for examplehttps://gitlab.com/acme/marketplace.git#v1.0.0. - Hosted
marketplace.jsonURL —https://catalog.example.com/marketplace.json. - SSH URL — SCP-like
git@host:org/repo.gitor fully qualifiedssh://git@host[:PORT]/org/repo.git. Use the fully qualified form when the server listens on a non-default SSH port; the port is optional otherwise. SSH URLs cannot include passwords, queries, or fragments; use--refto select a branch, tag, or commit. - Local filesystem path — absolute (
/srv/marketplaces/agent-forge), relative (./local-mkt), home-based (~/code/marketplace), or a directmarketplace.jsonfile, or an explicitly selected localapm.yml. file://URI —file:///srv/marketplaces/agent-forge.git.
Live local authoring catalogs
Section titled “Live local authoring catalogs”apm marketplace add ./apm.yml --name alice-devapm marketplace browse alice-devapm view my-tool@alice-devapm install my-tool@alice-devSOURCE must be a path to a file named apm.yml that contains a valid
marketplace: declaration; a directory is still probed for marketplace.json. APM uses
the existing authoring parser, ref resolver and catalog composer in memory;
it does not run apm pack or write generated catalogs. Relative package
sources are anchored to the authoring file’s directory, with the existing
path containment checks. Native metadata.pluginRoot layout hints do not
rebase authored package paths. Each invocation reads one configuration
snapshot; later explicit browse, view, update or selected-install operations
reread the file. A failed registration leaves an existing registration unchanged.
Registration and browsing do not install inventory, activate plugins, execute
package hooks or publish packages. APM does not download remote package
manifests to fill in descriptions. Remote tags and version ranges need Git
network access to resolve. add --offline and browse --offline work only for
this source type: local entries and remote entries pinned to full commit SHAs
resolve without network, and tags or ranges fail with an actionable error.
JSON, Git and HTTPS catalog sources reject --offline.
Installing a remote entry records its actual package dependency and existing locked resolution. Locked replay does not require the preview file or its registration. Local entries remain local filesystem dependencies: their paths and hashes do not distribute files to another machine. Publishing and selecting a distributed source remain explicit operations. Remote YAML catalog URLs, automatic watching and automatic source promotion are unsupported.
Generated JSON catalogs and repository registration continue to work as before.
# GitHub shorthandapm marketplace add my-org/awesome-agents
# GitLab via host shorthandapm marketplace add gitlab.com/my-org/awesome-agents --host gitlab.com
# Azure DevOps Servicesapm marketplace add https://dev.azure.com/contoso/eng/_git/agent-forge \ --name agent-forge
# Azure DevOps Serverexport ADO_HOST=ado.contoso.comexport ADO_APM_PAT=your_ado_patapm marketplace add \ https://ado.contoso.com:8443/DefaultCollection/eng/_git/agent-forge \ --name agent-forge
# Gitea / Bitbucket Server / self-hosted git, pinned with #refapm marketplace add https://gitea.example.com/org/repo.git#v1.0.0 --name custom
# Hosted marketplace.json URLapm marketplace add https://catalog.example.com/marketplace.json --name catalog
# Private hosted marketplace.json URL (Bearer token)export APM_MARKETPLACE_TOKEN_CATALOG=your_tokenapm marketplace add https://catalog.example.com/team/marketplace.json --name catalog
# SSHapm marketplace add git@gitea.example.com:org/repo.git --name customapm marketplace add ssh://git@gitea.example.com:2222/org/repo.git --name custom
# Local filesystem (bare repo, working directory, or marketplace.json file)apm marketplace add /srv/marketplaces/agent-forge.git --name agent-forgeapm marketplace add ./vendor/marketplace.json --name vendor
# file:// URIapm marketplace add file:///srv/marketplaces/agent-forge.git --name agent-forge
# One catalog per audience from the same repositoryapm marketplace add acme/agent-skills --path catalogs/frontend/marketplace.json --name acme-frontendapm marketplace add acme/agent-skills --path catalogs/backend/marketplace.json --name acme-backend| Flag | Description |
|---|---|
--name, -n | Display name. Defaults to the repo name. |
--ref, -r | Git ref (branch, tag, or SHA). Default: main. Applies only to git-backed sources. For HTTPS git URLs, a #ref fragment is equivalent and is stored as the ref. The ref must be a branch or tag of the catalog’s own repository; a SHA must be the commit one of them points to. Other refs, such as refs/pull/N/head, are rejected. |
--branch, -b | Deprecated alias for --ref. |
--host | Git host FQDN for OWNER/REPO shorthand. Default: github.com. Ignored when SOURCE already carries a host (URL, hosted marketplace.json, or local path); a warning is shown for hosted JSON, local paths, or a conflicting embedded host. |
--path | Repository-relative path to the catalog JSON file, such as catalogs/frontend/marketplace.json. Skips auto-discovery. Applies to git-backed sources and local repository directories, not to hosted marketplace.json URLs or a direct local file. |
--offline | Read a local apm.yml source without network; JSON, Git and HTTPS catalog sources reject it. See Live local authoring catalogs. |
--yes, -y | Replace a name already registered to a different catalog without prompting. Without it, a non-interactive run refuses. |
--verbose, -v | Show detailed output. |
Without --path, APM checks marketplace.json,
.github/plugin/marketplace.json, then .claude-plugin/marketplace.json, and
registers the first one found without downloading it again.
With --path, APM reads only that file, like the path field of Claude Code’s
github and git marketplace sources. The path must stay inside the
repository (no absolute paths, .., backslashes, ?, or #) and name a
.json file; an escaping or missing path fails before anything is registered.
The path is saved in the registration, so browse, search, update, and
apm install read the same catalog. Register several catalogs from one
repository under different --name values; reusing a name for a different
catalog asks for confirmation (--yes skips the prompt). Relative plugin sources (./plugins/x) in
any catalog resolve from the repository root, not from the catalog’s folder.
Separate catalogs help discovery but are not access control: anyone who can
read the repository can read every catalog in it.
Trust boundary. APM forwards its authentication tokens
(GITHUB_APM_PAT, GITLAB_APM_PAT, ADO_APM_PAT) only when the
marketplace host is classified as GitHub, GitLab, or Azure DevOps.
Other git hosts are fetched via subprocess git through GitCache.
Generic HTTPS can use a local Git credential helper; plain HTTP suppresses
credentials, HTTPS-to-HTTP Git URL rewrites are rejected, and generic SSH is
token-free and noninteractive. See the
authentication transport table
for the full policy. A hosted marketplace.json URL is fetched
anonymously unless you register it with --name; then APM sends only
that name’s APM_MARKETPLACE_* credential (see
Private hosted catalogs). When packages are
installed from a remote catalog (hosted JSON URL or Git), the lockfile
records the catalog origin (source_url) and a content digest
(source_digest); local catalogs record neither. See
getting-started/authentication.
One catalog, one name. Registering a second name for a catalog that is
already registered (same origin and --path) succeeds with a [!] warning
naming the existing alias. Re-adding an existing name with a different URL
rebinds it on this machine only; a project whose lockfile recorded the old
origin then fails apm update, apm install <plugin>@<alias> and
apm outdated rather than switching catalogs; apm install keeps replaying
the locked marketplace. See
lockfile source_url.
Azure DevOps. Services (dev.azure.com, *.visualstudio.com) use
ADO_APM_PAT, then the Azure CLI bearer. Server hosts registered through
ADO_HOST or APM_ADO_HOSTS use ADO_APM_PAT only. A Server source URL may
include an explicit HTTPS port but must use a root-hosted collection path;
APM rejects /tfs/ prefixes. APM tries the Azure DevOps Items API first,
then subprocess git. See
Authentication.
Private hosted catalogs
Section titled “Private hosted catalogs”A hosted marketplace.json that requires a login authenticates with:
| Variable | Sent as |
|---|---|
APM_MARKETPLACE_TOKEN_<NAME> | Authorization: Bearer <token> |
APM_MARKETPLACE_USER_<NAME> + APM_MARKETPLACE_PASS_<NAME> | Authorization: Basic <base64(user:pass)> |
<NAME> is the --name you registered, uppercased, with - and . mapped
to _ (corp-main -> CORP_MAIN), like the registry variables. Bearer wins
when both are set.
- Binding. Only
apm marketplace add <url> --name NAMEbinds NAME to the URL. A name taken from the catalog’s ownnamefield never selects a credential. Re-adding a bound name with another URL fails; runapm marketplace remove NAMEfirst. Two bound names that map to the same variables (corp-main,corp.main) are rejected. - Scope. The credential is sent only to the registered scheme, host and
port, under the catalog’s directory, with the same query. Every redirect
hop is checked: a hop outside that scope continues without the credential,
and HTTPS-to-HTTP redirects are refused.
.netrcand Git, GitHub, ADO and registry credentials are never used for catalog requests, and catalog credentials never authenticate package downloads. - Denied access. HTTP 401, 403 or a redirect to a sign-in page fails
with
Access to marketplace 'NAME' was deniedand the variable to set, and exits 1. It is never served from cache: a deniedapm marketplace updatekeeps the last cached catalog and does not report it as updated.
Applies to add, browse, search, apm view, apm install and
update. Variable values never appear in URLs, apm.yml, the lockfile or
output; a malformed value is reported by variable name only.
apm marketplace list
Section titled “apm marketplace list”List every registered marketplace with its source URL and tracked branch.
apm marketplace listapm marketplace list --verboseapm marketplace browse NAME
Section titled “apm marketplace browse NAME”Show the packages exposed by a registered marketplace. Each plugin prints
its full install name (plugin@marketplace) and version, with the
description wrapped underneath. --offline reads a live local apm.yml
catalog without network access.
apm marketplace browse awesome-agentsapm marketplace update [NAME]
Section titled “apm marketplace update [NAME]”Refresh the local cache for one marketplace, or all when NAME is
omitted. Each catalog is revalidated (a conditional request where the host
supports it). If a catalog cannot be fetched or is invalid, its last valid
cached copy is kept and the command exits non-zero, naming every catalog that
failed; catalogs that did refresh stay refreshed.
apm marketplace update # refresh every registered marketplaceapm marketplace update awesome-agents # refresh oneapm marketplace remove NAME
Section titled “apm marketplace remove NAME”Unregister a marketplace. A marketplace declared in the user manifest’s
marketplaces: list is registered again by the next apm install -g;
remove its entry from the user manifest to drop it for good.
| Flag | Description |
|---|---|
--yes, -y | Skip the confirmation prompt. |
apm marketplace validate NAME
Section titled “apm marketplace validate NAME”Validate a registered marketplace’s raw manifest structure, plugin schema, and
duplicate plugin names.
apm marketplace add remains tolerant of malformed entries; validation reports
them by JSON path (for example, plugins[0].source: expected a string or object) and exits 1 without rewriting the source manifest or its registered
marketplace entry. A structural failure is reported without downstream plugin
count, schema, or duplicate-name success lines. Tolerant registration warns
when it retains malformed entries and points to the validation command.
apm marketplace init
Section titled “apm marketplace init”Add a marketplace: block to apm.yml in the current directory,
scaffolding apm.yml if it does not exist.
| Flag | Description |
|---|---|
--force | Overwrite an existing marketplace: block. |
--name | Marketplace name. A scaffolded apm.yml uses it as the package name (default: my-marketplace); with an existing apm.yml, a different name is written as marketplace.name. |
--owner | Owner name for the marketplace. |
--no-gitignore-check | Skip the .gitignore staleness check. |
apm marketplace migrate
Section titled “apm marketplace migrate”Fold a legacy marketplace.yml into the marketplace: block of
apm.yml.
| Flag | Description |
|---|---|
--force, --yes, -y | Overwrite an existing block. |
--dry-run | Preview the proposed changes without writing them. |
apm marketplace check
Section titled “apm marketplace check”Validate the schema of the authoring config and verify that every package
entry resolves to a reachable git ref. Bare owner/repo entries resolve
against the configured default host. Private github.com and GHES repos use
the standard GitHub auth chain during online validation. For an Azure
DevOps sourceBase ending in /_git, package names are appended without
a .git suffix. Services uses ADO_APM_PAT, then the Azure CLI bearer.
Server hosts registered through ADO_HOST or APM_ADO_HOSTS use
ADO_APM_PAT only.
A ref that names a tag or branch must exist on the remote. A ref that
is a full 40-character lowercase commit SHA passes when the remote serves
that commit: a branch tip passes directly, any other commit is
confirmed with a shallow fetch. Unreachable commits fail with
Commit '<sha>' not reachable on remote. Abbreviated or uppercase SHAs
are not commit pins and fail with a hint to use the full SHA. --offline
cannot confirm a commit that is not a cached branch tip.
| Flag | Description |
|---|---|
--offline | Schema and cached-ref checks only; no network. |
apm marketplace audit NAME
Section titled “apm marketplace audit NAME”Run after adding or updating a marketplace, or in CI, to verify no
plugin escapes marketplace pinning. Audit a registered marketplace for
plugin dependencies that bypass marketplace pinning. For git-backed sources,
the command fetches each plugin’s apm.yml at its pinned ref. For local
marketplaces, it reads each string-source plugin’s apm.yml from the
registered marketplace root. Local plugin paths that traverse outside that
root, including through symlinks, and missing manifests are skipped without
being read. Malformed or unreadable manifests are verification errors. The
command warns when dependencies.apm uses direct git URLs, repo shorthands,
or { git: ... } entries instead of name@marketplace refs.
| Flag | Description |
|---|---|
--strict | Exit 1 on bypasses, skipped sources, verification errors, or when no plugin can be verified. |
--verbose, -v | Show clean plugins and skipped reasons. |
For the top-level content/integrity scan, see apm audit.
apm marketplace audit my-marketplaceapm marketplace audit my-marketplace --strictapm marketplace add ./local-marketplace --name localapm marketplace audit local --strictapm marketplace outdated
Section titled “apm marketplace outdated”Show packages in the authoring config that have newer upstream
versions available. Local-path entries (such as source: ./) have no
remote tags and are listed as skipped.
| Flag | Description |
|---|---|
--offline | Use cached refs only. |
--include-prerelease | Consider prerelease tags. |
When remote tags use a non-default layout (for example my-pkg_v1.0.1), set
tag_pattern: "{name}_v{version}" on the package entry or under build: in
apm.yml:
packages: - name: my-pkg source: org/monorepo version: "^1.0.0" tag_pattern: "{name}_v{version}"If no tags match the configured pattern, apm marketplace outdated tries common
layouts (v{version}, {name}_v{version}, {name}--v{version}, etc.)
automatically. Set tag_pattern explicitly when your producer uses a different
layout.
apm marketplace package add SOURCE
Section titled “apm marketplace package add SOURCE”Add a package entry to the authoring config. SOURCE may be an
owner/repo shorthand, a host.tld/owner/repo shorthand, or a full
https://host.tld/path/to/repo[.git] URL with two or more repository
path segments. Mutable refs (HEAD, branches) are auto-resolved to a
concrete SHA at write time. A tag passed to --ref must exist on the
remote, as apm marketplace check requires; otherwise the command exits
2 without changing apm.yml. --no-verify stores it unchecked.
| Flag | Description |
|---|---|
--name | Package name. Default: repo name. |
--version | Semver range (e.g. >=1.0.0). |
--ref | Pin to a git ref (SHA, tag, or HEAD). |
--subdir, -s | Subdirectory inside the source repo. |
--tag-pattern | Tag pattern (e.g. v{version}). |
--category | Package category (e.g. developer-tools). Required for every package when outputs include codex. |
--tags | Comma-separated tags. |
--include-prerelease | Include prerelease versions. |
--no-verify | Skip the remote reachability check. |
apm marketplace package set NAME
Section titled “apm marketplace package set NAME”Update fields on an existing package entry. Only the fields you pass are modified.
| Flag | Description |
|---|---|
--version | Semver range (e.g. >=1.0.0). |
--ref | Pin to a git ref (SHA, tag, or HEAD). |
--subdir | Subdirectory inside the source repo. |
--tag-pattern | Tag pattern (e.g. v{version}). |
--category | Package category (e.g. developer-tools). |
--tags | Comma-separated tags. |
--include-prerelease | Include prerelease versions. |
apm marketplace package remove NAME
Section titled “apm marketplace package remove NAME”Remove a package entry from the authoring config.
| Flag | Description |
|---|---|
--yes, -y | Skip the confirmation prompt. |
Options
Section titled “Options”Every subcommand accepts --verbose / -v for detailed output.
Flags listed per-subcommand above are the only command-specific
flags.
Examples
Section titled “Examples”Register an upstream marketplace and install a package from it:
apm marketplace add my-org/awesome-agentsapm install code-reviewer@awesome-agentsBootstrap a new marketplace, add a package, and verify:
apm marketplace init --name my-marketplace --owner my-orgapm marketplace package add my-org/code-reviewer --version '>=1.0.0'apm marketplace checkCheck marketplace metadata before packaging:
apm marketplace checkapm marketplace check --offlineRelated
Section titled “Related”apm install— consume packages from registered marketplaces.apm search— top-level shortcut forQUERY@MARKETPLACEpackage search across registered marketplaces.- Publish to a marketplace — end-to-end authoring guide.
- Manifest schema — shape of the
marketplace:block inapm.yml.
Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.