# Use OMP with multiple repositories
> OMP takes extra directories with --add-dir and can isolate subagents in worktrees; ivar adds a feature branch, one plan and one PR per repo.
Source: https://ivar.run/docs/with/omp

OMP (Oh My Pi) accepts extra workspace directories with `--add-dir` and can run subagents in isolated git worktrees. `ivar` adds the multi-repo layer: one feature branch, a write scope that is guarded (kernel-enforced on Linux; see [Limitations](/docs/reference/limitations)) on the repos you have not promoted, one plan, and one pull request per repo.

## What OMP does on its own

As of 2026-10-06, the OMP documentation lists three relevant pieces:

- **`--add-dir <dir>`** adds "a workspace directory beyond the working directory" and can be repeated ([CLI reference](https://github.com/can1357/oh-my-pi/blob/main/docs/cli-reference.md), accessed 2026-10-06).
- **`omp worktree`** (alias `wt`) adds, lists and cleans up git worktrees (same page, accessed 2026-10-06).
- **The `task` tool** runs subagents in parallel, optionally isolated in a worktree, and brings the patch back ([task tool](https://github.com/can1357/oh-my-pi/blob/main/docs/tools/task.md), accessed 2026-10-06).

What `--add-dir` grants beyond "workspace directory" is not documented. A branch shared across repos, a write scope per repo and coordinated pull requests are not documented.

## Install and create a hall

```sh
curl -fsSL https://ivar.run/install | sh
ivar init --provider omp
```

In an existing hall, `ivar provider add omp` registers the provider. Add each repo with `ivar repo add <name> <url>`. The [quickstart](/docs/quickstart) walks through it.

## One change across repos

The example hall has `api`, `web`, `shared-types` and `infra`. The request: add an `avatarUrl` field to the user profile, return it from the API and render it on the web profile page.

```sh
ivar feature create avatar-url
ivar feature promote avatar-url api
ivar feature promote avatar-url web
ivar feature promote avatar-url shared-types
ivar session start avatar-url --provider omp
```

Inside the session, run `/ivar-plan` and approve each gate. Then, from the hall:

```sh
ivar feature deliver avatar-url --preview
```

The preview lists three pull requests: `api`, `web` and `shared-types`. `infra` stays guarded and gets none.

## What lands in the session

An OMP session gets `AGENTS.md`, the hall's skills, `.omp/mcp.json`, a pre-tool hook for the write guard and an extension that registers the `/ivar-*` commands and completes feature names. See [the OMP provider](/docs/providers/omp).

## MCP servers

Declare each server once in `ivar.json`. `ivar sync` writes `.omp/mcp.json` with an OAuth `auth` block per `http` server, and `ivar mcp auth` runs the flow that OMP then refreshes. See [MCP for OMP](/docs/guide/mcp/providers/omp).

## Limits

- `ivar` runs on Linux and macOS. Windows is not supported.
- OMP's worktrees and ivar's are separate mechanisms: `ivar` names one branch and puts a worktree on it in each repo you promote.
- OMP loads the hall's guard as an in-process pre-tool hook. The hook calls `ivar guard --provider omp`, so its policy is the same one the other providers use. On Linux, kernel-level enforcement applies only to a session launched with `ivar session start`. See [Limitations](/docs/reference/limitations).
- Isolation across several repos is not documented.

## FAQ

### Does `--add-dir` give OMP write access to the extra directory?

Not documented beyond "workspace directory". In an `ivar` session, write access follows what you promoted.

### Is OMP the same as Pi?

OMP is a fork of Pi from Stencil Labs, under the MIT license ([repository](https://github.com/can1357/oh-my-pi), accessed 2026-10-06).

### Can OMP open a PR for several repos at once?

Not documented. `ivar feature deliver avatar-url --preview` shows one pull request per promoted repo before anything is pushed.
