> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macroscope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI (beta)

> Run Macroscope locally from your editor or terminal and fix issues before you push

## Install

```bash theme={null}
curl -sSL https://raw.githubusercontent.com/prassoai/macroscope-local/main/install.sh | bash
```

<Frame>
  <video autoPlay muted loop playsInline>
    <source src="https://mintcdn.com/macroscope/c3GfIPtOyXZhDPRo/images/CLI-demo.mp4?fit=max&auto=format&n=c3GfIPtOyXZhDPRo&q=85&s=1e33bc7d0b361039adb592aa1eb4fdfa" type="video/mp4" data-path="images/CLI-demo.mp4" />
  </video>
</Frame>

The installer:

* Installs `macroscope`
* Adds it to your shell `PATH`
* Installs the Macroscope plugin for supported local setups of Claude Code, Codex, Cursor, and OpenCode
* Starts the setup wizard so you can sign in and choose a workspace

<Note>
  If your agent was already open, relaunch it after installation so the Macroscope command appears.
</Note>

## Use the Agent Plugin

Use the Macroscope plugin from inside your coding tool:

```text theme={null}
Claude Code: /macroscope:codereview
Codex:       /macroscope:codereview
Cursor:      /codereview
OpenCode:    /macroscope-codereview
```

This is the local review flow.

Your agent will:

* start a Macroscope review on the current branch
* watch for findings as they arrive
* explain each issue in plain language
* validate whether the issue is real
* ignore false positives
* fix confirmed issues one at a time
* verify the fix and report what it addressed

You can either invoke the command directly or simply ask your agent to use Macroscope on the current branch.

## Run the Autopilot Loop

If you want a more hands-off pass, use the loop variant:

```text theme={null}
Claude Code: /macroscope:autoloop
Codex:       /macroscope:autoloop
Cursor:      /autoloop
OpenCode:    /macroscope-autoloop
```

Loop mode runs a local-only review-and-fix cycle. Your agent reviews the branch, fixes confirmed issues directly in your working tree, commits the fixes, then re-reviews to catch regressions — up to five iterations or until a clean pass.

Loop mode is entirely local. It does not interact with GitHub, open PRs, or wait for remote checks. Use it when you want Macroscope to keep driving instead of stopping after a single review pass.

## Typical Workflow

1. Install Macroscope and complete setup.
2. Open your repo in Claude Code, Codex, Cursor, or OpenCode.
3. Run the Macroscope command for your host.
4. Let your agent work through findings locally before you push.
5. Use loop mode when you want a longer unattended pass.

## Troubleshooting

| Issue                                                | What to do                                                              |
| ---------------------------------------------------- | ----------------------------------------------------------------------- |
| `command not found: macroscope`                      | Restart your terminal, then check that `~/.local/bin` is on your `PATH` |
| The Macroscope command does not appear in your agent | Relaunch the agent after installation                                   |
| You need to sign in again                            | Run `macroscope` and complete setup                                     |
| You need to switch workspaces                        | Run `macroscope` and choose the correct workspace                       |

<Tip>
  If you want to completely wipe your local Macroscope install and start over, use the reset script from the `macroscope-local` repo and reinstall.
</Tip>

## Pricing

<Note>
  CLI code reviews consume agent credits. Admins can view usage details in the [Billing](https://app.macroscope.com/settings/billing) dashboard under Agent Credit Usage.
</Note>
