apm-cli 0.7.6__tar.gz → 0.7.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. apm_cli-0.7.8/PKG-INFO +148 -0
  2. apm_cli-0.7.8/README.md +87 -0
  3. {apm_cli-0.7.6 → apm_cli-0.7.8}/pyproject.toml +2 -2
  4. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/bundle/packer.py +2 -1
  5. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/bundle/unpacker.py +20 -11
  6. apm_cli-0.7.8/src/apm_cli/cli.py +80 -0
  7. apm_cli-0.7.8/src/apm_cli/commands/_helpers.py +405 -0
  8. apm_cli-0.7.8/src/apm_cli/commands/compile.py +739 -0
  9. apm_cli-0.7.8/src/apm_cli/commands/config.py +169 -0
  10. apm_cli-0.7.8/src/apm_cli/commands/init.py +192 -0
  11. apm_cli-0.7.8/src/apm_cli/commands/install.py +1565 -0
  12. apm_cli-0.7.8/src/apm_cli/commands/list_cmd.py +102 -0
  13. apm_cli-0.7.8/src/apm_cli/commands/mcp.py +373 -0
  14. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/commands/pack.py +24 -5
  15. apm_cli-0.7.8/src/apm_cli/commands/prune.py +143 -0
  16. apm_cli-0.7.8/src/apm_cli/commands/run.py +218 -0
  17. apm_cli-0.7.8/src/apm_cli/commands/runtime.py +188 -0
  18. apm_cli-0.7.8/src/apm_cli/commands/uninstall.py +559 -0
  19. apm_cli-0.7.8/src/apm_cli/commands/update.py +136 -0
  20. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/target_detection.py +17 -7
  21. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/github_downloader.py +85 -28
  22. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/lockfile.py +4 -0
  23. apm_cli-0.7.8/src/apm_cli/drift.py +199 -0
  24. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/agent_integrator.py +7 -5
  25. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/base_integrator.py +11 -7
  26. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/command_integrator.py +3 -2
  27. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/hook_integrator.py +7 -5
  28. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/instruction_integrator.py +2 -1
  29. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/mcp_integrator.py +141 -11
  30. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/prompt_integrator.py +3 -2
  31. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/skill_integrator.py +36 -22
  32. apm_cli-0.7.8/src/apm_cli/models/__init__.py +38 -0
  33. apm_cli-0.7.8/src/apm_cli/models/apm_package.py +240 -0
  34. apm_cli-0.7.6/src/apm_cli/models/apm_package.py → apm_cli-0.7.8/src/apm_cli/models/dependency.py +11 -565
  35. apm_cli-0.7.8/src/apm_cli/models/validation.py +388 -0
  36. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/primitives/parser.py +4 -2
  37. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/utils/__init__.py +16 -1
  38. apm_cli-0.7.8/src/apm_cli/utils/diagnostics.py +237 -0
  39. apm_cli-0.7.8/src/apm_cli.egg-info/PKG-INFO +148 -0
  40. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli.egg-info/SOURCES.txt +16 -0
  41. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_github_downloader.py +128 -0
  42. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_lockfile.py +59 -0
  43. apm_cli-0.7.6/PKG-INFO +0 -274
  44. apm_cli-0.7.6/README.md +0 -213
  45. apm_cli-0.7.6/src/apm_cli/cli.py +0 -4511
  46. apm_cli-0.7.6/src/apm_cli/models/__init__.py +0 -23
  47. apm_cli-0.7.6/src/apm_cli.egg-info/PKG-INFO +0 -274
  48. {apm_cli-0.7.6 → apm_cli-0.7.8}/AUTHORS +0 -0
  49. {apm_cli-0.7.6 → apm_cli-0.7.8}/LICENSE +0 -0
  50. {apm_cli-0.7.6 → apm_cli-0.7.8}/setup.cfg +0 -0
  51. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/__init__.py +0 -0
  52. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/__init__.py +0 -0
  53. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/client/__init__.py +0 -0
  54. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/client/base.py +0 -0
  55. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/client/codex.py +0 -0
  56. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/client/copilot.py +0 -0
  57. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/client/vscode.py +0 -0
  58. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/package_manager/__init__.py +0 -0
  59. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/package_manager/base.py +0 -0
  60. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/adapters/package_manager/default_manager.py +0 -0
  61. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/bundle/__init__.py +0 -0
  62. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/bundle/lockfile_enrichment.py +0 -0
  63. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/commands/__init__.py +0 -0
  64. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/commands/deps.py +0 -0
  65. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/__init__.py +0 -0
  66. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/agents_compiler.py +0 -0
  67. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/claude_formatter.py +0 -0
  68. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/constants.py +0 -0
  69. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/constitution.py +0 -0
  70. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/constitution_block.py +0 -0
  71. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/context_optimizer.py +0 -0
  72. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/distributed_compiler.py +0 -0
  73. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/injector.py +0 -0
  74. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/link_resolver.py +0 -0
  75. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/compilation/template_builder.py +0 -0
  76. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/config.py +0 -0
  77. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/__init__.py +0 -0
  78. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/conflict_detector.py +0 -0
  79. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/docker_args.py +0 -0
  80. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/operations.py +0 -0
  81. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/safe_installer.py +0 -0
  82. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/script_runner.py +0 -0
  83. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/core/token_manager.py +0 -0
  84. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/__init__.py +0 -0
  85. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/aggregator.py +0 -0
  86. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/apm_resolver.py +0 -0
  87. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/collection_parser.py +0 -0
  88. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/dependency_graph.py +0 -0
  89. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/package_validator.py +0 -0
  90. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/plugin_parser.py +0 -0
  91. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/deps/verifier.py +0 -0
  92. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/factory.py +0 -0
  93. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/__init__.py +0 -0
  94. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/skill_transformer.py +0 -0
  95. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/integration/utils.py +0 -0
  96. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/models/plugin.py +0 -0
  97. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/output/__init__.py +0 -0
  98. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/output/formatters.py +0 -0
  99. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/output/models.py +0 -0
  100. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/output/script_formatters.py +0 -0
  101. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/primitives/__init__.py +0 -0
  102. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/primitives/discovery.py +0 -0
  103. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/primitives/models.py +0 -0
  104. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/registry/__init__.py +0 -0
  105. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/registry/client.py +0 -0
  106. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/registry/integration.py +0 -0
  107. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/registry/operations.py +0 -0
  108. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/__init__.py +0 -0
  109. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/base.py +0 -0
  110. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/codex_runtime.py +0 -0
  111. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/copilot_runtime.py +0 -0
  112. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/factory.py +0 -0
  113. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/llm_runtime.py +0 -0
  114. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/runtime/manager.py +0 -0
  115. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/utils/console.py +0 -0
  116. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/utils/github_host.py +0 -0
  117. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/utils/helpers.py +0 -0
  118. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/utils/version_checker.py +0 -0
  119. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/version.py +0 -0
  120. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/workflow/__init__.py +0 -0
  121. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/workflow/discovery.py +0 -0
  122. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/workflow/parser.py +0 -0
  123. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli/workflow/runner.py +0 -0
  124. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli.egg-info/dependency_links.txt +0 -0
  125. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli.egg-info/entry_points.txt +0 -0
  126. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli.egg-info/requires.txt +0 -0
  127. {apm_cli-0.7.6 → apm_cli-0.7.8}/src/apm_cli.egg-info/top_level.txt +0 -0
  128. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_apm_package_models.py +0 -0
  129. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_apm_resolver.py +0 -0
  130. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_codex_docker_args_fix.py +0 -0
  131. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_codex_empty_string_and_defaults.py +0 -0
  132. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_collision_integration.py +0 -0
  133. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_console.py +0 -0
  134. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_distributed_compilation.py +0 -0
  135. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_empty_string_and_defaults.py +0 -0
  136. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_enhanced_discovery.py +0 -0
  137. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_github_downloader_token_precedence.py +0 -0
  138. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_runnable_prompts.py +0 -0
  139. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_runtime_manager_token_precedence.py +0 -0
  140. {apm_cli-0.7.6 → apm_cli-0.7.8}/tests/test_virtual_package_multi_install.py +0 -0
