Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodeTidy AINew to Visual Studio Code? Get it now.
CodeTidy AI

CodeTidy AI

Yogendra Bundela

| (0) | Free
Comment, format and lint your code with AI: Claude, a VS Code built-in model, or a local Ollama model.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeTidy AI

A VS Code extension that uses AI to comment, format and lint your code, then fixes what it finds in one click.

CodeTidy AI marks bugs in the editor and lists them in the Problems panel

Features

  • Add Comments (Cmd/Ctrl+Alt+C): adds idiomatic doc comments to the selection, or to the whole file if nothing is selected. It changes comments only and can be undone with a single Undo. A safety check compares the code before and after (ignoring comments and docstrings); if the AI changed any code, nothing is applied and you can review a diff first.
  • Lint Current File (Cmd/Ctrl+Alt+Shift+L): the AI reviews the file for bugs, security issues, performance and error handling. Findings show in the Problems panel. Afterwards it offers Fix All (one Undo reverts every fix); set codetidy.fixOnLint to always to skip the prompt, or never to only report. Single fixes are in the lightbulb (Cmd+.).
  • Format Current File: uses your installed formatter (Prettier, Black, etc.). If there is none, it offers to format with AI.
  • On save (opt-in): codetidy.lintOnSave and codetidy.formatOnSave. Files that haven't changed are not sent again.

After a lint, CodeTidy AI offers to apply every fix at once

Add Comments, before and after:

Before: a Python file without docstrings while CodeTidy AI is commenting it

After: docstrings and an explanatory comment added, code unchanged

Choosing an AI provider

Run CodeTidy AI: Select AI Provider, or set codetidy.provider:

Provider Setup Notes
claude (default) Run Set Anthropic API Key Best quality, pay per use
vscode Install and sign in to a chat extension such as GitHub Copilot No API key; VS Code asks for permission the first time
ollama Install Ollama, then ollama pull qwen2.5-coder:7b Free and fully local; quality depends on the model

Getting started

  1. Install CodeTidy AI from the Extensions view (Cmd/Ctrl+Shift+X).
  2. Pick a provider (above). For Claude, run CodeTidy AI: Set Anthropic API Key from the Command Palette. The key is kept in VS Code's encrypted secret storage; if none is stored, ANTHROPIC_API_KEY is used.
  3. Open a file and press Cmd/Ctrl+Alt+Shift+L to lint it, or Cmd/Ctrl+Alt+C to add comments.

Results and token usage are logged under View → Output → CodeTidy AI.

Privacy

  • What is sent: the selected code or the current file, and its language and relative file path. Nothing else from your workspace is sent.
  • When: only when you run a command, or on save if you turn on lintOnSave (and formatOnSave with no AI involved). Nothing runs at startup.
  • Where it goes:
    • claude: the Anthropic API, under Anthropic's privacy policy.
    • vscode: whichever provider backs the VS Code model you use, such as GitHub Copilot.
    • ollama: your own machine, so code never leaves it.
  • Your API key is kept in VS Code's encrypted secret storage, never in settings files or logs.
  • No telemetry: the extension collects no usage data of its own.

Settings

Setting Default
codetidy.provider claude
codetidy.claudeModel claude-opus-5-5
codetidy.vscodeModel empty (first available)
codetidy.ollamaModel qwen2.5-coder:7b
codetidy.ollamaUrl http://localhost:11434
codetidy.effort medium
codetidy.commentStyle concise
codetidy.verifyChanges true
codetidy.lintOnSave false
codetidy.fixOnLint ask
codetidy.formatOnSave false
codetidy.aiFormatFallback true
codetidy.maxFileSize 200000
codetidy.languages [] (all)

Design docs: docs/VISION.md and docs/REQUIREMENTS.md.

Development

npm install
npm test          # 31 tests in a real VS Code, against a fake AI server
npm run package   # builds codetidy-<version>.vsix

Press F5 in VS Code to run the extension in an Extension Development Host. Pushing a tag vX.Y.Z that matches package.json publishes a release.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft