VS Code extension + local CLI + Arduino IDE agent

Clean the code. Keep the context.

Code Janitor combines fast formatting, AI-guided edits, live preview, Graphify workspace context, testing helpers, documentation generation, and a local CLI. The website below mirrors the current repo: the main VS Code extension is broad, the CLI works outside the editor, and the Arduino package is a narrower standalone agent.

5 AI providers in the extension settings
10 Default keyboard shortcuts in the main package
CLI Batch cleanup, read-only chat, and agent mode
Format Code Clean and repair supported files Alt+D
Open AI Chat Run structured fixes, reviews, and searches Ctrl+Alt+C
Visualize Codebase Graph Load Graphify context for architecture-aware help Ctrl+Alt+G
Generate Repository Documentation README, API docs, and contributing guides Ctrl+Alt+D
Workspace memory mirrored to workspacememory.md Edge-case generation and test execution Web search and YouTube search in chat
Auto-correction and auto-fix on save are present, but both are disabled by default in the manifest for safety.
Product Surface

What the repo actually ships

The site now reflects the current README, package manifests, and CLI help. That means highlighting the main extension, the standalone Arduino agent, and the new terminal workflow instead of treating Code Janitor like a single generic chat widget.

Editor cleanup and repair

Format and fix code across JavaScript, TypeScript, Python, C/C++/Arduino, Java, HTML, and frontend files. Live preview, frontend validation, ESLint, and active-file bug scans are built in.

  • Alt+D format code
  • Alt+L lint JavaScript with ESLint
  • Alt+P open live preview
  • Alt+V validate frontend dependencies

AI workflow with guardrails

The chat panel supports structured FILE and PATCH edits, pre-edit checks, post-edit verification, performance monitoring, workspace scans, GitHub context, and provider switching across Ollama, Groq, OpenRouter, Anthropic, and NVIDIA.

  • Quick Fix, Quick Fix All, and bug scans
  • Web search and YouTube search in chat
  • Self-healing slow-model monitoring
  • Security review gate for AI-generated edits

Context, testing, and planning

Code Janitor can refresh a persistent workspace ledger, render a code graph, generate edge cases, execute tests with reports, build repository documentation, track TODOs, and enable an outcome-based project planner.

  • Workspace memory mirrored to the repo root
  • Graphify-aware architecture context
  • Alt+E edge cases and Alt+T test runs
  • CLI chat and agent subcommands outside the editor
Live Demo

Click through a Code Janitor session

This is a browser-side simulation of how the product behaves based on the real commands and workflows in the repo. Pick a prompt, or type one below, to see how Code Janitor scans context, proposes edits, and reports verification.

Interactive chat walkthrough Structured edits, verification, and context loading
Keyword matching routes your prompt to the nearest scenario: fix, tests, memory, CLI, or Arduino graph.

Scenario summary

Actions emitted

    Why it matters

    Code Janitor does more than answer text prompts. It loads workspace context, picks commands, applies edits, and reports what happened after verification.

    Commands

    Main extension shortcuts and commands

    These cards reflect the current main package manifest. A few popular flows also live only in the Command Palette, such as refreshing workspace memory, opening the generated ledger, and showing the AI performance report.

    Format and inspect

    Run cleanup, linting, preview, validation, and targeted bug scans from the keyboard while you stay in the editor.

    Alt+D Alt+L Alt+P Alt+V Alt+B

    Chat and graph context

    Open the AI chat sidebar and load Graphify-backed architecture context without leaving the current workspace.

    Ctrl+Alt+C Ctrl+Alt+G

    Testing toolkit

    Generate edge cases, execute tests with a report, and keep AI provider settings separate when you want testing-specific models.

    Alt+E Alt+T

    Documentation and repo context

    Generate repository documentation, inspect GitHub repository context, refresh workspace memory, and open the mirrored ledger.

    Ctrl+Alt+D
    Providers

    Five AI backends in the main settings

    The current manifests expose five providers. Ollama is the default local option, while the cloud providers cover faster hosted models, broader catalogs, and NVIDIA NIM integration.

    Local default

    Ollama

    Best for local use. The repo examples use http://localhost:11434 and recommend small coder models such as qwen2.5-coder:1.5b.

    Fast cloud

    Groq

    Presented in the repo as a fast hosted option. Good for quick chat, reviews, and lighter turnaround when you do not want local models.

    Wide catalog

    OpenRouter

    Useful when you want to choose from many models. The repo examples reference OpenRouter coder slugs directly in settings and CLI mode.

    Claude

    Anthropic

    Available in both the extension and CLI. Fits deeper reasoning, review-style tasks, and narrated agent workflows when you want a hosted model.

    NIM

    NVIDIA

    Integrated through NVIDIA NIM with runtime model lookup in the main package. The repo suggests meta/llama-3.1-8b-instruct as a starting point.

    CLI Mode

    Use Code Janitor outside the editor

    The repo now ships a local CLI that can clean files, run a read-only terminal chat, or start a narrated agent loop that inspects, edits, and verifies changes. This section uses the current built-in help text.

    Install and run

    Batch cleanup, terminal chat, and agent mode
    npm install
    npm link
    
    code-janitor src --check
    code-janitor . --json
    code-janitor chat explain src/extension.js --mode heavy
    code-janitor agent debug npm test failure --provider anthropic --max-steps 8

    Supported cleanup targets

    The README currently lists one file or one directory as the target surface, with support centered on JavaScript/TypeScript, Python, C/C++/Arduino, Java, and HTML.

    code-janitor [path] [options]
    --check    report changes without writing
    --write    apply fixes to disk
    --json     print final report as JSON
    --ai       allow AI-assisted fixes
    --provider anthropic | groq | nvidia | ollama | openrouter
    Arduino IDE

    A narrower standalone extension for Arduino workflows

    The Arduino package in the repo is not the full VS Code feature set. It focuses on chat, guided edits, source control, Graphify context, and Arduino-specific helpers like Mermaid-based circuit views and chat session management.

    What is different on Arduino

    The standalone Arduino agent includes chat, source control, project-graph visualization, provider switching, workspace scans, YouTube search, and Mermaid rendering. It does not mirror every command from the main VS Code extension.

    Open the dedicated page for Arduino-specific commands, install notes, and package details.

    Default shortcuts

    Ctrl+Alt+A / Cmd+Alt+A  open welcome + AI chat
    Ctrl+Alt+G / Cmd+Alt+G  open source control
    Ctrl+Alt+V / Cmd+Alt+V  visualize project graph