ai-codelint
v0.0.7
Published
Boost code quality as you type
Readme
AI CodeLint VS Code Extension
Boost code quality as you type.
This extension runs the ai-codelint language server in the background and surfaces AI-assisted logic diagnostics directly in VS Code.
Project Status
AI CodeLint is in heavy development and not production-ready yet.
- Features and behavior can change quickly.
- Breaking changes are expected while core behavior is refined.
- The VS Code extension is currently unpublished and intended for pre-release testing.
What This Extension Does
- Starts
ai-codelint --mode serveras an LSP server. - Analyzes open files and untitled buffers (
fileanduntitledURI schemes). - Reports likely logic bugs that can survive compilation and traditional linting.
Prerequisites
- Install the
ai-codelintbinary. - Set
OPENROUTER_API_KEYas a global environment variable. - Keep your extension/binary version aligned with the recommended version in
status.json.
Install The Binary (Recommended)
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/RussellGN/AI-CodeLint/main/scripts/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/RussellGN/AI-CodeLint/main/scripts/install.ps1 | iexThen verify installation:
ai-codelint --versionConfigure Runtime Defaults
Run the CLI walkthrough once to set defaults such as model and max output tokens, and to get API key setup guidance:
ai-codelint --configureThe root README currently recommends anthropic/claude-sonnet-4.6 for best lint quality.
Install The VS Code Extension
This extension is not yet published to the Marketplace.
Option A: Run In Extension Development Host
From the repository root:
cd server && cargo build
cd ../clients/vs-code && pnpm i && pnpm compileThen in VS Code, run the launch config named Launch VS Code Client (F5). The workspace launch configuration already sets:
SERVER_PATH=${workspaceRoot}/server/target/debug/ai-codelint
Option B: Package As VSIX And Install Locally
From clients/vs-code:
pnpm i
pnpm compile
pnpm packageInstall the generated .vsix in VS Code using:
- Extensions: Install from VSIX...
Settings
The extension currently contributes one setting:
ai-codelint.trace.serveroff: no trace loggingmessages: error-only trace output (default)verbose: full trace output
Use the AI CodeLint trace output channel in VS Code when troubleshooting.
Environment Variables
OPENROUTER_API_KEY(required): API key used for lint inference.SERVER_PATH(optional): path to a customai-codelintbinary. If not set, the extension usesai-codelintfrom your PATH.
Important: after changing environment variables globally, fully restart VS Code so the extension host picks them up.
Troubleshooting
"OPENROUTER_API_KEY environment variable is required"
- Set
OPENROUTER_API_KEYglobally for your OS/shell. - Restart VS Code completely.
"Current version 'x' of ai-codelint is out of date"
- Update your local setup to the latest recommended release.
- Ensure extension and binary versions are up to date.
Server Does Not Start
- Verify
ai-codelint --versionworks in a terminal. - If using a custom path, verify
SERVER_PATHpoints to an executable binary. - Set
ai-codelint.trace.servertoverboseand check the AI CodeLint trace channel.
Development
From repository root:
cd server && cargo build && cd ../clients/vs-code && pnpm i && pnpm compileThere is also a workspace task named install and compile that runs the same workflow.
Useful Scripts (clients/vs-code)
pnpm compile: type-check and bundle extension outputpnpm watch: watch mode for rapid extension iterationpnpm lint: runoxlintpnpm fmt: runoxfmt --writepnpm package: build a.vsixartifact
