# Connect the plugin to your account

Link each installation to your account in your browser, or use a licence key where a browser login is not possible.

Every installation of the plugin connects to your LeoPrevent account. Browser login is the default: there is no key to copy, and the credential is saved on your machine.

## Before you start

- The plugin is installed in your coding agent. See [Supported agents and environments](https://help.leotrace.io/supported-agents/).
- You can sign in to the dashboard at [prevent.leotrace.io](https://prevent.leotrace.io).

## Connect with browser login

**Claude Code**

Run:

```text
/leoprevent:login
```

**Codex**

Ask Codex to run the LeoPrevent login. If it cannot find it, run this yourself, replacing `<version>` with the installed version:

```bash
~/.codex/plugins/cache/leotrace/leoprevent/<version>/bin/leoprevent-plugin login
```

**GitHub Copilot**

Send this to Copilot chat:

```text
Run LeoPrevent login using the installed plugin binary and wait for completion.
```

**Cursor**

Run this in a terminal:

```bash
~/.cursor/plugins/local/leoprevent/bin/leoprevent-plugin login --agent=cursor
```

On Windows, in PowerShell:

```powershell
& "$HOME\.cursor\plugins\local\leoprevent\bin\leoprevent-plugin.exe" login --agent=cursor
```

**Devin CLI**

Send this to Devin chat:

```text
Run the installed LeoPrevent binary with login --agent=devin and wait for completion.
```

**Hermes Agent**

Run this in a terminal:

```bash
~/.hermes/leoprevent/bin/leoprevent-plugin login --agent=hermes
```

1. Open the link the command shows, or let it open your browser.
2. Log in to LeoPrevent if asked.
3. Check the agent, machine, workspace and the account you are logged in as.
4. Select **Link installation**.

   _The Link this installation page, showing the agent, machine, approximate location, workspace and signed in account, with Link installation and Cancel below._

5. Keep the command running until the terminal shows the line below.

```output
🛡️ LeoPrevent · Connected
```

Only approve a login you started yourself. If the login expires, start it again from your coding agent.

## Connect a remote or headless machine

If the machine has no browser, add `--no-browser` to the login command and open the link it shows on another device:

```bash
leoprevent-plugin login --no-browser
```

If `leoprevent-plugin` is not on your `PATH`, use the full path from your agent's tab above.

## Use a licence key instead

Use a licence key for Claude Code on the web, where the machine is rebuilt for each session, or anywhere a browser login is not possible.

1. In the dashboard, open **Plugin setup**, choose **Claude Code**, then **Web**, and select **Generate licence key**. It is shown once.
2. Save it on the machine. In Claude Code, run `/leoprevent:set-license` followed by the key. In Copilot, run `/leoprevent set-license` followed by the key.

On other agents, save the key in a file in your user config folder:

**macOS**

```bash
mkdir -p "$HOME/Library/Application Support/leoprevent"
echo '{"license_key":"lp_live_your_key_here"}' > "$HOME/Library/Application Support/leoprevent/license.json"
```

**Linux**

```bash
mkdir -p "$HOME/.config/leoprevent"
echo '{"license_key":"lp_live_your_key_here"}' > "$HOME/.config/leoprevent/license.json"
```

**Windows**

```powershell
New-Item -ItemType Directory -Force "$env:AppData\leoprevent" | Out-Null
'{"license_key":"lp_live_your_key_here"}' | Out-File -Encoding ascii "$env:AppData\leoprevent\license.json"
```

Replace `lp_live_your_key_here` with your key. Or set the `LEOPREVENT_LICENSE_KEY` environment variable, which takes priority over a saved credential.

> **Warning:** Generating a new key disconnects every machine using the old one, including browser logins and cloud sessions. Each one needs connecting again before its turns are reviewed.

## Check it worked

To confirm your turns are being reviewed, see [Check it's working](https://help.leotrace.io/check-its-working/).

## Disconnect

To disconnect every installation at once, open **Plugin setup**, choose **Claude Code**, then **Web**, select **Lost it?** and confirm **Generate new key**. To remove the plugin from one agent, uninstall it from that agent's plugin manager.

Source: https://help.leotrace.io/connect-the-plugin/ (updated 2026-11-18)
