Metadata-Version: 2.4
Name: apm-cli
Version: 0.6.0
Summary: MCP configuration tool
Author-email: Daniel Meppiel <user@example.com>
License: MIT License
        
        Copyright (c) 2025 Daniel Meppiel
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: click>=8.0.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: python-frontmatter>=1.0.0
Requires-Dist: llm>=0.17.0
Requires-Dist: llm-github-models>=0.1.0
Requires-Dist: tomli>=1.2.0; python_version < "3.11"
Requires-Dist: toml>=0.10.2
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
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Provides-Extra: build
Requires-Dist: pyinstaller>=6.0.0; extra == "build"
Dynamic: license-file

# APM – Agent Package Manager

[![PyPI version](https://badge.fury.io/py/apm-cli.svg)](https://badge.fury.io/py/apm-cli)
[![CI/CD Pipeline](https://github.com/danielmeppiel/apm/actions/workflows/build-release.yml/badge.svg)](https://github.com/danielmeppiel/apm/actions/workflows/build-release.yml)
[![Downloads](https://img.shields.io/pypi/dm/apm-cli.svg)](https://pypi.org/project/apm-cli/)
[![GitHub stars](https://img.shields.io/github/stars/danielmeppiel/apm.svg?style=social&label=Star)](https://github.com/danielmeppiel/apm/stargazers)

**npm for AI coding agents.** Package guardrails, workflows, and personas. Deploy to every agent.

GitHub Copilot · Cursor · Claude · Codex · Gemini

## Install

```bash
curl -sSL https://raw.githubusercontent.com/danielmeppiel/apm/main/install.sh | sh
```

## Quick Start

```bash
# Install a compliance package from GitHub (github.com/danielmeppiel/compliance-rules)
apm install danielmeppiel/compliance-rules

# Generate context for all AI agents  
apm compile
```

**Done.** Your AI agents now respect GDPR, security standards, and audit requirements.

## What APM Does

```
┌─────────────────────────────────────────────────────────────────┐
│  APM Packages (hosted on GitHub, Azure DevOps)                  │
│  ├── Guardrails   → Rules, compliance, standards                │
│  ├── Workflows    → Executable prompts, abilities               │
│  └── Personas     → Specialized AI agents                       │
└─────────────────────────────────────────────────────────────────┘
                              │
                    apm install && apm compile
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│  Universal Output                                               │
│  ├── AGENTS.md      → GitHub Copilot, Cursor, Codex, Gemini     │
│  ├── CLAUDE.md      → Claude Code, Claude Desktop               │
│  ├── .github/       → VSCode native prompts & agents            │
│  └── .claude/       → Claude native commands & skills           │
└─────────────────────────────────────────────────────────────────┘
```

**One package. Every AI agent. Native format for each.**

> 💡 **Install any `.prompt.md` or `.agent.md` directly from GitHub!**  
> Explore ready-to-use prompts and agents at [github/awesome-copilot](https://github.com/github/awesome-copilot) and install them with a simple command:  
> `apm install github/awesome-copilot/prompts/code-review.prompt.md`

## Real Example: corporate-website

A production project using APM with layered guardrails:

```yaml
# apm.yml
name: corporate-website
dependencies:
  apm:
    - danielmeppiel/compliance-rules    # GDPR, security, audit
    - danielmeppiel/design-guidelines   # Accessibility, UI standards
```

```bash
apm install && apm compile
```

→ [View the full example](https://github.com/danielmeppiel/corporate-website)

## Commands

| Command | What it does |
|---------|--------------|
| `apm install <pkg>` | Add package to project |
| `apm compile` | Generate agent context files |
| `apm init` | Create new APM project |
| `apm run <prompt>` | Execute a workflow |
| `apm deps list` | Show installed packages |

## Install From Anywhere

```bash
# GitHub
apm install owner/repo

# GitHub Enterprise  
apm install ghe.company.com/owner/repo

# Azure DevOps
apm install dev.azure.com/org/project/repo

# Single file (Virtual Package)
apm install github/awesome-copilot/prompts/code-review.prompt.md
```

## Create Your Own Package

```bash
apm init my-standards && cd my-standards
```

Add primitives to the `.apm/` folder (similar to VSCode's `.github/` convention):

```
.apm/
├── instructions/    # Guardrails (.instructions.md)
├── prompts/         # Workflows (.prompt.md)  
└── agents/          # Personas (.agent.md)
```

Example guardrail:

```bash
cat > .apm/instructions/python.instructions.md << 'EOF'
---
applyTo: "**/*.py"
---
# Python Standards
- Use type hints for all functions
- Follow PEP 8 style guidelines
EOF

# Push and share
git add . && git commit -m "Initial standards" && git push
```

Anyone can now run: `apm install you/my-standards`

## Installation Options

```bash
# Quick install (recommended)
curl -sSL https://raw.githubusercontent.com/danielmeppiel/apm/main/install.sh | sh

# Homebrew
brew tap danielmeppiel/apm-cli && brew install apm-cli

# pip
pip install apm-cli
```

## Target Specific Agents

```bash
apm compile                    # Auto-detects from .github/ and .claude/ folders
apm compile --target vscode    # AGENTS.md + .github/ only
apm compile --target claude    # CLAUDE.md + .claude/ only
apm compile --target all       # Force all formats
```

## Advanced Configuration

For private packages, Azure DevOps, or running prompts via AI runtimes:

| Token | Purpose |
|-------|---------|
| `GITHUB_APM_PAT` | Private GitHub packages |
| `ADO_APM_PAT` | Azure DevOps packages |
| `GITHUB_COPILOT_PAT` | Running prompts via `apm run` |

→ [Complete setup guide](docs/getting-started.md)

---

## Community Packages

[![Install with APM](https://img.shields.io/badge/📦_Install_with-APM-blue?style=flat-square)](https://github.com/danielmeppiel/apm#community-packages)

| Package | Description |
|---------|-------------|
| [danielmeppiel/compliance-rules](https://github.com/danielmeppiel/compliance-rules) | GDPR, security, audit workflows |
| [danielmeppiel/design-guidelines](https://github.com/danielmeppiel/design-guidelines) | Accessibility, UI standards |
| [DevExpGbb/platform-mode](https://github.com/DevExpGbb/platform-mode) | Platform engineering patterns |
| [Add yours →](https://github.com/danielmeppiel/apm/discussions/new) | |

---

## Documentation

### Getting Started
| Guide | Description |
|-------|-------------|
| [Quick Start](docs/getting-started.md) | Complete setup, tokens, first project |
| [Core Concepts](docs/concepts.md) | How APM works, the primitives model |
| [Examples](docs/examples.md) | Real-world patterns and use cases |

### Reference
| Guide | Description |
|-------|-------------|
| [CLI Reference](docs/cli-reference.md) | All commands and options |
| [Compilation Engine](docs/compilation.md) | Context optimization algorithm |
| [Integrations](docs/integrations.md) | VSCode, Spec-kit, MCP servers |

### Advanced
| Guide | Description |
|-------|-------------|
| [Dependencies](docs/dependencies.md) | Package management deep-dive |
| [Primitives](docs/primitives.md) | Building advanced workflows |
| [Contributing](CONTRIBUTING.md) | Join the ecosystem |

---

**Learn AI-Native Development** → [Awesome AI Native](https://danielmeppiel.github.io/awesome-ai-native)  
A practical learning path for AI-Native Development, leveraging APM along the way.
