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 publishing updates to consumer repositories).

Terminal window
# Consume
apm marketplace add SOURCE [--name N] [--ref R | --branch B] [--host FQDN]
apm marketplace list
apm marketplace browse NAME
apm marketplace update [NAME]
apm marketplace remove NAME
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 doctor
apm marketplace outdated [--offline] [--include-prerelease]
apm marketplace publish [--targets FILE] [--dry-run] [--no-pr] [...]
# 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 ship updates to consumer repositories via apm marketplace publish.

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. Accepted forms:

  • OWNER/REPO — GitHub shorthand (acme/marketplace).
  • HOST/OWNER/.../REPO — non-GitHub host shorthand (gitlab.com/team/marketplace).
  • HTTPS URL — any git host, including Azure DevOps, GitLab, Gitea, Bitbucket Server, or a self-hosted git server.
  • SSH URL — git@host:org/repo.git style.
  • Local filesystem path — absolute (/srv/marketplaces/agent-forge), relative (./local-mkt), or home-based (~/code/marketplace).
  • file:// URI — file:///srv/marketplaces/agent-forge.git.
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 (auth via ADO_APM_PAT, same as `apm install`)
apm marketplace add https://dev.azure.com/contoso/eng/_git/agent-forge \
--name agent-forge
# Gitea / Bitbucket Server / self-hosted git
apm marketplace add https://gitea.example.com/org/repo.git --name custom
# SSH
apm marketplace add git@gitea.example.com:org/repo.git --name custom
# Local filesystem (bare repo or working directory)
apm marketplace add /srv/marketplaces/agent-forge.git --name agent-forge
# file:// URI
apm marketplace add file:///srv/marketplaces/agent-forge.git --name agent-forge
FlagDescription
--name, -nDisplay name. Defaults to the repo name.
--ref, -rGit ref (branch, tag, or SHA). Default: main.
--branch, -bDeprecated alias for --ref.
--hostGit host FQDN. Default: github.com. Ignored when SOURCE is a URL or local path.
--verbose, -vShow detailed output.

Trust boundary. APM forwards its authentication tokens (GITHUB_APM_PAT, GITLAB_APM_PAT) only when the marketplace host is classified as GitHub or GitLab family. For any other host — generic HTTPS, SSH, Azure DevOps, self-hosted — the marketplace is fetched via subprocess git through GitCache, and authentication falls through to the host’s APM PAT (e.g. ADO_APM_PAT for Azure DevOps) or your local git credential-manager. See getting-started/authentication.

Azure DevOps. ADO-hosted marketplaces fetch marketplace.json via a sparse-cone git clone (not the ADO REST API), so authentication uses ADO_APM_PAT — identical to how apm install handles ADO-hosted package dependencies. See consumer/private-and-org-packages.

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.

Terminal window
apm marketplace browse awesome-agents

Refresh the local cache for one marketplace, or all when NAME is omitted.

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

Unregister a marketplace.

FlagDescription
--yes, -ySkip the confirmation prompt.

Validate the manifest of a registered marketplace against the schema.

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/package name. Default: my-marketplace.
--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.

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

Run environment diagnostics for marketplace publishing: git binary, network reachability, auth (gh/PAT), and config sanity.

Show packages in the authoring config that have newer upstream versions available.

FlagDescription
--offlineUse cached refs only.
--include-prereleaseConsider prerelease tags.

Push marketplace updates to one or more consumer repositories, optionally opening pull requests.

Terminal window
apm marketplace publish --dry-run
apm marketplace publish --targets ./consumer-targets.yml --draft
FlagDescription
--targets FILEPath to consumer-targets YAML. Default: ./consumer-targets.yml.
--dry-runPreview without pushing or opening PRs.
--no-prPush branches but skip PR creation.
--draftOpen PRs as drafts.
--allow-downgradePermit version downgrades.
--allow-ref-changePermit switching ref types (e.g. tag to SHA).
--parallel NMaximum concurrent target updates. Default: 4.
--yes, -ySkip the confirmation prompt.

Add a package entry to the authoring config. SOURCE is a git repo reference. Mutable refs (HEAD, branches) are auto-resolved to a concrete SHA at write time.

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}).
--tagsComma-separated tags.
--include-prereleaseInclude prerelease versions.
--no-verifySkip the remote reachability check.

Update fields on an existing package entry. Same flag set as package add minus --no-verify; only the fields you pass are modified.

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

Preview a publish, then ship it as drafts:

Terminal window
apm marketplace publish --dry-run
apm marketplace publish --draft