Install in GitHub Copilot

Have Copilot walk you through installing LeoPrevent in VS Code and connect it, or install it from source yourself.

LeoPrevent works with GitHub Copilot's agent mode in VS Code, through VS Code's agent hooks (a Preview feature in VS Code). Installing a plugin is a Command Palette action, so you run the install yourself, and Copilot walks you through the rest.

Before you start#

  • VS Code with GitHub Copilot is installed and signed in.
  • You have a LeoPrevent account.
  • You work in a git repository.

Set it up with your agent#

Copilot walks you through installing the plugin, then opens your browser to connect it. The same prompt is in the dashboard under Plugin setup, with Copy.

Open Copilot chat in VS Code and send this prompt:

Walk me through installing the LeoPrevent plugin in VS Code from https://github.com/leotrace-hq/leoprevent-plugin. Installing is a Command Palette action, which only I can do. Then run the installed plugin’s login command. Keep login running until it prints "LeoPrevent · Connected". Browser login saves the credential locally, so no licence key needs to be copied. Do not ask for, paste, or print one; keep credentials out of this transcript. Tell me what I need to approve or restart myself. Verify with a real turn, not by running the hook by hand: LeoPrevent fails open, so a successful manual run does not prove your coding agent invokes it. Confirm that turn appears in the LeoPrevent dashboard; report verification as pending if you cannot check it.

On the setup screen you see when you first sign in, Open in VS Code opens Copilot chat in agent mode with the prompt filled in.

Run Chat: Install Plugin from Source when it tells you to, then choose Link installation on the page it opens in your browser.

Manual setup#

  1. 1
    Install from source

    Open the Command Palette (Cmd Shift P, or Ctrl Shift P on Windows and Linux), run this command, then paste the repository address.

    Chat: Install Plugin from Source
    https://github.com/leotrace-hq/leoprevent-plugin
  2. 2
    Restart the extension host

    Select Restart Extensions when prompted, or reload the window.

  3. 3
    Connect to LeoPrevent

    Send this to Copilot chat, then choose Link installation on the page it opens in your browser. Keep it running until it prints LeoPrevent · Connected.

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

Check it worked#

Paste this into your agent and let it reply. The finished turn is what checks in.

Hello! I just installed LeoPrevent. Say hi back so this turn finishes.

The installation then shows as Live in Plugin setup. See Check it's working.

Already installed this before?#

Run Chat: Install Plugin from Source again, then restart the extension host. Your connection survives. This reinstalls the same version; to get a newer one, see Update below.

Update#

Open the Command Palette, run Chat: Update Plugins, then reload the window. Your connection survives the update.

Chat: Update Plugins

Remove#

Uninstall LeoPrevent from VS Code's agent plugins, then reload the window.

Updated 19 Nov 2026

Suggested articles