Skip to content

ailinter/vscode-extension

Repository files navigation

AILINTER — AI Code Safety Visor for VS Code

VS Code Marketplace License: MIT Open VSX AILINTER

Real-time code quality scoring, secret detection, and vulnerability scanning — right in your editor.

AILINTER is the VS Code companion for the AILINTER open-source safety visor. It turns your editor into a code health dashboard: every file gets a quality score, every secret gets caught before commit, and every code smell comes with step-by-step refactoring guidance.


Features

🛡️ Code Health Monitor

Each file you save gets a 0–100 quality score displayed in the status bar:

Score Label What It Means
80–100 🟢 Go Ahead Safe for AI modification
60–79 🟡 Proceed with Care Small isolated changes, re-check after each
40–59 🟠 Needs Work Significant issues — refactor incrementally
0–39 🔴 Stop & Refactor Must refactor before AI touches this file

🔍 Inline Issue Detection

Problems appear directly in your code with severity-coded decorations:

  • Red wavy underline — Critical vulnerability or secret
  • Orange wavy underline — Error or high-severity quality issue
  • Yellow squiggle — Warning or moderate quality concern
  • Gutter icons — Visual severity indicators in the line number gutter

💡 Rich Hover Information

Hover over any underlined code to see:

  • What the issue is and why it matters
  • Which category: quality, secret, vulnerability, or metalinter
  • The specific smell type (e.g., deep_nesting, brain_method)

⚡ Quick Fix Actions (Lightbulb)

Press Cmd+. (Mac) or Ctrl+. (Windows/Linux) on any issue line to access:

  • Get Refactoring Strategy — Opens detailed fix guidance for code smells
  • Replace Secret — Converts hardcoded secrets to environment variables
  • Suppress Warning — Adds an ailinter:disable comment

📊 Function-Level Score Annotations (CodeLens)

See each function's quality score right above its definition. CodeLens annotations appear automatically after scanning.

📋 Problems Panel Integration

Every issue appears in VS Code's Problems panel (View → Problems) with severity, file, line, and description — filterable and clickable.

📈 Sidebar Overview

Open the AILINTER sidebar in the Explorer panel (View → Explorer → AILINTER) to see:

  • Overall project health score
  • File count and issue statistics
  • Trending hotspots (files with most issues)
  • Top code smells across your project

Quick Start

Zero-Config Setup

The extension automatically downloads and installs the AILINTER CLI when first activated — no terminal commands required.

  1. Install the extension from the VS Code Marketplace
  2. Open any Go, Python, JavaScript, TypeScript, or Java file
  3. Save (Cmd+S) — if the CLI isn't found, AILINTER will offer to download it automatically
  4. That's it — no brew, no manual install, no PATH configuration

If you prefer to manage the CLI yourself:

# macOS (Homebrew)
brew install ailinter/ailinter/ailinter

# Linux / Windows — download from GitHub Releases
# https://github.com/ailinter/ailinter/releases

Using the Extension

  1. Install the extension from the VS Code Marketplace
  2. Open any Go, Python, JavaScript, TypeScript, or Java file
  3. Save (Cmd+S) — AILINTER scans automatically and shows your quality score in the status bar
  4. Click the status bar score to see file details
  5. Hover over underlined issues for explanations
  6. Click the lightbulb to fix issues with one click

Commands

All commands are available via the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):

Command Description
AILINTER: Scan current file Manually trigger a scan on the active file
AILINTER: Show file quality details Display score and issue count for current file
AILINTER: Get refactoring strategy Open detailed fix guidance for a code smell
AILINTER: Replace secret with environment variable Convert a hardcoded secret to process.env
AILINTER: Suppress warning on this line Add ailinter:disable comment to skip a finding
AILINTER: Show vulnerability details View full details of a security vulnerability

Settings

Setting Default Description
ailinter.path "" (auto-detect) Path to the AILINTER binary. Leave blank to auto-detect or auto-download.
ailinter.enable true Enable scanning on file save
ailinter.scanOnOpen true Automatically scan files when opened
ailinter.qualityThreshold 80 Minimum score (0–100). Files below this show warnings.
ailinter.showGutterIcons true Show severity icons in the gutter
ailinter.showCodeLens true Show function-level score annotations
ailinter.cliUpdateChannel "stable" Update channel: "stable" (recommended) or "latest" (pre-releases)

Keyboard Shortcuts

Key Action
Cmd+. / Ctrl+. Open Quick Fix (lightbulb) on current issue line
Cmd+S / Ctrl+S Save file → triggers automatic scan
Cmd+Shift+P → type AILINTER List all AILINTER commands

Requirements

  • VS Code 1.86.0 or later
  • AILINTER CLI — auto-downloaded on first activation (or install manually via brew / GitHub Releases)
  • Supported languages: Go, Python, JavaScript, TypeScript, Java, C#, PHP (more coming)

Tips

  • Auto-install: If the CLI isn't found, AILINTER offers to download it. Accept once — it's cached for all future sessions.
  • Manual CLI: Want to manage versions yourself? Install via brew or download from GitHub Releases. The extension will detect it automatically.

Known Issues

  • Windows: The extension has been tested on macOS and Linux. Windows support is experimental. Report issues on GitHub.
  • Large files: Files over 1000 lines may take a few seconds to scan. Performance optimizations are in progress.
  • First scan delay: On first activation, the extension downloads the AILINTER CLI (~30 MB). Subsequent scans are instant.

Extension Settings Reference

To configure AILINTER in VS Code:

{
  "ailinter.path": "",
  "ailinter.enable": true,
  "ailinter.scanOnOpen": true,
  "ailinter.qualityThreshold": 75,
  "ailinter.showGutterIcons": true,
  "ailinter.showCodeLens": true,
  "ailinter.cliUpdateChannel": "stable"
}

Feedback & Contributions

Found a bug? Have a feature request? We'd love to hear from you:


License

MIT © AILINTER


What's New in v0.3.0

  • 🚀 Auto-install CLI — The extension downloads and installs the AILINTER binary automatically. No more manual brew install.
  • Zero-config setup — Install the extension, save a file, done. The CLI is detected, downloaded, and configured for you.
  • Graceful offline handling — Clear messaging when no internet connection is available.

What's New in v0.2.0

  • Project health sidebar — overview of your entire workspace's code health
  • Before/after delta tracking — see if your score improved or regressed
  • Hover provider — rich explanations on every issue
  • Quick Fix: Replace secret — one-click secret-to-env-var conversion
  • CodeLens annotations — function-level scores inline
  • Configurable gutter icons — toggle decorations in settings

About

Real-time code quality, secret detection, and vulnerability scanning for VS Code — powered by AILINTER

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors