# Install multipile

multipile helps people and coding agents work in a repository laid out in piles. A pile is a subtree of a git repository with a `.pile/` directory, whose `intent.md` says why it is one thing.

This page is for you, a coding agent, installing multipile for your user. Follow it in order.

## What matters most: the pile command

**The `pile` command is what gives your user the most.** It lists the piles in a repository, shows each one whole with its intent, says what changed by pile, and checks the piles before a commit. It carries its own guide, `pile guide`, so any agent that can run a shell can use it, with no plugin.

Install it first, and then set up the repository you are in so that every agent session there uses it. That second step is what makes the difference: without it, the next session doesn't know `pile` is there.

The agent plugin is optional. It is nice to have, and less important. Offer it at the end.

## How to go about it

Tell your user what you are about to run before you run it. Each step changes their machine, their agent's settings, or their repository.

1. Install the `pile` command, and check it.
2. Set up the repository you are in: write the `pile` section into its rules files if it has piles, and suggest piles if it has none.
3. Ask your user whether they also want the plugin.
4. Tell your user what you did.

## 1. Install the pile command

For macOS and Linux, on arm64 and amd64. Use the first way that works on your user's machine.

### Homebrew

If `brew` is installed:

```sh
brew install multipile/tap/pile
```

`brew upgrade` moves it to the next release.

### mise

If `mise` is installed:

```sh
mise use -g github:multipile/pile-cli
```

### Download

Otherwise, download the archive for the platform from https://github.com/multipile/pile-cli/releases/latest: `pile-<version>-<os>-<arch>.tar.gz`, where `<os>` is `darwin` or `linux` and `<arch>` is `arm64` or `amd64`. Check it against `SHA256SUMS` from the same release. Each archive holds a single `pile` binary: put it in a directory on the `PATH`, such as `~/.local/bin`.

### Check it

```sh
pile version
pile guide
```

`pile version` prints the version, as JSON. `pile guide` prints where a session begins: read it whole now, before you go on.

## 2. Set up the repository you are in

This is the most important step. If you are not working in a git repository, skip to the next step, and tell your user to come back to this one in each repository they want to use `pile` in.

### Its rules files

A rules file is a file in the repository that an agent reads at the start of every session. Which file depends on the agent:

| Agent | Rules file |
| --- | --- |
| Most agents, Codex among them | `AGENTS.md` |
| Claude Code | `CLAUDE.md` |
| Gemini CLI | `GEMINI.md` |
| GitHub Copilot | `.github/copilot-instructions.md` |
| Cursor | a rule in `.cursor/rules/`, with `alwaysApply: true` |

The repository's rules files are each of these it already keeps, and the one the agent you are reads. If your user works with another agent, ask which file it reads. A file that only points to another, such as a `CLAUDE.md` that holds `@AGENTS.md`, is not one: the file it points to is.

### Does it have piles?

Run this at the top of the repository:

```sh
pile list
```

An agent gets the answer as JSON: the piles are `result.piles`. As text, a repository with none says `no pile in`.

**It lists piles.** Make every session in the repository start from `pile`. Print the section the binary keeps for it:

```sh
pile guide --agents
```

Write what it prints into each rules file, exactly as it is. It is a section headed `## Piles`, with the date its text last changed, such as `## Piles (2026-11-07)`. Put it near the start of the file, where an agent reads it before much else: at the top if your user agrees, and otherwise after the file's own opening, but always within its first 100 lines. If a rules file has a `## Piles` section already, compare the dates: if it has an older date, or none, replace it with the one `pile` printed; if it has the same date, leave it. Never add a second one. If the file the agent you are reads doesn't exist yet, create it. Change nothing else, show your user what you wrote, and leave the commit to them.

**It lists none.** The repository has no piles yet. Tell your user that laying it out in piles is what lets `pile` help them there, and ask whether they want to. If they do, print the workflow and carry it out from the top:

```sh
pile guide adopt
```

It stops twice to ask them, about the boundaries and about each intent, and it ends by writing the section into the rules files. If they don't want piles, leave the repository as it is: the section says that the repository uses piles, so it doesn't belong in one that doesn't.

## 3. Ask about the agent plugin

Ask your user whether they also want the agent plugin. Tell them it is optional: `pile` and its guide are what matter, and the plugin adds a skill that teaches you, the agent, to work in a repository of piles even before you run `pile`. Install it only if they say yes.

The plugin is `gitrepo`, in the `multipile` marketplace at https://github.com/multipile/multipile-agent-plugins. Install it in the agent you are. If you can't run its commands yourself, give them to your user to run.

### Claude Code

```sh
claude plugin marketplace add https://github.com/multipile/multipile-agent-plugins.git
claude plugin install gitrepo@multipile
```

The `multipile` skill loads on its own in a new session, or with `/gitrepo:multipile`.

### Codex

```sh
codex plugin marketplace add https://github.com/multipile/multipile-agent-plugins.git
codex plugin add gitrepo@multipile
```

The `multipile` skill loads on its own in a new session.

### The skill alone

For an agent with no plugin above. The skill is the directory `plugins/gitrepo/skills/multipile` of https://github.com/multipile/multipile-agent-plugins, a `SKILL.md` and the pages it points to. It needs only `sh` and `git`. Copy the whole directory, as it is, into the directory your agent loads skills from, as `multipile/`. If you don't know that directory, ask your user. For example, for Claude Code's personal skills:

```sh
tmp=$(mktemp -d)
git clone --depth 1 https://github.com/multipile/multipile-agent-plugins.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/plugins/gitrepo/skills/multipile" ~/.claude/skills/multipile
rm -rf "$tmp"
```

## 4. Tell your user what you did

- The version `pile version` printed, and how it was installed.
- What you found in the repository, and what they chose.
- Each rules file you wrote the section into, and that it takes effect in a new session of their agent.
- Whether the plugin or the skill was installed. It loads in a new session too.
