> For the complete documentation index, see [llms.txt](https://docs.auroralabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.auroralabs.com/loci-plugin-for-ai-coding-assistants/loci-plugin/using-loci-with-github-copilot-cli.md). Agents can also search and read this documentation through its [MCP server](https://docs.auroralabs.com/~gitbook/mcp).

# Using LOCI with GitHub Copilot CLI

The LOCI plugin runs in GitHub Copilot CLI as well as Claude Code. It is the same plugin from the same marketplace: Copilot reads its hooks and skills as they are, so skills, Plan Guard, Save Guard, verdicts and sign-in work the same way. This page covers only what is different.

### Prerequisites

| Requirement                                    | Version         | Notes                                       |
| ---------------------------------------------- | --------------- | ------------------------------------------- |
| GitHub Copilot CLI                             | 1.0.90 or newer | Verified on 1.0.90 and 1.0.91 on Windows 11 |
| Python                                         | 3.12+           | For the loci CLI                            |
| uv                                             | any             | Installs the loci CLI                       |
| Windows only: PowerShell 7 and Git for Windows |                 | See Windows setup below                     |
| Cross-compiler for your target                 |                 | See Installing the LOCI Claude Plugin       |

### Install

Run these in a terminal, not inside a Copilot session:

\`\`\`\
copilot plugin marketplace add auroralabs-loci/loci-claude\
copilot plugin install loci\@loci\
\`\`\`

Then start a Copilot session and run, in order:

\`\`\`\
/loci:setup\
! loci login\
/loci:init\
\`\`\`

`/loci:setup` installs the loci CLI. `! loci login` signs you in (Copilot's `!` runs the command in your shell, which is where the browser sign-in has to run). `/loci:init` records how your project builds.

Don't use `copilot plugin install auroralabs-loci/loci-claude`. It works, but Copilot marks direct installs as deprecated.

### Windows setup

Copilot CLI hands every hook command to PowerShell 7, which finds `bash` through PATH. The LOCI hooks are bash scripts, so PATH has to reach Git's bash first.

1. Install Git for Windows.
2. Add `C:\Program Files\Git\bin` to PATH, ahead of `C:\Windows\System32`. A default Git install adds only `Git\cmd`, and `System32\bash.exe` is the WSL launcher, not Git's bash.
3. Open a new terminal and run `where.exe bash`. Git's bash must be listed first.

Don't add `Git\usr\bin` instead: it would also shadow Windows' own `find`, `sort` and `timeout`. Claude Code finds Git Bash on its own, so this step is only needed for Copilot.

### What runs automatically

* **Plan Guard** (`loci-preflight`) runs in plan mode: `/plan` in a session, or a `--plan` run.
* **Save Guard** (`loci-post-edit`) runs after edits to C, C++, Rust, Go or Python source, or a header they include.
* The contract guard keeps `.loci/contract.yaml` and `.loci/build.yaml` read-only to the agent on every edit and command.
* Subagents inherit the parent turn's id, so their edits are filed under the same turn.

Copilot runs each session in a git worktree. A recipe you confirmed with `/loci:init` in one checkout is reused in other worktrees of the same repository on the same machine, unless the recipe is tied to its folder (a container toolchain, an out-of-tree build, or a path outside the project).

### Skill names

Always call LOCI skills as `/loci:<skill>`, for example `/loci:help` or `/loci:init`. Copilot's own `/init` and `/help` are Copilot commands, not LOCI's.

In programmatic mode (`copilot -p`), a bare `/init` or `/setup` resolves to the LOCI skill. That mode has no way to ask you a question, so `/loci:init` reports what it found instead of asking. Run `/loci:init` once in an interactive session first.

`/loci:setup doctor` runs diagnostics only and installs nothing.

### Check and update the version

\`\`\`\
copilot plugin list\
copilot plugin update loci\@loci\
\`\`\`

The marketplace serves what the public repository `auroralabs-loci/loci-claude` carries.

### Remove LOCI

\`\`\`\
copilot plugin uninstall loci\@loci\
copilot plugin marketplace remove loci\
\`\`\`

**Known issue on Windows** (Copilot CLI 1.0.90 and 1.0.91): uninstall can answer "Access is denied" while other Copilot sessions are open. Quit the other sessions and retry, or run `copilot plugin disable loci@loci` until you can. `copilot plugin marketplace remove loci --force` clears an entry the uninstall left behind.

### Related pages

* Installing the LOCI Claude Plugin
* Troubleshooting
