VarAlign – catch the duplicate variables AI agents scatter across sessions
VarAlign is a VS Code extension that detects duplicate, drifted, or misaligned variables created by AI coding assistants across sessions. It runs 100% locally—no code leaves your machine—and offers views for duplicates, variables, and sessions, along with fix prompt generation and optional AI-powered auto-fix.
Uh oh!
There was an error while loading. Please reload this page.
Notifications You must be signed in to change notification settings
Fork 0
Star 0
BranchesTags
Open more actions menu
Folders and files
NameName
Last commit message
Last commit date
Latest commit
History
5 Commits
5 Commits
media
media
scripts
scripts
src
src
.gitignore
.gitignore
.vscodeignore
.vscodeignore
LICENSE
LICENSE
README.md
README.md
esbuild.js
esbuild.js
package-lock.json
package-lock.json
package.json
package.json
tsconfig.json
tsconfig.json
Repository files navigation
Also on the VS Code Marketplace.
Catch the duplicate, drifted, and misaligned variables AI coding agents scatter across sessions — right in your editor. 100% local: your code never leaves your machine.
AI assistants forget. Across sessions they re-introduce a variable that already exists under another name, let a value drift from the one they wrote last week, or strand a definition when a file moves. VarAlign tracks every assignment your assistant writes, scores the duplicates and drift, and hands you a ready-to-paste fix prompt.
Native tree views — Duplicates · Variables · Sessions — over the VarAlign engine. Detection, scoring, and persistence run in a zero-dependency Python engine that ships inside the extension; the views are a thin, read-through client. Everything runs on your machine — no cloud, no telemetry, no code upload — so it works in locked-down and air-gapped environments.
Features
Duplicates — High / Medium / Low groups. Expand a pair to see both sides; right-click to Dismiss (not a duplicate), Confirm, or Dismiss with note. Verdicts persist, and dismissing one member auto-quiets the whole family so you review each pattern once.
Variables — every tracked assignment, grouped by file and coloured by its worst duplicate level; click to jump to the definition.
Sessions — what each AI session introduced or changed.
Status bar — VarAlign: N high; click to focus the Duplicates view.
Generate Fix Prompt — a repo-scoped remediation prompt in a new tab, ready to paste back to your assistant.
Fix with AI — hands a targeted consolidation prompt to Claude Code or Kilo Code, whichever you have open.
Auto-refreshes when the store changes (a hook or the CLI wrote to it).
Getting started
Install VarAlign.
Make sure Python 3.11+ is on your PATH — the extension bundles the engine, so there's nothing else to install or point at.
Open a repo and click the VarAlign chip in the activity bar. VarAlign scans the workspace and starts tracking.
That's it — you're running locally, and every byte stays on your machine.
VarAlign keeps its tracking data in a .varmem/ folder at your repo root. The extension adds .varmem/ to your .gitignore automatically (git repos only). If it can't, add this line yourself:
.varmem/
VarAlign Pro
Pro unlocks Merge Variables: right-click a duplicate pair and VarAlign picks the canonical name, rewrites the references, and removes the duplicate definition — in your editor, on your machine.
Licenses are verified offline (an Ed25519-signed key, checked locally with a 14-day grace period past expiry — nothing is ever sent anywhere, so Pro works air-gapped too). Activate with VarAlign: Enter License; check anytime with VarAlign: License Status.
Settings
Setting Default Meaning
varalign.pythonPath python interpreter used to run the local engine
varalign.corePath (bundled) path to varmem.py; empty = the bundled engine
varalign.minLevel medium lowest duplicate level shown
varalign.showDismissed false include dismissed / auto-quieted pairs
varalign.aiTool auto assistant for Fix with AI (auto/claude/kilo)
varalign.licenseKey "" Pro license key (VL1.…), verified offline
varalign.apiUrl "" optional self-hosted API (see below)
varalign.apiToken "" bearer token for that API
varalign.apiProject "" project id on that API
varalign.apiAllowInsecure false skip TLS verify (internal CA only)
Optional: read from a self-hosted API
Teams that run the engine centrally (python varmem.py serve on their own infrastructure) can point the views at it by setting varalign.apiUrl, varalign.apiToken, and varalign.apiProject. The views then read /v1/projects/{id}/report; review verdicts stay read-only over the API. Leave apiUrl empty (the default) for the fully local experience.
Development
cd extension npm install npm run compile # press F5 for an Extension Development Host
Build a .vsix (minified bundle + engine via vscode:prepublish):
npx @vscode/vsce package
License
The VarAlign VS Code extension is source-available under the Business Source License 1.1 (see the LICENSE file): free to use and modify, no reselling or competing hosted/embedded offering, converting to Apache-2.0 on 2030-07-15. The underlying VarAlign engine is licensed separately under Apache-2.0.
About
VarAlign — catch the duplicate, drifted, and misaligned variables AI coding agents scatter across sessions. VS Code extension (source-available, BSL 1.1).
Topics
ai
static-analysis
developer-tools
vscode-extension
code-quality
duplicate-detection
Resources
Readme
License
View license
Uh oh!
There was an error while loading. Please reload this page.
Activity
Custom properties
Stars
0 stars
Watchers
0 watching
Forks
0 forks
Report repository
Releases
No releases published
Packages 0
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
TypeScript 92.4%
JavaScript 7.6%