apm — Agent Package Manager
Write an agent once. Install it everywhere.
A local-first CLI package manager for AI agent and skill files.
apm syncs your library of agent definitions and manages installation into the agent runtimes it currently verifies end-to-end.
It handles: install, diff, update, import, and optional GitHub sync — all with atomic writes, locking, and backups.
| Status | Targets |
|---|
| Managed now | Claude Code agents and skills, Gemini CLI agents, Codex skills, Windsurf skills, agents-dir generic store |
| Coming soon / not yet verified end-to-end | Cursor, Continue, Codex agents, Windsurf rules, Gemini skills, generic export UX |
This tool is under active development. It may contain bugs. Always back up your data.
Features
📚 One Library, All Tools
Define an agent once in your library. Install it to the runtimes `apm` currently verifies — with the right format for each.
|
🔄 Sync State Tracking
Always know what's installed, what's outdated, and what's drifted. apm list gives you a full picture at a glance.
|
📥 Import Agents
Already have agents scattered across tool directories? apm import brings them into your library with a single command.
|
☁️ GitHub Sync
Back up and share your library via GitHub. Monorepo or per-agent mode. Push, pull, and diff from the CLI.
|
🛡️ Safe by Default
Atomic writes, file locking, and automatic backups before every destructive operation. No silent overwrites.
|
🗂️ Categories
Tag agents with a category and install entire groups at once. Keep your library organized as it grows.
|
Problems apm solves
| Without apm | With apm |
|---|
| ❌ You copy-paste the same agent prompt into multiple coding tools — and they drift apart over time. | ✅ One source of truth in your library. Install to supported runtimes with one command. |
❌ You edit an agent directly in ~/.claude/agents/ and forget which version is canonical. | ✅ Library always wins. Runtime is treated as a deploy target, never the source. |
| ❌ You have no idea which installed agents are outdated or missing after switching machines. | ✅ apm list shows sync state for every agent — in-sync, outdated, ready, or unmanaged. |
❌ You accumulate random .md files in your agents directories with no record of where they came from. | ✅ Every installed file is stamped with apm.id, platform, and install timestamp. |
| ❌ Updating an agent means manually finding and overwriting files across multiple tools. | ✅ apm update reinstalls every outdated agent in one shot, with backups. |
Install
git clone https://github.com/alexsmedile/apm.git
cd apm
bash install.sh # links apm into ~/.local/bin
apm setup # configure library path, platform, optional GitHub
Requirements:
- bash 4+
- python3 + PyYAML (
pip3 install pyyaml)
- git (optional, for GitHub sync)
Quickstart
apm list # show all agents and sync state
apm install agent-mentor # install agent to runtime (~/.claude/agents/)
apm link agent-mentor # symlink runtime file directly to split instructions
apm diff agent-mentor # compare library vs runtime
apm update # reinstall all outdated agents
apm import # import unmanaged runtime agents into library
# Skills
apm -s list # list all skills and sync state
apm -s find browser-use # search library
apm -s -p cc install browser-use # install to claude-code
apm -s -p cc,agt install browser-use # install to multiple platforms at once
apm -s -p cc install --all # install all ready/outdated skills
Library layout
apm supports different canonical layouts for agents and skills.
Agents:
agents_db/
agent-mentor/
agent-mentor.md # required root file
instructions/ # optional
[email protected] # optional generic active body
[email protected] # optional platform-specific body
versions/ # optional snapshots/backups/history
Agent rules:
- The canonical ID is the folder name.
- The required root file is
<id>/<id>.md.
instructions/ is optional and keeps the current body split out of the root file.
- Body resolution order is
<id>.<platform-alias>@latest.md → <id>@latest.md → <id>_latest.md (legacy) → root file body.
Skills:
Preferred monorepo-style layout:
skills_db/
repo-name/
skills/
browser-use/
SKILL.md
shadcn/
SKILL.md
Fallback direct layout: