🦊 Announcing Tharos v0.1.0: Smarter Git Hooks, Powered by Local AI
I’m excited to share Tharos v0.1.0 – an open-source CLI that brings semantic understanding to your pre-commit hooks. Forget scripts that just check syntax; this hook understands your code’s meaning.
The Problem with "Dumb" Hooks
Most Git hooks today are glorified script runners. They run eslint, prettier, or security scanners, but they can’t answer questions like:
· "Is this function doing too much?" · "Have I seen similar logic three files ago?" · "Could this variable name be clearer?"
These are semantic questions, and they require understanding code context—not just parsing it.
What Tharos Actually Does
Tharos is a Node.js CLI that sits in your .git/hooks/pre-commit and acts like a pair programmer…
🦊 Announcing Tharos v0.1.0: Smarter Git Hooks, Powered by Local AI
I’m excited to share Tharos v0.1.0 – an open-source CLI that brings semantic understanding to your pre-commit hooks. Forget scripts that just check syntax; this hook understands your code’s meaning.
The Problem with "Dumb" Hooks
Most Git hooks today are glorified script runners. They run eslint, prettier, or security scanners, but they can’t answer questions like:
· "Is this function doing too much?" · "Have I seen similar logic three files ago?" · "Could this variable name be clearer?"
These are semantic questions, and they require understanding code context—not just parsing it.
What Tharos Actually Does
Tharos is a Node.js CLI that sits in your .git/hooks/pre-commit and acts like a pair programmer:
# What you'll see when you commit
$ git commit -m "Add auth middleware"
🦊 Tharos Local Analysis
────────────────────────
🔍 Security Check:
File: middleware/auth.js:42
Warning: JWT secret seems hardcoded
Suggestion: Use environment variables for secrets
🤖 AI Suggestion (codellama:7b):
File: middleware/auth.js:15-80
Suggestion: Consider extracting token validation
into a separate function (~40 lines)
📚 Quality Check:
File: utils/helpers.js:8-25
Warning: Similar logic found in services/user.js:45-62
Suggestion: Possible duplication - consider refactoring
💡 3 suggestions found. Commit proceeding...
The magic? It runs 100% locally using Ollama with models like codellama or deepseek-coder. No data leaves your machine.
Why This Is Different
Traditional Hooks Tharos Pattern matching (regex, AST) Semantic understanding "This syntax is wrong" "This logic is complex and here’s why" Limited to configured rules Learns code patterns across your repo External API dependencies Local LLM (optional cloud)
Quick Start
# 1. Install globally
npm install -g @collabchron/tharos
# 2. Initialize in your repo
cd your-project
tharos init --local
# 3. Make sure Ollama is running
ollama run codellama:7b
# 4. Try it
tharos scan --staged
# Or just commit normally
git commit -m "Test Tharos"
Under the Hood (v0.1.0 Tech Stack)
· Language: TypeScript with Node.js CLI · AI Integration: Ollama REST API + fallback rule engine · Code Analysis: Babel/TypeScript AST parsing · Git Integration: Pure Git hooks (no server required) · Configuration: Simple .tharos.json with zero defaults
What’s Working Today (v0.1.0)
· ✅ Local AI analysis via Ollama · ✅ Basic security checks (hardcoded secrets, etc.) · ✅ Duplicate logic detection across files · ✅ Code smell detection (long functions, poor naming) · ✅ Configurable rule levels (ignore/warning/error) · ✅ Clean, developer-friendly CLI output
The Vision (Where This Could Go)
This v0.1.0 release is just the local AI engine. If the concept resonates, here’s what’s possible:
- Cloud Policy Layer - Org-wide rules that sync automatically
- Team Features - Shared rule sets, audit logs, compliance tracking
- Advanced AI - Fix suggestions, automated refactoring, PR summaries
- Ecosystem - VS Code extension, GitHub Action, GitLab integration
I Need Your Honest Feedback
This is an experiment. I’m launching v0.1.0 to answer one question:
Do developers want smarter Git hooks, or are current tools "good enough"?
Try It and Tell Me:
- Does the AI feedback feel useful or just noisy?
- What’s your current pre-commit workflow missing?
- Would this work for your team? What’s blocking adoption?
- What features would make you use this daily?
Contribute & Follow
· GitHub: github.com/chinonsochikelue/tharos (⭐ stars welcome!) · NPM: npm install -g @collabchron/tharos · Issues: Found a bug? Feature request? Open an issue
Final Thought
The best developer tools feel like superpowers. They don’t just automate—they make you smarter. Tharos is my attempt to bring that to the commit stage, where feedback is most actionable.
Try it for one commit. See if it catches something your linters missed. And please—tell me what you really think.
Discussion questions for the comments:
- What’s the most frustrating part of your current pre-commit/review workflow?
- Would you prefer AI feedback before commit (like Tharos) or in PR reviews?
- What’s your #1 fear about AI in your development workflow?
P.S. Tharos is open-source (MIT). If you’re into TypeScript, LLMs, or DevTools, contributions are wildly welcome.