> For the complete documentation index, see [llms.txt](https://docs.loci-dev.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.loci-dev.net/loci-plugin-for-ai-coding-assistants/loci-plugin/installing-the-loci-plugin.md).

# Installing the LOCI Plugin

### Prerequisites

| Requirement                                                                              | Version                                                           | Required for                                                                                                                           |
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| [Claude Code](https://claude.ai/code)                                                    | latest                                                            | Everything                                                                                                                             |
| GitHub Copilot CLI                                                                       | 1.0.90 or newer \| Running LOCI in Copilot instead of Claude Code | Running LOCI in Copilot instead of Claude Code                                                                                         |
| Windows with Copilot CLI only: PowerShell 7 and Git for Windows, with its `bash` on PATH | /                                                                 | The plugin's hooks under Copilot                                                                                                       |
| Python                                                                                   | 3.12+                                                             | The `loci` CLI (local ELF/build analysis)                                                                                              |
| [uv](https://docs.astral.sh/uv/)                                                         | any                                                               | Installs the `loci` CLI as a tool. Install this yourself — the plugin checks for it and gives you the install command if it's missing. |
| jq                                                                                       | any                                                               | Session hooks. Install this yourself — the plugin checks for it and gives you the install command if it's missing.                     |
| Compiled binaries                                                                        | `.elf` / `.o` / `.axf`                                            | All skills                                                                                                                             |

**Cross-compiler** (one required, depending on your target):

| LOCI Target   | CPU / Silicon             | Default cross-compiler                                                           |
| ------------- | ------------------------- | -------------------------------------------------------------------------------- |
| `armv6-m`     | ARM Cortex-M0+            | `arm-none-eabi-gcc`                                                              |
| `armv7e-m`    | ARM Cortex-M4             | `arm-none-eabi-gcc`                                                              |
| `aarch64`     | ARM Cortex-A (A53)        | `aarch64-linux-gnu-gcc`                                                          |
| `neoverse-v2` | ARM Neoverse V2 (ARMv9-A) | `aarch64-linux-gnu-gcc` or `clang`, with `-mcpu=neoverse-v2` or `-march=armv9-a` |
| `tc399`       | Infineon TriCore TC3xx    | `tricore-elf-gcc`                                                                |

These are the only 4 architectures LOCI's analysis backend supports. Rust sources are also supported (via `rustc` — LOCI needs the matching `rustup target add` triple for your LOCI target); a project can mix C/C++ and Rust.

Inside Claude Code:

### Step 1 — Add Marketplace

```
/plugin marketplace add auroralabs-loci/loci-claude
```

### Step 2 - Install plugin

#### **Installing in Claude Code**

```
/plugin install loci@loci
```

There is no separate CLI download step. The `loci` command-line tool installs itself automatically in the background the first time a Claude Code session starts, using `uv`.

You can also do this through the interactive menu instead of typing the commands directly: run `/plugin`, then go to **Discover → LOCI** and **Install → LOCI**. Both paths do the same thing.

#### **Installing in GitHub Copilot CLI**

Requires Copilot CLI 1.0.90 or newer. Run these in a terminal, not inside a session:

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

Then start a Copilot session and continue from Step 4 ( `/loci:setup` ). Everything after that works the same as in Claude Code.

On Windows, Copilot runs every hook through PowerShell 7, which finds bash through PATH. Add C:\Program Files\Git\bin to PATH ahead of C:\Windows\System32 and check that `where.exe bash` lists Git's bash first. Claude Code finds Git Bash on its own, so this is a Copilot-only step.

[Using LOCI with GitHub Copilot CLI](https://app.gitbook.com/o/ZFw3dndBL81eukjWL25m/sites/site_IR0wP/s/S2ZTr9umTUpVzGSJHbuR/~/edit/~/changes/118/loci-plugin-for-ai-coding-assistants/loci-plugin/using-loci-with-github-copilot-cli)

### Step 3 — Reload plugin

```
/reload-plugins
```

**Required.** Claude Code needs this to pick up the newly installed plugin's hooks and skills in your current session — without it, LOCI won't be active yet even though the install succeeded.

### Step 4 — Run plugin

```
/loci:setup
```

**Required.** This installs the `loci` CLI (as a `uv` tool) and verifies your environment — compiler, architecture, and build system detection, plus the health checks covered in Troubleshooting. It's idempotent and safe to re-run any time; if `uv` or `jq` aren't already on your system, it tells you the exact install command for your OS instead of installing them for you (they need root/an interactive password prompt).

The plugin's `SessionStart` hook also attempts this install automatically in the background on every session start, but running `/loci:setup` explicitly is how you confirm it actually succeeded before relying on any skill.

### Step 5 — Sign in

```
! loci login
```

Opens your browser for a one-time sign-in. On SSH, containers or CI it switches to a device code automatically. Every analysis skill, and  `/loci:init` , needs a signed-in session. See Authenticating the LOCI Claude Plugin.

### Step 6 — Initialize your project

```
/loci:init
```

Required once per clone. Records how this project builds (target ISA, compiler, build system and the binary LOCI measures) in .loci/build.yaml. Every measurement after that compiles with these settings instead of guessing. If more than one target fits, LOCI asks you one question; otherwise it asks you to confirm what it found.

.loci/build.yaml and LOCI's own build output (.loci/build/) are machine-local and gitignored, so a fresh clone needs its own /loci:init. A git worktree of a repository you already set up on this machine reuses the recipe at session start, unless the recipe is tied to its folder (a container toolchain, an out-of-tree build, or a path outside the project). A .loci/build.yaml written on another machine is refused: run /loci:init once on each machine.

Run  `/loci:help` afterwards to see the recorded target, compiler and recipe path.

### You're done

Once setup reports healthy, the plugin is ready to use. Next, sign in — then try any on-demand skill (e.g. ask "What's the execution cost of `main()`?") or just start editing C/C++/Rust source and `loci-post-edit` will run automatically.

### Next steps

* [Authenticating the LOCI Claude Plugin](https://docs.loci-dev.net/loci-plugin-for-ai-coding-assistants/loci-plugin/authenticating-loci-plugin.md) - sign in before using any analysis skill
* [Skills Reference](https://docs.loci-dev.net/loci-plugin-for-ai-coding-assistants/loci-plugin/skills-reference-for-loci-plugin.md) - what each skill does
* [Troubleshooting](https://docs.loci-dev.net/loci-plugin-for-ai-coding-assistants/loci-plugin/troubleshooting.md) - if the install doesn't finish or a skill won't respond
