Brela tracks which AI tools wrote which lines in your codebase — silently, without changing your workflow.
- Detects AI-generated code from GitHub Copilot, Claude Code, Cursor, Windsurf, Cline, Aider, Continue, Codex CLI, and more
- Attributes insertions to the correct tool via VS Code extension hooks, shell wrappers, and git hooks
- Reports a breakdown of AI vs human contributions per file, author, or date range
| Package | Description |
|---|---|
@brela/core |
Shared types and session writer |
brela |
CLI — brela init, brela report, brela hook |
brela-vscode |
VS Code extension — silent background attribution |
npm install -g @brela-dev/cli
cd your-repo
brela initbrela init installs shell wrappers, git hooks, and the VS Code extension in one shot.
| Command | Description |
|---|---|
brela init |
One-command project setup |
brela report |
AI attribution breakdown — HTML report with charts, file heatmap, and model breakdown |
brela explain <file> |
Full attribution history for a specific file |
brela export --git-notes |
Attach attribution as git notes so it travels with the repo |
brela daemon start|stop|status |
Control the background file-watcher |
brela hook install|uninstall |
Manage git hooks manually |
| Tool | Detection methods |
|---|---|
| GitHub Copilot (inline) | VS Code extension, shell wrapper |
| GitHub Copilot Agent | VS Code extension, multi-file burst |
| GitHub Copilot CLI | Shell wrapper |
| Claude Code (inline + agent) | Shell wrapper, external file write |
| Cursor (inline + Composer) | VS Code extension, multi-file burst |
| Cline | VS Code extension |
| Continue | VS Code extension |
| Aider | Shell wrapper, external file write |
| Codex CLI | Shell wrapper, external file write |
| ChatGPT paste | Large-insertion heuristic |
- Shell wrappers —
brela initwrapsclaude,codex,gh copilot, and other AI CLIs in your shell. Every invocation logs{ tool, timestamp }to.brela/shell-intents.jsonl - VS Code extension — watches
onDidChangeTextDocumentandonDidSaveTextDocument; attributes large insertions, agent saves, and file creations to the correct tool - Daemon — background chokidar watcher diffs files before/after AI writes to record exact line ranges
- Git hooks — pre-commit captures staged AI attributions; post-commit fills in the real commit hash
- Session files — every attribution is appended to
.brela/sessions/YYYY-MM-DD.json(NDJSON, local only) - Git notes —
brela export --git-notesattaches the attribution payload to each commit so CI, audits, and new team members can see it
The daemon records the exact lines AI wrote, not just a count:
brela explain src/api/payments.ts
2026-03-23 10:31 ● Claude Code Agent L1-12, L45-79 HIGH
To also capture the code itself (for audits), enable it in .brela/config.json:
{ "captureCode": true }Then restart the daemon. Turn it off the same way to remove the clutter.
Share attribution with the team without committing .brela/ to the repo:
brela export --git-notes # attach notes to all attributed commits
brela export --git-notes --push # also push refs/notes/brela to originTeammates pull and view:
git fetch origin refs/notes/brela:refs/notes/brela
git log --show-notes=brela| Package | npm | Description |
|---|---|---|
@brela-dev/core |
Shared types, SidecarWriter, BrelaConfig |
|
@brela-dev/cli |
CLI — all brela commands |
|
@brela-dev/daemon |
Background file-watcher daemon | |
brela-vscode |
Marketplace | VS Code extension |
All data is local. Nothing leaves your machine. .brela/ is gitignored automatically by brela init.
The open-source CLI gives you per-developer, per-repo attribution. Brela Cloud adds:
- Org-wide dashboards across all repos and engineers
- AI cost & ROI tracking
- SOC 2 / compliance-ready exports
- Per-engineer attribution and review workflows
- Risk alerts for unreviewed AI PRs
- Jira / Linear / GitHub sync
See CHANGELOG.md for the full release history.
git clone https://github.com/kaustubh03/brela
cd brela
npm install
npm run build| Package | Purpose |
|---|---|
packages/core |
AITool enum, AttributionEntry type, SidecarWriter, BrelaConfig |
packages/cli |
All CLI commands (init, report, explain, export, hook, daemon) |
packages/vscode-extension |
Silent VS Code extension — detection and recording |
packages/daemon |
Background chokidar watcher with line-level diff |
MIT