Local AI (LLM) Ollama Tool and Extension. It's a hammer /approve /reject are your friends.
翻译准备中
插件Python · TypeScriptGitHub @shunobies自行安装运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
安装型项目无需部署域名也可验证。个人仓库可通过 GitHub 登录验证,组织仓库可使用上方的仓库验证文件。
正在加载完整 README。 以下为已保存的摘录。
Your codebase already has an architect. It just needs tools.
Lean AI is an agentic coding assistant that reads your project, plans changes, and executes them — all inside your editor. Give it a task in plain English, review the plan, and watch it work.
Run it fully local with Ollama, or connect to OpenAI and Anthropic when you need heavier reasoning. Switch between models mid-session from the UI. No cloud account required to get started.查看完整 README ↗Your codebase already has an architect. It just needs tools.
Lean AI is an agentic coding assistant that reads your project, plans changes, and executes them — all inside your editor. Give it a task in plain English, review the plan, and watch it work.
Run it fully local with Ollama, or connect to OpenAI and Anthropic when you need heavier reasoning. Switch between models mid-session from the UI. No cloud account required to get started.
request, primary, and expert roles to the exact model assigned to each one, persist the winning contract under .lean_ai/role_tuning/, and automatically reuse it on future runs. Tuned guidance is applied as a scoped prompt override, so one model can behave differently from another without replacing your global prompt customizations..lean_ai/reference/ and the agent uses them for better plans without leaking content to cloud APIs.VS Code / VSCodium: Install from the VS Code Marketplace or OpenVSX.
JetBrains IDEs (IntelliJ, PyCharm, WebStorm, CLion, etc.): See the JetBrains Plugin guide for build and install instructions.
On first activation, the extension automatically creates a Python virtual environment and installs the backend server — no manual setup required.
Download Ollama and pull a model:
ollama pull qwen3-coder:30b
Cloud models: Ollama also supports cloud-hosted models. Pull one with
ollama pull model-name:cloud, then runollama run model-name:cloudand follow the link to connect your Ollama Cloud account. Once linked, select the cloud model from the Lean AI dropdown — it works the same as a local model.
/initType /init in the chat panel to index your workspace and generate project context. Then describe what you want built.
If you prefer to build from source instead of installing from the marketplace:
cd backend
pip install -e ".[dev]"
For voice features on Ubuntu 26.04 or any environment where python3 is already 3.14+, create the backend virtualenv with Python 3.13 first. The current voice extra depends on kokoro-onnx, which does not yet support Python 3.14.
sudo apt install portaudio19-dev build-essential
cd backend
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[voice]"
If you're running the extension against that source checkout, set lean-ai.backendDir to the backend/ directory and lean-ai.pythonPath to backend/.venv/bin/python.
Need cloud providers or reference library support? See optional extras.
Start the server manually:
uvicorn lean_ai.main:app --reload --port 8422
cd extension && npm install && npm run build
npx vsce package --no-dependencies
Install the generated .vsix file: Extensions sidebar > ... menu > Install from VSIX...
When building from source, set lean-ai.backendDir or lean-ai.pythonPath in the extension settings — the automatic installer is skipped when either setting is explicitly configured.
You: "Add user authentication with JWT tokens"
|
[Chat refines the idea]
|
[6-phase planning pipeline]
scope -> files -> design -> risks -> plan
|
[You review and approve]
|
[Agent executes step-by-step]
creates files, edits code, writes tests
|
[Post-execution validation]
auto-format -> lint fix -> lint check -> test
failures fed back to LLM for self-correction
|
[Changes committed on a branch]
/approve to merge, /reject to discard
Three common modes:
/agent — full planning pipeline for features and refactors/fix — skip planning, let the agent explore and fix directly/request — skip planning with a request-oriented role tuned for research, drafting, and open-ended tasksSee Architecture for the full breakdown.
Lean AI can tune the three main model roles independently:
/requestOn the first run for a given role + model, Lean AI performs a lightweight calibration pass, selects the best role framing for that model, stores the result in .lean_ai/role_tuning/, and writes a model-scoped prompt override into .lean_ai/prompts.yaml.
If you want to prewarm those artifacts on one machine and share them with teammates, run /tune-roles. That command explicitly tunes the active primary, request, and expert role assignments (including primary fallbacks when a dedicated request/expert model is not configured), writes the same .lean_ai/role_tuning/*.json profiles plus .lean_ai/prompts.yaml, and lets you commit just those sharable files for reuse on other machines with the same provider/model IDs.
That tuned result is reused until one of the inputs changes:
Manual prompt customization still works. Global overrides remain the fallback layer, and a matching model-scoped override wins only for that specific role/model pair.
| Command | What it does |
|---|---|
/init | Index workspace and generate project context |
/tune-roles | Prewarm sharable role-tuning artifacts for the active role assignments |
/agent | Send a task to the planning pipeline |
/fix | Skip planning, fix directly with full tool access |
/approve | Merge the agent's branch |
/reject | Discard the agent's branch |
/style | Generate style guide from CSS/templates |
/skill <name> <task> | Load a local skill from .lean_ai/skills/<name>/instructions.md and apply it to the task |
/request <task> | Skip planning, open-ended task with full tool access |
/resume [session_id] | Resume a previous session |
/help | Show this help |
/interview-prep | Convert a .docx resume and tailor it for a specific role |
/batch-prep | Tailor resumes + cover letters for many roles in one run |
/ats-check [slug] | Keyword gap report comparing resume to the job description |
/thank-you [slug] | Draft a post-interview thank-you note |
/recruiter-reply | Draft a reply to a recruiter's cold outreach |
/negotiate [slug] | Research market comp and build a negotiation brief |
/analyse-rejection [slug] | Post-mortem a rejection with concrete takeaways |
/log-applied [slug] | Append a tracker row and commit the application folder to git |
/mock-interview [slug] | Interactive Q&A practice with rubric scoring |
/note | Save a note (auto-categorized by project) |
/scaffold | Bootstrap a new project |
Create a backend/config.yaml file (or use the extension's settings panel):
# Provider: ollama, openai, or anthropic
llm_provider: ollama
# Local model (default)
ollama_model: "qwen3-coder:30b"
ollama_context_window: 128 # 128k — shorthand for 131072
# Cloud API keys — encrypt with: python -m lean_ai encrypt-key <key>
openai_api_key: "enc:gAAAAABf..."
anthropic_api_key: "enc:gAAAAABf..."
Environment variables (LEAN_AI_*) and legacy .env files also work. See configuration priority.
Use a local model for the bulk of the work and a cloud model only for planning and complex fixes:
llm_provider: ollama
ollama_model: "qwen3-coder:30b"
# Expert: cloud model for planning phases 3-5 and final fix retry
expert_llm_provider: anthropic
anthropic_api_key: "enc:gAAAAABf..."
anthropic_expert_model: "claude-opus-4-6"
The expert model only runs for planning phases 3–5 (design + risk synthesis, plan assembly, verification) and the final validation fix retry. All codebase exploration, implementation, and routine tool calls use the primary local model.
Note: the cloud provider's Python SDK must be installed even when the primary provider is Ollama — run
pip install -e ".[dev,anthropic]"orpip install -e ".[dev,openai]"as appropriate, then restart the server.
Use three different local models matched to each role:
ollama_model: "qwen3-coder:30b"
# Expert: larger model for planning and complex reasoning
ollama_model_expert: "qwen3-coder-next:80b"
# Request: smaller model for chat conversation and prompt building
request_llm_provider: openai
openai_base_url: "http://localhost:11434/v1"
openai_request_model: "gpt-oss:20b"
See the full configuration reference for all options.
| Guide | Description |
|---|---|
| Configuration | All environment variables, extension settings, and model setup |
| Architecture | Planning pipeline, workflow modes, tools, and internals |
| Example Flow | End-to-end walkthrough of a real session with every guardrail called out |
| Reference Library & Refiner | Private docs, RAG enrichment, and cloud privacy |
| UI Verification | Vision-backed screenshot analysis for web pages and desktop GUIs |
| API Reference | REST endpoints and WebSocket protocol |
| Extension Guide | VSCode/VSCodium setup, commands, and settings |
| JetBrains Plugin | IntelliJ, PyCharm, WebStorm, CLion, and all JetBrains IDEs |
| Prompt Customization | Global and model-scoped prompt overrides, including role tuning |
| Skills Guide | How /skill works and how to author high-quality skills |
qwen3-coder:30b) — free, local, no account neededOllama is always required for inline predictions and embeddings, even when using cloud providers.
| Layer | Technology |
|---|---|
| Backend | Python, FastAPI, aiosqlite |
| LLM providers | Ollama, OpenAI, Anthropic |
| Code analysis | tree-sitter (13 languages) |
| Search | Whoosh BM25F + embedding RRF |
| VS Code Extension | TypeScript, VSCode API |
| JetBrains Plugin | Kotlin, IntelliJ Platform SDK, JCEF |
MIT
/memories | Manually trigger memory extraction from the last completed workflow session |
/reboot | Restart the backend server |
| Modelfile Guide |
| Customizing Ollama models with persistent rules |
| llama-server Guide | Using llama.cpp as an alternative to Ollama |
| Regulated Environments | Self-hosted deployment for HIPAA, SOX, GDPR, ITAR, and air-gapped networks |