Metadata-Version: 2.4
Name: apm-cli
Version: 0.37.0
Summary: MCP configuration tool
Author-email: Daniel Meppiel <user@example.com>
License: 
                                         Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright [yyyy] [name of copyright owner]
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
        
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE-DOCS
License-File: LICENSING.md
License-File: NOTICE
Requires-Dist: click>=8.0.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: truststore>=0.10.0
Requires-Dist: python-frontmatter>=1.0.0
Requires-Dist: llm>=0.28
Requires-Dist: llm-github-models>=0.18.0
Requires-Dist: toml>=0.10.2
Requires-Dist: tomlkit>=0.13
Requires-Dist: rich>=13.0.0
Requires-Dist: rich-click>=1.7.0
Requires-Dist: watchdog>=3.0.0
Requires-Dist: GitPython>=3.1.0
Requires-Dist: ruamel.yaml>=0.18.0
Requires-Dist: filelock>=4.2.1
Requires-Dist: websockets<17,>=12
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
Requires-Dist: pytest-split>=0.9.0; extra == "dev"
Requires-Dist: ruff>=0.11.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: jsonschema>=4.0.0; extra == "dev"
Requires-Dist: pylint>=3.0.0; extra == "dev"
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
Requires-Dist: mutmut==3.6.0; extra == "dev"
Provides-Extra: build
Requires-Dist: pyinstaller>=6.17.0; extra == "build"
Dynamic: license-file

# APM - Agent Package Manager

**An open-source, community-driven dependency manager for the agent supply chain.**

One manifest, one lockfile and one org policy for the skills, plugins and MCP servers your agents load, with the harnesses and marketplaces you already use.

GitHub Copilot | Claude Code | Grok Build | Cursor | OpenCode | Codex | Gemini CLI | Windsurf | Kiro

