AGPM - AGentic Package Manager
⚠️ Beta Software: This project is in active development. Use with caution in production environments.
A Git-based package manager for AI coding assistants (Claude Code, OpenCode, and more) that enables reproducible installations using lockfile-based dependency management, similar to Cargo.
Features
- 📦 Lockfile-based dependency management - Reproducible installations like Cargo
- 🌐 Git-based distribution - Install from any Git repository
- 🚀 No central registry - Fully decentralized approach
- 🤖 Multi-tool support - Claude Code, OpenCode (alpha), and custom tools
- 🔧 Seven resource types - Agents, Snippets, Commands, Scripts, Hooks, MCP Servers, Skills (alpha)
- 🎯 Pattern-based dependencies - Bulk installation with glob patterns
- 🖥️ Cross-platform - Windows, macOS, and Linux support
- 🔄 Transitive dependencies - Automatic dependency resolution
- 📝 Markdown templating - Dynamic content generation with dependency embedding and project file filter (opt-in)
Quick Start
Install
# macOS/Linux via Homebrew
# All platforms via Cargo
# Pre-built binaries
|
See the Installation Guide for more options and platform-specific instructions.
Basic Usage
# Initialize a new project
# Install dependencies
# Check for updates
# Update dependencies
# List installed resources
Example Manifest
# agpm.toml
[]
= "https://github.com/aig787/agpm-community.git"
[]
# Claude Code agent (default)
= { = "community", = "agents/rust-expert.md", = "v1.0.0" }
# OpenCode agent (alpha)
= { = "community", = "agents/assistant.md", = "v1.0.0", = "opencode" }
[]
# Shared snippets (default: .agpm/snippets/)
= { = "community", = "snippets/react-hooks.md", = "~1.2.0" }
[]
= { = "community", = "commands/deploy.md", = "v2.0.0" }
[]
# Directory-based expertise packages (alpha)
= { = "community", = "skills/rust-helper", = "v1.0.0" }
See docs/examples/ for more complete examples.
Core Commands
| Command | Description |
|---|---|
agpm init |
Initialize a new project |
agpm install |
Install dependencies from agpm.toml |
agpm update |
Update dependencies within version constraints |
agpm outdated |
Check for available updates |
agpm upgrade |
Self-update AGPM to the latest version |
agpm migrate |
Migrate from older AGPM versions to latest format |
agpm list |
List installed resources |
agpm validate |
Validate manifest and dependencies |
agpm add |
Add sources or dependencies |
agpm remove |
Remove sources or dependencies |
agpm config |
Manage global configuration |
agpm cache |
Manage the Git cache |
Run agpm --help for complete command reference or see Command Reference.
Progress Display
AGPM provides real-time visibility into installation progress with a clean, professional interface:
Installation Phases
⠁ Syncing sources
✓ Sources synced (0.8s)
⠂ Resolving dependencies
✓ Resolved 500 dependencies (1.2s)
⠄ Installing resources (127/500 complete)
→ agents/helper-122
→ agents/helper-123
→ agents/helper-124
→ snippets/example-45
→ commands/lint-67
→ agents/helper-125
→ agents/helper-126
✓ Installed 500 resources (12.3s)
✓ 300 agents
✓ 150 snippets
✓ 50 commands
✓ Finalizing installation (0.2s)
500 resources installed
2 MCP servers configured
Features
- Active Window: Shows which resources are currently being processed (5-10 lines)
- Real-time Updates: Resources appear and complete in real-time
- Timing Information: Each phase shows duration for performance insights
- Bounded Output: Terminal stays clean regardless of dependency count
- Resource Summary: Final breakdown by resource type (agents, snippets, etc.)
- Professional Display: Clean output without emoji prefixes
Resource Types
AGPM manages seven types of resources, installing to agpm/ subdirectories for easy gitignore management:
- Agents - AI assistant configurations (
.claude/agents/agpm/,.opencode/agent/agpm/) - Snippets - Reusable code templates (
.agpm/snippets/) - Commands - Slash commands (
.claude/commands/agpm/,.opencode/command/agpm/) - Scripts - Executable automation files (
.claude/scripts/agpm/) - Hooks - Event-based automation (→
.claude/settings.local.json) - MCP Servers - Model Context Protocol servers (→
.mcp.json,opencode.json) - Skills - Directory-based expertise packages (
.claude/skills/) 🚧 Alpha
See the Resources Guide for detailed information.
Templating Features
AGPM provides powerful template features for dynamic content generation in Markdown resources:
Dependency Content Embedding
Embed versioned content from AGPM dependencies:
agpm.templating: true
dependencies:
snippets:
{{ agpm.deps.snippets.rust_patterns.content }}
Project File Filter
Read and embed project-specific files (team docs, company standards):
agpm.templating: true
Key Features:
- 🔒 Secure: Path validation prevents traversal attacks
- 📁 Text files only:
.md,.txt,.json,.toml,.yaml - 🔄 Recursive: Project files can reference other project files (10-level depth)
- 🎯 Combine both: Use dependency content + project files together
See the Templating Guide for complete documentation and examples.
Documentation
| Guide | Description |
|---|---|
| Installation Guide | All installation methods and requirements |
| User Guide | Getting started and basic workflows |
| Command Reference | Complete command syntax and options |
| Multi-Tool Support | Managing resources for multiple AI assistants |
| Dependencies Guide | Version constraints, conflicts, and transitive dependencies |
| Resources Guide | Working with different resource types |
| Configuration Guide | Global config, authentication, and patches |
| Manifest Reference | Complete agpm.toml schema |
| Versioning Guide | Version constraints and Git references |
| Templating Guide | Dynamic content generation with Tera |
| Architecture | Technical details and design decisions |
| Examples | Sample configurations and use cases |
| FAQ | Frequently asked questions |
| Skills Guide | Directory-based expertise packages |
| Troubleshooting | Common issues and solutions |
Requirements
- Rust 1.85.0+ (for building from source)
- Git 2.0+ (for repository operations)
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Support
License
MIT License - see LICENSE.md for details.
Built with Rust 🦀 for reliability and performance