Skip to main content
Asymptote hooks into GitHub Copilot in VS Code to automatically evaluate every file edit against your security policies.

Prerequisites

  • Asymptote CLI installed (asym command)
  • GitHub Copilot extension installed in VS Code
  • Logged in to your Asymptote account (asym login)
  • A git repository (hooks are project-level only)
Copilot hooks are project-level only. You must run asym copilot install from the root of the git repository where you want hooks active. Run the command once per repository.

Setup

1

Install the Asymptote CLI

Install the CLI via Homebrew:
brew install asymptote-cli
Then log in:
asym login
2

Navigate to your repository root

Hooks must be installed from the root of your git repository:
cd /path/to/your/repo
3

Install the Asymptote hooks

Run the install command:
asym copilot install
This writes the hook configuration to .github/hooks/hooks.json in your repository and installs the hooks binary to ~/.asymptote/copilot/.
4

Open the project in VS Code

Open the repository in VS Code. Asymptote will now evaluate every file edit made by Copilot against your security policies automatically.

How it works

Once installed, Asymptote registers hooks in .github/hooks/hooks.json. For every file edit Copilot makes, Asymptote captures the diff, evaluates it against your security policies, and guides Copilot to remediate any violations. Other existing hooks in hooks.json are preserved.

Uninstalling

To remove the Asymptote hooks from the current repository, run from the same project directory:
asym copilot uninstall
This removes the Asymptote entries from .github/hooks/hooks.json and cleans up the hooks binary. Other hooks in the file are preserved.

Next steps