Dependency manager for the Claude ecosystem — rules, skills, agents, commands, hooks, MCP servers.
$git clone https://github.com/surt/cleoInstalls into the current project.
Install cleo by running `git clone https://github.com/surt/cleo`, then use it for the current task and follow its documentation at https://github.com/surt/cleo.
| 1 | <p align="center"> |
| 2 | <img src="cleo-icon-240.png" alt="cleo logo" width="120" /> |
| 3 | </p> |
| 4 | |
| 5 | # cleo |
| 6 | |
| 7 | [](https://github.com/Surt/cleo/actions/workflows/ci.yml) |
| 8 | [](https://pypi.org/project/ClaudeCleo/) |
| 9 | [](LICENSE) |
| 10 | [](https://www.python.org/) |
| 11 | |
| 12 | **npm · pip · composer · cargo — for everything that goes in `.claude/`.** |
| 13 | |
| 14 | cleo is a dependency manager for the Claude ecosystem. One manifest pulls rules, skills, agents, commands, hooks, and MCP configs from dozens of authors — `cleo install` gives your whole team the same setup, `cleo update` keeps it current as each author ships fixes. |
| 15 | |
| 16 | ```bash |
| 17 | cleo require Surt/cleo-plan-then-doc # fetches from github.com/Surt/cleo-plan-then-doc |
| 18 | cleo install # install everything from cleo.json (lock-strict) |
| 19 | cleo update # update to latest matching versions |
| 20 | cleo remove Surt/cleo-plan-then-doc # uninstall + clean up |
| 21 | ``` |
| 22 | |
| 23 | No registration. No central server. `vendor/name` resolves to `github.com/vendor/name` automatically. |
| 24 | |
| 25 | Each install is validated (safe paths, git refs, manifest shape, hook size) and pinned by commit SHA in `cleo.lock` — reproducible across machines, auditable in review. |
| 26 | |
| 27 | The README has two halves: [**Use cleo**](#use-cleo-install-packages-into-your-project) (consume packages in your project) and [**Publish a cleo package**](#publish-a-cleo-package) (author and share your own). |
| 28 | |
| 29 | --- |
| 30 | |
| 31 | ## Install cleo |
| 32 | |
| 33 | **As a Claude Code plugin** (gets you `/cleo-install`, `/cleo-require`, etc.): |
| 34 | |
| 35 | ``` |
| 36 | /plugin marketplace add https://github.com/Surt/cleo |
| 37 | /plugin install cleo@cleo |
| 38 | ``` |
| 39 | |
| 40 | **Via pip** (works anywhere, no Claude Code needed): |
| 41 | |
| 42 | ```bash |
| 43 | pip install ClaudeCleo |
| 44 | ``` |
| 45 | |
| 46 | **From source** (if you prefer to clone): |
| 47 | |
| 48 | ```bash |
| 49 | git clone https://github.com/Surt/cleo |
| 50 | cd cleo && ln -s "$PWD/cleo" /usr/local/bin/cleo # or add to PATH |
| 51 | pip install pyyaml |
| 52 | ``` |
| 53 | |
| 54 | Windows: add `cleo.cmd` to PATH instead. |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## Use cleo (install packages into your project) |
| 59 | |
| 60 | ### Add your first package |
| 61 | |
| 62 | The fastest path is to ask cleo to do it. From inside a Claude Code session: |
| 63 | |
| 64 | ``` |
| 65 | /cleo-require Surt/cleo-plan-then-doc |
| 66 | ``` |
| 67 | |
| 68 | Or from the terminal: |
| 69 | |
| 70 | ```bash |
| 71 | cleo require Surt/cleo-plan-then-doc # latest matching tag |
| 72 | cleo require Surt/cleo-plan-then-doc@^0.1 # with a version constraint |
| 73 | cleo require Surt/cleo-plan-then-doc --local # gitignored, this repo only |
| 74 | ``` |
| 75 | |
| 76 | On first run, cleo scaffolds `cleo.json` for you if none exists, resolves the latest matching tag, fetches the package, copies its content into `.claude/`, and writes `cleo.lock`. After that: |
| 77 | |
| 78 | ```bash |
| 79 | cleo update # bump matching versions |
| 80 | cleo list # see what's installed |
| 81 | cleo remove Surt/cleo-plan-then-doc |
| 82 | ``` |
| 83 | |
| 84 | ### Commands |
| 85 | |
| 86 | | Command | Description | |
| 87 | |---|---| |
| 88 | | `cleo init` | Scaffold a starter `cleo.json` | |
| 89 | | `cleo install` | Install from `cleo.json` (lock-strict when `cleo.lock` exists) | |
| 90 | | `cleo require <vendor/pkg> [--repo <url>]` | Add a package and install it | |
| 91 | | `cleo remove <vendor/pkg>` | Uninstall — removes files, MCP entries, hooks, manifest entry | |
| 92 | | `cleo update [<vendor/pkg>]` | Re-resolve within constraints, update lock | |
| 93 | | `cleo list` | Show installed packages | |
| 94 | | `cleo check` | Validate manifest, report missing files, detect on-disk drift | |
| 95 | |
| 96 | **Claude Code slash commands** — same ops, inside a session: `/cleo-install` · `/cleo-require` · `/cleo-remove` · `/cleo-update` · `/cleo-list`. `/cleo-require` accepts `--repo <url>`. |
| 97 | |
| 98 | ### Where files land |
| 99 | |
| 100 | Each package's content maps directly to Claude Code surfaces: |
| 101 | |
| 102 | | In the package | Installed to | Claude Code concept | |
| 103 | |---|---|---| |
| 104 | | `rules/*.md` | `.claude/rules/` | [Memory rules](https://code.claude.com/docs/en/memory) | |
| 105 | | `skills/*/SKILL.md` | `.claude/skills/` | [Skills](https://code.claude.com/docs/en/skills) | |
| 106 | | `agents/*.md` | `.claude/agents/` | [Subagents](https://code.claude.com/docs/en/sub-agents) | |
| 107 | | `commands/*.md` | `.claude/commands/` | Slash commands (legacy form; merged into skills upstream) | |
| 108 | | `hooks/*.sh` | `.claude/hooks/` + `settings.json` | [Tool-event hooks](https://code.claude.com/docs/en/hooks) | |
| 109 | | `mcp.json` | `settings.json` → `mcpServers` | [MCP servers](https://code.claude.com/docs/en/mcp) | |
| 110 | |
| 111 | cleo fetches into `~/.claude/cleo/packages/<vendor>/<name>/<version>/` (version-pinned cache), then copies into your project. Installed files are prefixed `cleo-<vendor>-<pkg>-` so they never collide with hand-written ones. |
| 112 | |
| 113 | ### Your `cleo.json` |
| 114 | |
| 115 | `cleo require` writes one for you, but here's what it looks like (and what you'd edit by hand). Full schema: [`spec/cleo-json.md`](spec/cleo-json.md). |
| 116 | |
| 117 | ```json |
| 118 | { |
| 119 | "name": "my-project", |
| 120 | "require": { |
| 121 | "acme/cleo-generic": "^1.0", |
| 122 | "acme/cleo-example": "^1.0", |
| 123 | "acme/cleo-mcp-example": "^2.0 |