r/OpenSourceeAI • • Apr 10 '26

I built a local AI coding system that actually understands your codebase — 29 systems, 500+ tests, entirely with Claude as my coding partner

Hey everyone,

I'm Gowri Shankar, a DevOps engineer from Hyderabad. Over the past few weeks, I built something I'm genuinely proud of, and I want to share it honestly.

LeanAI is a fully local, project-aware AI coding assistant. It runs Qwen2.5 Coder (7B and 32B) on your machine — no cloud, no API keys, no subscriptions, no data leaving your computer. Ever.

GitHub: https://github.com/gowrishankar-infra/leanai

Being honest upfront: I built this using Claude (Anthropic) as my coding partner. Claude wrote most of the code. I made every architectural decision, debugged every Windows/CUDA issue, tested everything on my machine, and directed every phase.

What makes it different from Tabby/Aider/Continue:

Most AI coding tools treat your codebase as a stranger every time. LeanAI actually knows your project:

  • Project Brain — scans your entire codebase with AST analysis. My project: 86 files, 1,581 functions, 9,053 dependency edges, scanned in 4 seconds. When I ask "what does the engine file do?", it describes MY actual engine with MY real classes — not a generic example.

  • Git Intelligence — reads your full commit history. /bisect "auth stopped working" analyzes 20 commits semantically and tells you which one most likely broke it, with reasoning. (Nobody else has this.)

  • TDD Auto-Fix Loop — write a failing test, LeanAI writes code until it passes. The output is verified correct, not just "looks right."

  • Sub-2ms Autocomplete — indexes all 1,581 functions from your project brain. When you type gen, it suggests generate(), generate_changelog(), generate_batch() from YOUR actual codebase. No model call needed.

  • Adversarial Code Verification — /fuzz def sort(arr): return sorted(arr) generates 12 edge cases, finds 3 bugs (None, mixed types), suggests fixes. All in under 1 second.

  • Session Memory — remembers everything across sessions. "What is my name?" → instant, from memory. Every conversation is searchable.

  • Auto Model Switching — simple questions go to 7B (fast), complex ones auto-switch to 32B (quality). You don't choose.

  • Continuous Fine-Tuning Pipeline — every interaction auto-collects training data. When you have enough, QLoRA fine-tuning makes the model learn YOUR coding patterns. No other tool does this.

  • 3-Pass Reasoning — chain-of-thought → self-critique → refinement. Significantly better answers for complex questions.

The numbers:

  • 29 integrated systems

  • 500+ tests (pytest), all passing

  • 27,000+ lines of Python

  • 45+ CLI commands

  • 3 interfaces (CLI, Web UI, VS Code extension)

  • 2 models (7B fast, 32B quality)

  • $0/month, runs on consumer hardware

What it's NOT:

  • It's not faster than cloud AI (25-90 seconds on CPU vs 2-5 seconds)

  • It's not smarter than Claude/GPT-4 on raw reasoning

  • It's not polished like Cursor or Copilot

  • It doesn't have inline autocomplete like Copilot (the brain-based completion is different)

What it IS:

  • The only tool that combines project brain + git intelligence + TDD verification + session memory + fine-tuning + adversarial fuzzing + semantic git bisect in one local system

  • 100% private — your code never leaves your machine

  • Free forever

My setup: Windows 11, i7-11800H, 32GB RAM, RTX 3050 Ti (CPU-only currently — CUDA 13.2 compatibility issues). Works fine on CPU, just slower.

I'd love feedback, bug reports, feature requests, or just honest criticism. I know it's rough around the edges. That's why I'm sharing it — to learn and improve.

Thanks for reading.

— Gowri Shankar https://github.com/gowrishankar-infra/leanai

34 Upvotes

Duplicates

• • Apr 13 '26

✨

1 Upvotes