Skip to content

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).

Terminal window
# Consume
apm marketplace add SOURCE [--name N] [--ref R | --branch B] [--host FQDN] [--path P] [--yes] [--offline]
apm marketplace list
apm marketplace browse NAME [--offline]
apm marketplace update [NAME]
apm marketplace remove NAME [--yes]
apm marketplace validate NAME
# Author
apm 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 config
apm marketplace package add SOURCE [...]
apm marketplace package set NAME [...]
apm marketplace package remove NAME [--yes]

A marketplace is a git-hosted index of APM packages. Two roles interact with this command:

  • Consumers register marketplaces so dependencies in apm.yml can resolve by short name (my-pkg@my-marketplace) instead of a full git URL. See apm install.
  • Authors maintain a marketplace’s apm.yml (marketplace: block) and build marketplace artifacts with apm 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.

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 example acme/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 #ref to pin the marketplace, for example https://gitlab.com/acme/marketplace.git#v1.0.0.
  • Hosted marketplace.json URL — https://catalog.example.com/marketplace.json.
  • SSH URL — SCP-like git@host:org/repo.git or fully qualified ssh://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 --ref to select a branch, tag, or commit.
  • Local filesystem path — absolute (/srv/marketplaces/agent-forge), relative (./local-mkt), home-based (~/code/marketplace), or a direct marketplace.json file, or an explicitly selected local apm.yml.
  • file:// URI — file:///srv/marketplaces/agent-forge.git.
Terminal window
apm marketplace add ./apm.yml --name alice-dev
apm marketplace browse alice-dev
apm view my-tool@alice-dev
apm install my-tool@alice-dev

SOURCE 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.

Terminal window
# GitHub shorthand
apm marketplace add my-org/awesome-agents
# GitLab via host shorthand
apm marketplace add gitlab.com/my-org/awesome-agents --host gitlab.com
# Azure DevOps Services
apm marketplace add https://dev.azure.com/contoso/eng/_git/agent-forge \
--name agent-forge
# Azure DevOps Server
export ADO_HOST=ado.contoso.com
export ADO_APM_PAT=your_ado_pat
apm marketplace add \
https://ado.contoso.com:8443/DefaultCollection/eng/_git/agent-forge \
--name agent-forge
# Gitea / Bitbucket Server / self-hosted git, pinned with #ref
apm marketplace add https://gitea.example.com/org/repo.git#v1.0.0 --name custom
# Hosted marketplace.json URL
apm marketplace add https://catalog.example.com/marketplace.json --name catalog
# Private hosted marketplace.json URL (Bearer token)
export APM_MARKETPLACE_TOKEN_CATALOG=your_token
apm marketplace add https://catalog.example.com/team/marketplace.json --name catalog
# SSH
apm marketplace add git@gitea.example.com:org/repo.git --name custom
apm 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-forge
apm marketplace add ./vendor/marketplace.json --name vendor
# file:// URI
apm marketplace add file:///srv/marketplaces/agent-forge.git --name agent-forge
# One catalog per audience from the same repository
apm marketplace add acme/agent-skills --path catalogs/frontend/marketplace.json --name acme-frontend
apm marketplace add acme/agent-skills --path catalogs/backend/marketplace.json --name acme-backend
FlagDescription
--name, -nDisplay name. Defaults to the repo name.
--ref, -rGit 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, -bDeprecated alias for --ref.
--hostGit 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.
--pathRepository-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.
--offlineRead a local apm.yml source without network; JSON, Git and HTTPS catalog sources reject it. See Live local authoring catalogs.
--yes, -yReplace a name already registered to a different catalog without prompting. Without it, a non-interactive run refuses.
--verbose, -vShow 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.

A hosted marketplace.json that requires a login authenticates with:

VariableSent 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 NAME binds NAME to the URL. A name taken from the catalog’s own name field never selects a credential. Re-adding a bound name with another URL fails; run apm marketplace remove NAME first. 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. .netrc and 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 denied and the variable to set, and exits 1. It is never served from cache: a denied apm marketplace update keeps 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.

List every registered marketplace with its source URL and tracked branch.

Terminal window
apm marketplace list
apm marketplace list --verbose

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.

Terminal window
apm marketplace browse awesome-agents

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.

Terminal window
apm marketplace update # refresh every registered marketplace
apm marketplace update awesome-agents # refresh one

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.

FlagDescription
--yes, -ySkip the confirmation prompt.

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.

Add a marketplace: block to apm.yml in the current directory, scaffolding apm.yml if it does not exist.

FlagDescription
--forceOverwrite an existing marketplace: block.
--nameMarketplace 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.
--ownerOwner name for the marketplace.
--no-gitignore-checkSkip the .gitignore staleness check.

Fold a legacy marketplace.yml into the marketplace: block of apm.yml.

FlagDescription
--force, --yes, -yOverwrite an existing block.
--dry-runPreview the proposed changes without writing them.

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.

FlagDescription
--offlineSchema and cached-ref checks only; no network.

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.

FlagDescription
--strictExit 1 on bypasses, skipped sources, verification errors, or when no plugin can be verified.
--verbose, -vShow clean plugins and skipped reasons.

For the top-level content/integrity scan, see apm audit.

Terminal window
apm marketplace audit my-marketplace
apm marketplace audit my-marketplace --strict
apm marketplace add ./local-marketplace --name local
apm marketplace audit local --strict

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.

FlagDescription
--offlineUse cached refs only.
--include-prereleaseConsider 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.

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.

FlagDescription
--namePackage name. Default: repo name.
--versionSemver range (e.g. >=1.0.0).
--refPin to a git ref (SHA, tag, or HEAD).
--subdir, -sSubdirectory inside the source repo.
--tag-patternTag pattern (e.g. v{version}).
--categoryPackage category (e.g. developer-tools). Required for every package when outputs include codex.
--tagsComma-separated tags.
--include-prereleaseInclude prerelease versions.
--no-verifySkip the remote reachability check.

Update fields on an existing package entry. Only the fields you pass are modified.

FlagDescription
--versionSemver range (e.g. >=1.0.0).
--refPin to a git ref (SHA, tag, or HEAD).
--subdirSubdirectory inside the source repo.
--tag-patternTag pattern (e.g. v{version}).
--categoryPackage category (e.g. developer-tools).
--tagsComma-separated tags.
--include-prereleaseInclude prerelease versions.

Remove a package entry from the authoring config.

FlagDescription
--yes, -ySkip the confirmation prompt.

Every subcommand accepts --verbose / -v for detailed output. Flags listed per-subcommand above are the only command-specific flags.

Register an upstream marketplace and install a package from it:

Terminal window
apm marketplace add my-org/awesome-agents
apm install code-reviewer@awesome-agents

Bootstrap a new marketplace, add a package, and verify:

Terminal window
apm marketplace init --name my-marketplace --owner my-org
apm marketplace package add my-org/code-reviewer --version '>=1.0.0'
apm marketplace check

Check marketplace metadata before packaging:

Terminal window
apm marketplace check
apm marketplace check --offline

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