apm_cli-0.7.8/PKG-INFO ADDED
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: apm-cli
3
+ Version: 0.7.8
4
+ Summary: MCP configuration tool
5
+ Author-email: Daniel Meppiel <user@example.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Classifier: Programming Language :: Python :: 3
29
+ Classifier: Programming Language :: Python :: 3.9
30
+ Classifier: Programming Language :: Python :: 3.10
31
+ Classifier: Programming Language :: Python :: 3.11
32
+ Classifier: Programming Language :: Python :: 3.12
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: OS Independent
35
+ Requires-Python: >=3.10
36
+ Description-Content-Type: text/markdown
37
+ License-File: LICENSE
38
+ License-File: AUTHORS
39
+ Requires-Dist: click>=8.0.0
40
+ Requires-Dist: colorama>=0.4.6
41
+ Requires-Dist: pyyaml>=6.0.0
42
+ Requires-Dist: requests>=2.28.0
43
+ Requires-Dist: python-frontmatter>=1.0.0
44
+ Requires-Dist: llm>=0.17.0
45
+ Requires-Dist: llm-github-models>=0.1.0
46
+ Requires-Dist: tomli>=1.2.0; python_version < "3.11"
47
+ Requires-Dist: toml>=0.10.2
48
+ Requires-Dist: rich>=13.0.0
49
+ Requires-Dist: rich-click>=1.7.0
50
+ Requires-Dist: watchdog>=3.0.0
51
+ Requires-Dist: GitPython>=3.1.0
52
+ Provides-Extra: dev
53
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
54
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
55
+ Requires-Dist: black>=23.0.0; extra == "dev"
56
+ Requires-Dist: isort>=5.0.0; extra == "dev"
57
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
58
+ Provides-Extra: build
59
+ Requires-Dist: pyinstaller>=6.0.0; extra == "build"
60
+ Dynamic: license-file
61
+
62
+ # APM – Agent Package Manager
63
+
64
+ **An open-source, community-driven dependency manager for AI agents.**
65
+
66
+ Think `package.json`, `requirements.txt`, or `Cargo.toml` — but for AI agent configuration.
67
+
68
+ GitHub Copilot · Claude Code
69
+
70
+ **[Documentation](https://microsoft.github.io/apm/)** · **[Quick Start](https://microsoft.github.io/apm/getting-started/quick-start/)** · **[CLI Reference](https://microsoft.github.io/apm/reference/cli-commands/)**
71
+
72
+ ## Why APM
73
+
74
+ AI coding agents need context to be useful — standards, prompts, skills, plugins — but today every developer sets this up manually. Nothing is portable nor reproducible. There's no manifest for it.
75
+
76
+ **APM fixes this.** Declare your project's agentic dependencies once in `apm.yml`, and every developer who clones your repo gets a fully configured agent setup in seconds — with transitive dependency resolution, just like npm or pip.
77
+
78
+ ```yaml
79
+ # apm.yml — ships with your project
80
+ name: your-project
81
+ version: 1.0.0
82
+ dependencies:
83
+ apm:
84
+ # Skills from any repository
85
+ - anthropics/skills/skills/frontend-design
86
+ # Plugins
87
+ - github/awesome-copilot/plugins/context-engineering
88
+ # Specific agent primitives from any repository
89
+ - github/awesome-copilot/agents/api-architect.agent.md
90
+ # A full APM package with instructions, skills, prompts, hooks...
91
+ - microsoft/apm-sample-package
92
+ ```
93
+
94
+ ```bash
95
+ git clone <org/repo> && cd <repo>
96
+ apm install # every agent is configured
97
+ ```
98
+
99
+ ## Highlights
100
+
101
+ - **One manifest for everything** — instructions, skills, prompts, agents, hooks, plugins, MCP servers
102
+ - **Install from anywhere** — GitHub, GitLab, Bitbucket, Azure DevOps, GitHub Enterprise, any git host
103
+ - **Transitive dependencies** — packages can depend on packages; APM resolves the full tree
104
+ - **Compile to standards** — `apm compile` produces `AGENTS.md` (GitHub Copilot) and `CLAUDE.md` (Claude Code)
105
+ - **Create & share** — `apm pack` bundles your current configuration as a zipped package
106
+ - **CI/CD ready** — [GitHub Action](https://github.com/microsoft/apm-action) for automated workflows
107
+
108
+ ## Get Started
109
+
110
+ ```bash
111
+ curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
112
+ ```
113
+
114
+ <details>
115
+ <summary>Other install methods</summary>
116
+
117
+ ```bash
118
+ # Homebrew
119
+ brew install microsoft/apm/apm
120
+ # pip
121
+ pip install apm-cli
122
+ ```
123
+
124
+ </details>
125
+
126
+ Then start adding packages:
127
+
128
+ ```bash
129
+ apm install microsoft/apm-sample-package
130
+ ```
131
+
132
+ See the **[Getting Started guide](https://microsoft.github.io/apm/getting-started/quick-start/)** for the full walkthrough.
133
+
134
+ ## Community
135
+
136
+ Created and maintained by [@danielmeppiel](https://github.com/danielmeppiel).
137
+
138
+ - [Roadmap & Discussions](https://github.com/microsoft/apm/discussions/116)
139
+ - [Contributing](CONTRIBUTING.md)
140
+ - [AI Native Development guide](https://danielmeppiel.github.io/awesome-ai-native) — a practical learning path for AI-native development
141
+
142
+ ---
143
+
144
+ **Built on open standards:** [AGENTS.md](https://agents.md) · [Agent Skills](https://agentskills.io) · [MCP](https://modelcontextprotocol.io)
145
+
146
+ ## Trademarks
147
+
148
+ 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.
@@ -0,0 +1,87 @@
1
+ # APM – Agent Package Manager
2
+
3
+ **An open-source, community-driven dependency manager for AI agents.**
4
+
5
+ Think `package.json`, `requirements.txt`, or `Cargo.toml` — but for AI agent configuration.
6
+
7
+ GitHub Copilot · Claude Code
8
+
9
+ **[Documentation](https://microsoft.github.io/apm/)** · **[Quick Start](https://microsoft.github.io/apm/getting-started/quick-start/)** · **[CLI Reference](https://microsoft.github.io/apm/reference/cli-commands/)**
10
+
11
+ ## Why APM
12
+
13
+ AI coding agents need context to be useful — standards, prompts, skills, plugins — but today every developer sets this up manually. Nothing is portable nor reproducible. There's no manifest for it.
14
+
15
+ **APM fixes this.** Declare your project's agentic dependencies once in `apm.yml`, and every developer who clones your repo gets a fully configured agent setup in seconds — with transitive dependency resolution, just like npm or pip.
16
+
17
+ ```yaml
18
+ # apm.yml — ships with your project
19
+ name: your-project
20
+ version: 1.0.0
21
+ dependencies:
22
+ apm:
23
+ # Skills from any repository
24
+ - anthropics/skills/skills/frontend-design
25
+ # Plugins
26
+ - github/awesome-copilot/plugins/context-engineering
27
+ # Specific agent primitives from any repository
28
+ - github/awesome-copilot/agents/api-architect.agent.md
29
+ # A full APM package with instructions, skills, prompts, hooks...
30
+ - microsoft/apm-sample-package
31
+ ```
32
+
33
+ ```bash
34
+ git clone <org/repo> && cd <repo>
35
+ apm install # every agent is configured
36
+ ```
37
+
38
+ ## Highlights
39
+
40
+ - **One manifest for everything** — instructions, skills, prompts, agents, hooks, plugins, MCP servers
41
+ - **Install from anywhere** — GitHub, GitLab, Bitbucket, Azure DevOps, GitHub Enterprise, any git host
42
+ - **Transitive dependencies** — packages can depend on packages; APM resolves the full tree
43
+ - **Compile to standards** — `apm compile` produces `AGENTS.md` (GitHub Copilot) and `CLAUDE.md` (Claude Code)
44
+ - **Create & share** — `apm pack` bundles your current configuration as a zipped package
45
+ - **CI/CD ready** — [GitHub Action](https://github.com/microsoft/apm-action) for automated workflows
46
+
47
+ ## Get Started
48
+
49
+ ```bash
50
+ curl -sSL https://raw.githubusercontent.com/microsoft/apm/main/install.sh | sh
51
+ ```
52
+
53
+ <details>
54
+ <summary>Other install methods</summary>
55
+
56
+ ```bash
57
+ # Homebrew
58
+ brew install microsoft/apm/apm
59
+ # pip
60
+ pip install apm-cli
61
+ ```
62
+
63
+ </details>
64
+
65
+ Then start adding packages:
66
+
67
+ ```bash
68
+ apm install microsoft/apm-sample-package
69
+ ```
70
+
71
+ See the **[Getting Started guide](https://microsoft.github.io/apm/getting-started/quick-start/)** for the full walkthrough.
72
+
73
+ ## Community
74
+
75
+ Created and maintained by [@danielmeppiel](https://github.com/danielmeppiel).
76
+
77
+ - [Roadmap & Discussions](https://github.com/microsoft/apm/discussions/116)
78
+ - [Contributing](CONTRIBUTING.md)
79
+ - [AI Native Development guide](https://danielmeppiel.github.io/awesome-ai-native) — a practical learning path for AI-native development
80
+
81
+ ---
82
+
83
+ **Built on open standards:** [AGENTS.md](https://agents.md) · [Agent Skills](https://agentskills.io) · [MCP](https://modelcontextprotocol.io)
84
+
85
+ ## Trademarks
86
+
87
+ 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.
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apm-cli"
7
- version = "0.7.6"
7
+ version = "0.7.8"
8
8
  description = "MCP configuration tool"
9
9
  readme = "README.md"
10
- requires-python = ">=3.9"
10
+ requires-python = ">=3.10"
11
11
  license = {file = "LICENSE"}
12
12
  authors = [
13
13
  {name = "Daniel Meppiel", email = "user@example.com"}
@@ -12,8 +12,9 @@ from ..core.target_detection import detect_target
12
12
  from .lockfile_enrichment import enrich_lockfile_for_pack
13
13
 
14
14
 
15
- # Target prefix mapping
15
+ # Target prefix mapping ("copilot" and "vscode" both map to .github/)
16
16
  _TARGET_PREFIXES = {
17
+ "copilot": [".github/"],
17
18
  "vscode": [".github/"],
18
19
  "claude": [".claude/"],
19
20
  "all": [".github/", ".claude/"],
@@ -6,7 +6,7 @@ import tarfile
6
6
  import tempfile
7
7
  from dataclasses import dataclass, field
8
8
  from pathlib import Path
9
- from typing import List
9
+ from typing import Dict, List
10
10
 
11
11
  from ..deps.lockfile import LockFile
12
12
 
@@ -18,6 +18,8 @@ class UnpackResult:
18
18
  extracted_dir: Path
19
19
  files: List[str] = field(default_factory=list)
20
20
  verified: bool = False
21
+ dependency_files: Dict[str, List[str]] = field(default_factory=dict)
22
+ skipped_count: int = 0
21
23
 
22
24
 
23
25
  def unpack_bundle(
@@ -93,18 +95,20 @@ def unpack_bundle(
93
95
  "apm.lock in the bundle could not be parsed — the bundle may be corrupt."
94
96
  )
95
97
 
96
- # Collect all deployed_files from lockfile
97
- all_deployed: list[str] = []
98
- for dep in lockfile.get_all_dependencies():
99
- all_deployed.extend(dep.deployed_files)
100
-
101
- # Deduplicate
98
+ # Collect deployed_files per dependency and deduplicated global list
99
+ dep_file_map: Dict[str, List[str]] = {}
102
100
  seen: set[str] = set()
103
101
  unique_files: list[str] = []
104
- for f in all_deployed:
105
- if f not in seen:
106
- seen.add(f)
107
- unique_files.append(f)
102
+ for dep in lockfile.get_all_dependencies():
103
+ dep_key = dep.get_unique_key()
104
+ dep_files: list[str] = []
105
+ for f in dep.deployed_files:
106
+ dep_files.append(f)
107
+ if f not in seen:
108
+ seen.add(f)
109
+ unique_files.append(f)
110
+ if dep_files:
111
+ dep_file_map[dep_key] = dep_files
108
112
 
109
113
  # 3. Verify completeness
110
114
  verified = True
@@ -128,11 +132,13 @@ def unpack_bundle(
128
132
  extracted_dir=bundle_path,
129
133
  files=unique_files,
130
134
  verified=verified,
135
+ dependency_files=dep_file_map,
131
136
  )
132
137
 
133
138
  # 4. Copy target files to output_dir (additive, no deletes)
134
139
  output_dir = Path(output_dir)
135
140
  output_dir_resolved = output_dir.resolve()
141
+ skipped = 0
136
142
  for rel_path in unique_files:
137
143
  # Guard against absolute paths or path-traversal entries in deployed_files
138
144
  p = Path(rel_path)
@@ -147,6 +153,7 @@ def unpack_bundle(
147
153
  )
148
154
  src = source_dir / rel_path
149
155
  if not src.exists():
156
+ skipped += 1
150
157
  continue # skip_verify may allow missing files
151
158
  if src.is_dir():
152
159
  shutil.copytree(src, dest, dirs_exist_ok=True)
@@ -158,6 +165,8 @@ def unpack_bundle(
158
165
  extracted_dir=bundle_path,
159
166
  files=unique_files,
160
167
  verified=verified,
168
+ dependency_files=dep_file_map,
169
+ skipped_count=skipped,
161
170
  )
162
171
  finally:
163
172
  # Clean up temp dir if we created one
@@ -0,0 +1,80 @@
1
+ """Command-line interface for Agent Package Manager (APM).
2
+
3
+ Thin wiring layer — all command logic lives in ``apm_cli.commands.*`` modules.
4
+ """
5
+
6
+ import sys
7
+
8
+ import click
9
+
10
+ from apm_cli.commands._helpers import (
11
+ ERROR,
12
+ RESET,
13
+ _check_and_notify_updates,
14
+ print_version,
15
+ )
16
+ from apm_cli.commands.compile import compile as compile_cmd
17
+ from apm_cli.commands.config import config
18
+ from apm_cli.commands.deps import deps
19
+ from apm_cli.commands.init import init
20
+ from apm_cli.commands.install import install
21
+ from apm_cli.commands.list_cmd import list as list_cmd
22
+ from apm_cli.commands.mcp import mcp
23
+ from apm_cli.commands.pack import pack_cmd, unpack_cmd
24
+ from apm_cli.commands.prune import prune
25
+ from apm_cli.commands.run import preview, run
26
+ from apm_cli.commands.runtime import runtime
27
+ from apm_cli.commands.uninstall import uninstall
28
+ from apm_cli.commands.update import update
29
+
30
+
31
+ @click.group(
32
+ help="Agent Package Manager (APM): The package manager for AI-Native Development"
33
+ )
34
+ @click.option(
35
+ "--version",
36
+ is_flag=True,
37
+ callback=print_version,
38
+ expose_value=False,
39
+ is_eager=True,
40
+ help="Show version and exit.",
41
+ )
42
+ @click.pass_context
43
+ def cli(ctx):
44
+ """Main entry point for the APM CLI."""
45
+ ctx.ensure_object(dict)
46
+
47
+ # Check for updates non-blockingly (only if not already showing version)
48
+ if not ctx.resilient_parsing:
49
+ _check_and_notify_updates()
50
+
51
+
52
+ # Register command groups
53
+ cli.add_command(deps)
54
+ cli.add_command(pack_cmd, name="pack")
55
+ cli.add_command(unpack_cmd, name="unpack")
56
+ cli.add_command(init)
57
+ cli.add_command(install)
58
+ cli.add_command(uninstall)
59
+ cli.add_command(prune)
60
+ cli.add_command(update)
61
+ cli.add_command(compile_cmd, name="compile")
62
+ cli.add_command(run)
63
+ cli.add_command(preview)
64
+ cli.add_command(list_cmd, name="list")
65
+ cli.add_command(config)
66
+ cli.add_command(runtime)
67
+ cli.add_command(mcp)
68
+
69
+
70
+ def main():
71
+ """Main entry point for the CLI."""
72
+ try:
73
+ cli(obj={})
74
+ except Exception as e:
75
+ click.echo(f"{ERROR}Error: {e}{RESET}", err=True)
76
+ sys.exit(1)
77
+
78
+
79
+ if __name__ == "__main__":
80
+ main()