OmniType for VS Code
Know exactly where your code comes from.
OmniType tracks the origin of every line in your codebase — what you wrote, what an AI generated, and what was pasted — giving you and your team a clear, honest picture of how software is actually being built.
Why OmniType?
AI coding tools are everywhere. But knowing how much of your codebase is AI-generated, and which parts, has been a blind spot — until now.
OmniType works silently in the background, attributing every line as you code. No manual tagging. No workflow changes. Just accurate, automatic provenance — tracked across the full development lifecycle.
How attribution works (by lifecycle)
OmniType captures provenance at every stage of the dev cycle, not just during live editing:
| Stage |
What's tracked |
| While coding |
Every keystroke, AI completion, and paste event is classified in real time |
| On save / external change |
Changes made by external agents (Claude Code, Cursor, Copilot) are detected and attributed |
| On git commit |
A git pre-commit hook attaches line-level attribution to the commit as a git note (refs/notes/ai) |
| On git push |
Attribution is synced to the cloud dashboard for your org |
What you get
For individual developers
- See your personal AI%, human%, and paste% at a glance in the sidebar
- Attribution updates in real time as you type, accept completions, or paste code
- Provenance is stored per branch — switch branches and your attribution switches with it
- Hover over any line to see its origin, model, and authorship
- Right-click a line → OmniType: Show Line Attribution for a full breakdown
For engineering teams
- Shared attribution across your org: when a teammate pushes, their provenance syncs automatically
- Manager dashboard with per-project AI%, per-contributor breakdowns, commit-level attribution, and branch comparisons
- Per-model analytics — see which AI tools (Claude, Copilot, Cursor, etc.) are being used and how much
- Trend charts showing how AI adoption evolves over time across your repos
Classification
OmniType classifies every line as one of four origins:
| Origin |
Meaning |
| Human |
You typed it manually |
| AI |
An AI assistant generated it (model is recorded when detectable) |
| Paste |
Copied from the clipboard |
| Existing |
Was in the file before tracking began |
Attribution is stored locally in a gitignored .omni file and synced to the cloud for org members on every git push.
Getting started
- Install OmniType from the VS Code Marketplace
- Open the OmniType panel in the sidebar and sign in
- Start coding — attribution begins immediately
Git hook (commit-time attribution)
The git hook records attribution as a git note on every commit. Provenance is embedded in your git history and survives rebase/squash.
Install via VS Code command palette:
OmniType: Install Git Hook
Or via the CLI:
npm install -g @omnitype/cli
omnitype hooks install
This writes a pre-push hook to .git/hooks/pre-push that runs omnitype commit-scan and pushes git notes to refs/notes/ai.
Uninstall:
OmniType: Uninstall Git Hook
Claude Code sentinel (model detection)
For the most accurate model detection when using Claude Code, install the pre-tool hook. This makes OmniType know exactly which Claude model wrote each line.
One-time setup — run this in your terminal:
node -e "
const fs = require('fs'), os = require('os'), path = require('path');
const cfg = path.join(os.homedir(), '.claude', 'settings.json');
const hook = {
matcher: 'Write|Edit|MultiEdit|NotebookEdit',
hooks: [{
type: 'command',
command: 'node -e \"const fs=require(\\\"fs\\\"),os=require(\\\"os\\\"),p=require(\\\"path\\\");const d=p.join(os.homedir(),\\\".omnitype\\\");fs.mkdirSync(d,{recursive:true});fs.writeFileSync(p.join(d,\\\"active-model.json\\\"),JSON.stringify({model:process.env.CLAUDE_MODEL||\\\"claude\\\",tool:\\\"claude-code\\\",ts:Date.now()}))\"'
}]
};
let settings = {};
try { settings = JSON.parse(fs.readFileSync(cfg, 'utf8')); } catch {}
settings.hooks = settings.hooks || {};
settings.hooks.PreToolUse = settings.hooks.PreToolUse || [];
const already = settings.hooks.PreToolUse.some(h => h.matcher === hook.matcher && h.hooks?.[0]?.command?.includes('omnitype'));
if (!already) {
settings.hooks.PreToolUse.push(hook);
fs.writeFileSync(cfg, JSON.stringify(settings, null, 2));
console.log('OmniType hook installed in ~/.claude/settings.json');
} else {
console.log('Hook already installed.');
}
"
Or if you have the OmniType CLI installed:
omnitype setup-claude-hook
Or manually add to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit|MultiEdit|NotebookEdit",
"hooks": [
{
"type": "command",
"command": "node -e \"const fs=require('fs'),os=require('os'),p=require('path');const d=p.join(os.homedir(),'.omnitype');fs.mkdirSync(d,{recursive:true});fs.writeFileSync(p.join(d,'active-model.json'),JSON.stringify({model:process.env.CLAUDE_MODEL||'claude',tool:'claude-code',ts:Date.now()}))\""
}
]
}
]
}
}
Once set up, the extension shows the exact model name (e.g. claude-sonnet-4-6) on every AI-written line — in hover tooltips, the sidebar, and git blame.
Verify it's working: after Claude Code writes a file, hover any changed line in VS Code. You should see 🧠 Model: claude-sonnet-4-6.
Other AI tools: OmniType also detects models from Copilot, Cursor, Windsurf, Cline, Continue, and more — automatically, without any hook setup. The Claude Code hook just gives 100% accuracy instead of probabilistic detection.
CLI daemon (all-IDE support)
If you use an IDE other than VS Code (Cursor, Windsurf, JetBrains, Neovim, etc.), the CLI daemon watches your files with the same provenance logic:
npm install -g @omnitype/cli
omnitype login
omnitype daemon # watches current directory
The daemon yields automatically if the VS Code extension is active for the same workspace — no double-counting.
Available CLI commands:
| Command |
Description |
omnitype login |
Authenticate to OmniType |
omnitype logout |
Sign out |
omnitype status |
Show current workspace stats |
omnitype daemon |
Start file watcher daemon |
omnitype hooks install |
Install git pre-push hook |
omnitype hooks uninstall |
Remove git hook |
omnitype commit-scan |
Scan HEAD commit and record attribution |
omnitype blame <file> |
Show per-line attribution (like git blame) |
omnitype notes fetch |
Fetch git notes from remote |
omnitype notes push |
Push git notes to remote |
Configuration
| Setting |
Default |
Description |
omnitype.soundProfile |
off |
Keyboard sound profile (off / blue / brown / red / thock / typewriter) |
omnitype.soundVolume |
0.5 |
Sound volume (0–1) |
omnitype.idleTimeoutMs |
5000 |
Idle ms before ending a typing session |
omnitype.pasteThreshold |
10 |
Characters in a single insertion before counted as paste |
omnitype.aiThreshold |
40 |
Characters in a single insertion before counted as AI |
omnitype.enableGitHook |
true |
Auto-detect git push from terminal and sync attribution |
Team features require an org account. Sign up at omnitype.tech
OmniType · Code with clarity