Local-first coding taste learner. Extracts your coding style from git history using small models (3B–14B parameters). All processing stays on your machine.
An open-source alternative to CommandCode's taste feature.
Every developer builds up years of micro-decisions: how they name variables, when they extract helpers, which patterns they reach for, how they structure tests. This accumulated intuition is your coding taste.
Most AI coding agents ignore it. They generate statistically average code. You fix it. They don't learn. You fix it again.
Neuron solves this by:
- Observing your actual code changes from git history
- Extracting patterns using a small local model
- Enforcing those patterns by injecting them into your agent's context
- Install Ollama: https://ollama.com
- Pull a small coding model (pick one):
# Best balance of speed and quality (4.7GB)
ollama pull qwen2.5-coder:latest
# Ultra-fast, surprisingly capable (2.0GB)
ollama pull llama3.2:3b
# Strong reasoning (9.1GB)
ollama pull phi4:14b- Verify it's running:
ollama list- Get an API key at https://openrouter.ai
- Set it as an environment variable:
export NEURON_API_KEY="sk-or-v1-..."
export NEURON_BACKEND="openrouter"
export NEURON_MODEL="qwen/qwen-2.5-7b-instruct"npm i -g neurongit clone https://github.com/shahidcodes/neuron.git
cd neuron
npm install
npm run build
npm link # makes `neuron` available globallyTo update later:
cd neuron
git pull
npm run buildInside any git repository:
cd ~/my-project
neuron learnThis will:
- Analyze your last 200 commits (configurable)
- Extract up to 50 diff signals
- Run them through your local model
- Generate
.neuron/taste.md
Expected output:
✔ Extracted 47 signals from 83 commits
Using model: qwen2.5-coder:latest (ollama)
✔ Generated taste for 6 categories
✔ Merged: +12 new, ~3 updated, -1 removed, =8 unchanged
✔ Taste written to .neuron/taste.md
✓ Taste learned successfully
# TypeScript
- Use strict mode (0.92)
- Prefer type imports for type-only dependencies (0.88)
- Use explicit return types on exported functions (0.75)
# CLI Conventions
- Use Commander.js for CLI tools (0.85)
- Use lowercase single-letter flags (-v, -h) (0.82)
# Testing
- Use Vitest instead of Jest (0.90)
- Group tests by feature area (0.71)
Claude Code:
neuron apply claude-codeThis writes taste into two places:
.claude/projects/<name>/memory/taste.md— Claude Code's memory systemCLAUDE.md— Project instructions
Restart Claude Code to pick it up.
Cursor:
neuron apply cursorThis appends taste to .cursorrules.
Any other agent:
neuron apply genericCopy-paste the printed taste into your agent's custom instructions.
Learn taste from git history.
neuron learn # Current directory, default 200 commits
neuron learn /path/to/repo # Specific repo
neuron learn --max-commits 500 # Analyze more history
neuron learn --max-signals 100 # Extract more signals
neuron learn --author "John Doe" # Only your commits
neuron learn --branch develop # Specific branch
neuron learn -g # Store in global taste (~/.neuron/)Inject taste into an agent.
neuron apply claude-code # Claude Code
neuron apply cursor # Cursor
neuron apply generic # Print for manual use
neuron apply claude-code -g # Use global tasteList available taste packages.
neuron list # Project + global
neuron list -g # Global onlyValidate taste file format.
neuron lint
neuron lint -gIncremental update from recent commits.
neuron update # Last 50 new commits
neuron update --max-commits 20 # Fewer commits| Variable | Default | Description |
|---|---|---|
NEURON_MODEL |
qwen2.5-coder:latest |
Model name |
NEURON_BACKEND |
ollama |
ollama or openrouter |
OLLAMA_HOST |
http://localhost:11434 |
Ollama server URL |
NEURON_API_KEY |
— | API key for OpenRouter |
NEURON_API_URL |
— | Custom API endpoint |
neuron learn --model llama3.2:3b
neuron learn --model qwen3.5:latestNeuron runs git log and git show to extract code changes:
- Collects commits by author (ignores bots, merge commits, reverts)
- Extracts substitutions — pairs of removed/added code
- Filters noise — skips lockfiles, minified code, dist folders
- Groups patterns — identical changes across multiple files get grouped
- Infers categories — imports, types, testing, logging, error-handling, code-style
Signals are sent to a small model in a two-stage pipeline:
Stage 1: Extract raw patterns
"Analyze these 12 diff signals and output JSON patterns"
Stage 2: Refine into taste rules
"Convert patterns into formal rules:
- Preference. Confidence: 0.85"
This works reliably even with 3B parameter models because the task is highly structured.
Taste is stored in .neuron/taste.md:
---
generatedAt: 2026-05-22T10:00:00Z
model: qwen2.5-coder:latest
commitsAnalyzed: 83
signalsExtracted: 47
---
# TypeScript
- Use strict mode. Confidence: 0.92
- Prefer type imports for type-only dependencies. Confidence: 0.88When you run neuron learn again:
- New rules are merged with existing taste
- Confidence scores are updated using weighted averaging
- Old rules decay by 5% per month if not seen
- Rules below 0.30 confidence are removed
Taste is injected into agent context as system instructions. The agent doesn't "train" on your taste — it reads it as rules before generating code.
Human-readable markdown with YAML frontmatter:
---
generatedAt: 2026-05-22T10:00:00Z
model: qwen2.5-coder:latest
source: git-history
commitsAnalyzed: 83
signalsExtracted: 47
categories:
- typescript
- cli
- testing
---
# TypeScript
- Use strict mode. Confidence: 0.92
- Prefer explicit return types on exported functions. Confidence: 0.75
## Imports
- Use type imports for type-only dependencies. Confidence: 0.88
- Prefer named exports over default exports. Confidence: 0.85
# CLI Conventions
- Use Commander.js for CLI tools. Confidence: 0.85
- Use lowercase single-letter flags (-v, -h, -q). Confidence: 0.82
- Start versions at 0.0.1. Confidence: 0.78
# Testing
- Use Vitest instead of Jest. Confidence: 0.90
- Group tests by feature area. Confidence: 0.71You can edit this file directly. Neuron will merge your manual edits on the next run.
| Location | Purpose |
|---|---|
.neuron/taste.md |
Project-specific taste |
~/.neuron/taste.md |
Global taste (cross-project) |
commandcode.ai/... |
Not used — Neuron is fully local |
Use -g flag for global operations:
neuron learn -g # Learn global taste
neuron apply claude-code -g # Apply global taste| Feature | CommandCode | Neuron |
|---|---|---|
| Signal source | Git history + session interactions | Git history (session coming soon) |
| Model | Proprietary taste-1 server |
Your local Ollama model |
| Privacy | Processes on their servers | 100% local |
| Cost | Subscription | Free (after Ollama setup) |
| Taste format | .commandcode/taste/ |
.neuron/taste.md |
| Sharing | npx taste push/pull |
Git-based (future) |
- Are you in a git repository? Run
git status - Does the repo have commits with actual code changes? Root commits and add-only commits produce fewer signals
- Try
neuron learn --max-commits 500to analyze more history
ollama pull qwen2.5-coder:latestOr set a different model:
export NEURON_MODEL="llama3.2:3b"Ollama might not be running:
ollama serveOr set a remote Ollama host:
export OLLAMA_HOST="http://your-server:11434"The model needs more signals to learn real patterns. Run on a repo with more diverse commits, or increase --max-signals.
- Git signal extraction
- Small model processing (Ollama/OpenRouter)
- Taste storage & merging
- Claude Code injection
- Cursor injection
- Session-based learning (post-agent diff analysis)
- Team taste sharing via git
- VS Code extension
- Custom prompt templates
MIT