The laptop Companion
The Companion runs on engineers' laptops and stops secrets, dangerous commands and booby-trapped repositories before they cause damage.
What it is
Two small programs: averild, a background daemon, and averil, the command line tool that Git and Claude Code call as hooks. They work on macOS and Linux.
Set it up
averild & # or run it as a LaunchAgent / systemd user unit
averil claude-settings # paste into .claude/settings.json or managed settings
averil hooks install --repo ~/code/app # pre-commit secret scan, chains any existing hook
averil statusThe configuration file sets which repositories to watch (the company allowlist), whether checks block or only warn, and where to send events. With no configuration file, the Companion runs but checks nothing.
What it watches
| Where | What it checks |
|---|---|
| Git pre-commit | Staged changes for secrets. A hit blocks the commit. |
| Claude Code hooks | Shell commands and file edits before they run: secrets, deletes outside the repository, force pushes to protected branches, commands against production, sending credentials to the network |
| Package manifests | Added or changed install scripts, and dependencies that skip the registry |
| New repositories | Files that run on their own when you open a folder: VS Code folder-open tasks, dev container commands, npm and composer scripts, suspicious .envrc |
How Claude Code sees it
| Verdict | What happens |
|---|---|
| Block | Claude Code is told no, with the reason. |
| Warn | You are asked to confirm, with the reason. |
| Allow | Nothing changes. Your own permission prompts still apply. |
| Daemon not answering | The action goes ahead and you see a warning. The Companion never blocks you by failing. |
Commands are judged by their target. Production blocks, staging and unknown targets warn, and development is usually allowed.
What it never collects
- Keystrokes, screen, microphone, camera or browsing data.
- Anything from repositories that are not on your company allowlist. The new-repository check reads a few auto-run files, and its results stay on your machine.
- File contents, commands or secrets. An uploaded event has only an event type, a salted repository hash, a relative path, a salted digest of the change and a risk tag.
Events wait in an encrypted local spool and upload over mutual TLS. It never follows symbolic links, never replaces an existing Git hook, and never says "allow" to Claude Code on your behalf.
Commands
| Command | Does |
|---|---|
averil status | Shows your Companion state. Add --json for JSON. |
averil ping | Checks that the daemon answers. |
averil scan-repo <path> | Runs the new-repository check on a folder now. |
averil pause --minutes 15 | Pauses checks, where company policy allows (by default up to 60 minutes). |
averil resume | Resumes checks. |
averil claude-settings | Prints the Claude Code hook settings. |
averil hooks install --repo <path> | Installs the pre-commit scan. Add --allow-shared-hooks-path for a global hooks directory. |
averil hooks uninstall --repo <path> | Removes the hook and restores any hook it chained. |
Hooks for Cursor and Windows support are coming soon.
Stuck? Email averil@averil.ai or ask me in Slack.