**[Documentation](https://microsoft.github.io/apm/)** | **[Quickstart](https://microsoft.github.io/apm/quickstart/)** | **[CLI Reference](https://microsoft.github.io/apm/reference/)** | **[Roadmap](https://github.com/orgs/microsoft/projects/2304/views/5)**

---

> **Portable by manifest. Verified by lockfile. Governed by policy.**
> One file declares what your agents load; one lockfile reproduces it on every machine and in CI; one policy decides what your organization allows.

## Why APM

What a coding agent loads decides what it knows and what it can do: skills, instructions, prompts, agents, hooks, plugins and MCP servers. Today teams copy those files between repositories and hand-edit MCP config for every tool. The copies drift, nobody can say which version a repository follows, and nothing reproduces the setup on the next laptop or in CI.

**APM treats them as dependencies.** Declare them once in `apm.yml`. `apm install` writes each one in every harness's own format and records the exact commit, plus a SHA-256 hash of every file it wrote, in `apm.lock.yaml`. Think `package.json` and `package-lock.json`, or `Cargo.toml` and `Cargo.lock`, for your agents, with transitive dependency resolution included.

```yaml
# apm.yml -- ships with your project
name: your-project
version: 1.0.0
targets: [copilot, claude]   # the harnesses this project supports
dependencies:
  apm:
    # A skill, picked from a public collection
    - git: vercel-labs/agent-skills
      skills:
        - deploy-to-vercel
    # A plugin, from Anthropic's marketplace
    - git: https://github.com/anthropics/claude-plugins-official
      path: plugins/commit-commands
      ref: main
  mcp:
    # An MCP server, configured for every harness above
    - name: io.github.github/github-mcp-server
      transport: http   # MCP transport name, not URL scheme -- connects over HTTPS
```

```bash
git clone <org/repo> && cd <repo>
apm install    # the same skills, plugins and MCP servers, from the lockfile
```

**Coming from `npx skills add`?** Drop-in:

```bash
apm install vercel-labs/agent-skills                            # whole bundle, like npx skills add
apm install vercel-labs/agent-skills --skill deploy-to-vercel   # one skill, persisted to apm.yml
```

Same install gesture. You also get a manifest, a lockfile and a fresh clone that matches yours. Coming from Claude Code marketplaces, `gh skill` or hand-copied folders? See [Coming from another tool](https://microsoft.github.io/apm/getting-started/coming-from/).

**Plugins from the marketplaces you already use:**

```bash
apm marketplace add anthropics/claude-code
apm install commit-commands@claude-code-plugins
```

One plugin, written in each harness's own format (commands for Claude Code, prompts for GitHub Copilot) and pinned in the lockfile.

**MCP servers without hand-edited JSON:**

```bash
apm install --mcp io.github.github/github-mcp-server --transport http
```

Every harness keeps MCP servers in its own file: `.mcp.json` for Claude Code and GitHub Copilot, `.cursor/mcp.json` for Cursor, `.codex/config.toml` for Codex. Declare a server once and APM writes each file, on every machine. Add a harness later and the same servers follow. Tokens stay out of the repository as `${VAR}` references, and a server that arrives through someone else's package with its own command is held back until you declare or approve it.

## The three promises

### 1. Portable by manifest

One `apm.yml` declares every primitive your agents need -- instructions, skills, prompts, agents, hooks, plugins, MCP servers -- and `apm install` reproduces the same setup in every harness the project targets, on every machine. No account and no registry: packages come from git.

- **[One manifest, every harness you target](https://microsoft.github.io/apm/reference/targets-matrix/)** -- declared once, written for Copilot, Claude Code, Grok Build, Cursor, OpenCode, Codex, Gemini CLI, Windsurf and Kiro
- **[Skills, one at a time or whole collections](https://microsoft.github.io/apm/consumer/install-packages/)** -- from GitHub, GitHub Enterprise, Azure DevOps, GitLab or a plain git URL
- **[Plugins](https://microsoft.github.io/apm/consumer/install-plugins/)** and **[marketplaces](https://microsoft.github.io/apm/consumer/installing-from-marketplaces/)** -- install Claude Code, GitHub Copilot and Codex plugins by name, locked like any other dependency
- **[MCP servers](https://microsoft.github.io/apm/consumer/install-mcp-servers/)** -- from the GitHub MCP Registry, your own registry, a local command or a remote URL
- **[Transitive dependencies](https://microsoft.github.io/apm/consumer/install-packages/#transitive-dependencies-and-the-lockfile)** -- packages can depend on packages; APM resolves the full tree
- **[Publish packages](https://microsoft.github.io/apm/producer/)** -- tag a release and consumers pin `your-org/your-package#v1.2.0`; fixes reach them as Dependabot or Renovate pull requests
- **[Build plugins](https://microsoft.github.io/apm/producer/build-a-plugin/)** -- keep your plugin's own dependencies declared and locked; `apm pack` writes the `plugin.json` each tool expects, including Codex's `.codex-plugin/plugin.json`
- **[CI/CD ready](https://microsoft.github.io/apm/consumer/run-in-ci/)** -- the [GitHub Action](https://github.com/microsoft/apm-action) installs from the lockfile on every run

### 2. Verified by lockfile

Agent context is executable in effect -- a prompt is a program for an LLM, and hooks and MCP servers start processes on your machine. APM records exactly what you installed and checks it on every clone and every pull request. A lockfile records what arrived, not that it can be trusted: review a new dependency, or a version bump, the way you review code.

- **[Lockfile integrity](https://microsoft.github.io/apm/reference/lockfile-spec/)** -- `apm.lock.yaml` pins each source to a commit and records a SHA-256 hash per package and per deployed file; a download that does not match is refused
- **[Reproducible installs](https://microsoft.github.io/apm/consumer/run-in-ci/)** -- `apm install --frozen` installs exactly what the lockfile records and fails when `apm.yml` disagrees
- **[Drift detection](https://microsoft.github.io/apm/enterprise/drift-detection/)** -- `apm audit` rebuilds what the lockfile describes and diffs it against your working tree; `apm audit --ci` makes it a pull-request check
- **[Content scanning](https://microsoft.github.io/apm/enterprise/security/)** -- every install scans for hidden Unicode that can carry instructions a reviewer cannot see, and blocks critical findings; it looks for hidden characters, not intent
- **[Approvals for hooks and MCP servers](https://microsoft.github.io/apm/consumer/approve-executables/)** -- `apm approve` records, in `apm.yml`, which packages may deploy executables, so the grant is reviewed like any other change
- **[Inventory export](https://microsoft.github.io/apm/reference/cli/lock/)** -- `apm lock export --format cyclonedx|spdx` lists what reached disk, straight from the lockfile -- an inventory for procurement, not an attestation

### 3. Governed by policy

Teams that run coding agents at scale end up building the same thing: a central team publishes approved skills, plugins and MCP servers through its own marketplace, and many repositories install from it. `apm-policy.yml` lets that team say which sources, MCP servers and executables the organization allows, inherited from an enterprise baseline that each organization can tighten but never loosen, and a required `apm audit --ci` check enforces it on every pull request. Policy starts in warn mode; you switch it to block when you are ready. That is the dependency layer for an agentic SDLC.

APM governs what gets installed; your harness governs what runs. Policy is not a sandbox.

- **[Build your organization's marketplace](https://microsoft.github.io/apm/enterprise/org-marketplace/)** -- publish approved capabilities as versioned packages that every repository installs by name and updates on purpose
- **[Set an org policy](https://microsoft.github.io/apm/enterprise/apm-policy/)** -- allow or deny sources, MCP servers and executables, in warn or block mode
- **[Gate pull requests](https://microsoft.github.io/apm/enterprise/enforce-in-ci/)** -- wire `apm audit --ci` into a required check, so a denied source fails the build
- **[Security model](https://microsoft.github.io/apm/enterprise/security/)** -- every control, its default, how to tighten it, and what stays your responsibility
- **[Roll out in stages](https://microsoft.github.io/apm/enterprise/)** -- from lockfiles to a blocking policy across hundreds of repositories, each stage reversible

## Get Started

#### macOS with Homebrew

```bash
brew install apm
```

No custom tap is required. Homebrew manages installation and updates:
use `brew upgrade apm`, not `apm self-update`.

#### Linux / macOS without Homebrew

```bash
curl -sSL https://aka.ms/apm-unix | sh
```

#### Windows

```powershell
irm https://aka.ms/apm-windows | iex
```

Native release binaries are published for macOS, Linux, and Windows x86_64.
For standalone installations, `apm self-update` reuses the matching platform installer.
You do not need Homebrew to use APM.

<details>
<summary>Other install methods: pip, WinGet, and Scoop</summary>

#### Linux / macOS

```bash
# pip (Python 3.11+)
pip install apm-cli
```

#### Windows

```powershell
# WinGet
winget install --id Microsoft.APM --exact --source winget
```

```powershell
# Scoop
scoop install apm
# pip
pip install apm-cli
```

</details>

Already using the Microsoft Homebrew tap? See the
[migration guide](https://microsoft.github.io/apm/getting-started/installation/#migrate-from-the-microsoft-tap).

Then follow the **[Quickstart](https://microsoft.github.io/apm/quickstart/)**: add a skill, a plugin and an MCP server, commit `apm.yml` and `apm.lock.yaml`, and check a teammate's fresh clone against the lockfile, in five minutes.

Teach your coding agent to use APM with the [official guide](https://github.com/microsoft/apm/tree/main/packages/apm-guide) (an expert agent plus the `apm-usage` skill):

```bash
apm install microsoft/apm/packages/apm-guide#v0.37.0
```

## Community

Created by [@danielmeppiel](https://github.com/danielmeppiel). Maintained by [@danielmeppiel](https://github.com/danielmeppiel) and [@sergio-sisternes-epam](https://github.com/sergio-sisternes-epam).

- [Roadmap](https://github.com/orgs/microsoft/projects/2304/views/5)
- [Discussions](https://github.com/microsoft/apm/discussions)
- [Contributing](CONTRIBUTING.md)
- [Adopters](ADOPTERS.md) -- organizations using APM, listed with their consent; [add yours](https://github.com/microsoft/apm/issues/new?template=adopter.yml)
- [AI Native Development guide](https://danielmeppiel.github.io/awesome-ai-native) -- a practical learning path for AI-native development

**In the ecosystem:** [Thoughtworks Technology Radar Vol. 35](https://www.thoughtworks.com/radar/tools/summary/agent-package-manager) places APM in Trial, describing it as a tool that treats agent context as a supply chain. [Dependabot and Renovate](https://microsoft.github.io/apm/consumer/update-and-refresh/) update APM manifests; [JFrog Artifactory](https://microsoft.github.io/apm/enterprise/org-marketplace/) offers Agent Packages repositories. The formats are an open specification, [OpenAPM v0.1](https://microsoft.github.io/apm/specs/openapm-v01/), with conformance tests.

---

**Built on open standards:** [AGENTS.md](https://agents.md) | [Agent Skills](https://agentskills.io) | [MCP](https://modelcontextprotocol.io)

## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
