Skip to content

RichardHam-co-uk/ProjectLodestar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

70 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Version Status Branch Tests Coverage

🌟 Lodestar

The ultimate AI-powered developer cockpit for cost-optimized building.

Lodestar is a high-performance orchestration layer for LLM-based development. It intelligently routes between local FREE models (via Ollama) and premium APIs (Claude, OpenAI, Gemini) to maximize speed and minimize costs (target: 90%+ savings).


Current Release: v2.0.0-beta.2 Primary Integration Branch: develop


✨ Key Features

  • πŸ’° 90% Cost Savings - Default to FREE Ollama models (DeepSeek, Llama)
  • πŸ”„ 8 LLM Providers - Claude, OpenAI, Grok, Gemini + FREE models
  • πŸ€– Smart Routing - Automatic provider selection via LiteLLM
  • πŸ“ Never Lose Context - Git auto-commits preserve all changes
  • 🎯 Zero Configuration - Works out of the box with sensible defaults
  • πŸ§ͺ Automated Testing - Verify all providers in 60 seconds
  • πŸ” Secure - API keys in environment, logs excluded from git

πŸš€ Quick Start

Prerequisites

  • Debian/Ubuntu Linux VM (2 CPU, 4GB RAM minimum)
  • Ollama server with GPU (separate VM recommended)
  • Python 3.11+
  • Git

Installation

# Clone repository
git clone git@github.com:zebadee2kk/ProjectLodestar.git
cd ProjectLodestar

# Install dependencies
pip install --break-system-packages aider-chat litellm

# Configure API keys (optional - FREE models work without these)
nano ~/.bashrc
# Add:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export XAI_API_KEY="xai-..."
export GEMINI_API_KEY="..."

source ~/.bashrc

# Start router
./scripts/start-router.sh

# Test everything
./scripts/test-providers-simple.sh

First Use

# Navigate to your project
cd ~/your-project

# Start coding with FREE AI
aider file.py

# Need more power? Switch to Claude
aider --model claude-sonnet file.py

# Switch models mid-session
/model gpt-4o-mini
/model gpt-3.5-turbo  # Back to FREE

πŸ“Š Provider Overview

Tier Provider Model Alias Cost Status
1 DeepSeek gpt-3.5-turbo FREE βœ… Working
1 Llama 3.1 local-llama FREE βœ… Working
2 Claude Sonnet claude-sonnet $3/$15 per M πŸ’³ Needs Credits
2 Claude Opus claude-opus $15/$75 per M πŸ’³ Needs Credits
3 GPT-4o Mini gpt-4o-mini $0.15/$0.60 per M πŸ’³ Needs Credits
3 GPT-4o gpt-4o $2.50/$10 per M πŸ’³ Needs Credits
4 Grok Beta grok-beta $5/$15 per M πŸ’³ Needs Credits
5 Gemini gemini-pro $0.08/$0.30 per M βš™οΈ Config Needed

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Aider (CLI)    β”‚  ← Your coding interface
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  LiteLLM Router β”‚  ← Smart routing layer (localhost:4000)
β”‚  (OpenAI API)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                               β”‚
    β–Ό                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ FREE Models  β”‚           β”‚ PAID APIs    β”‚
β”‚              β”‚           β”‚              β”‚
β”‚ β€’ DeepSeek   β”‚           β”‚ β€’ Claude     β”‚
β”‚ β€’ Llama 3.1  β”‚           β”‚ β€’ OpenAI     β”‚
β”‚   (T600 GPU) β”‚           β”‚ β€’ Grok       β”‚
β”‚              β”‚           β”‚ β€’ Gemini     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Flow:

  1. Aider sends requests to LiteLLM router (OpenAI-compatible)
  2. Router routes to appropriate backend based on model alias
  3. FREE models handle 90% of requests
  4. Premium APIs only used when explicitly requested

πŸ“š Documentation


πŸ”§ Useful Commands

# Start/Stop Router
./scripts/start-router.sh
./scripts/stop-router.sh

# Check Status
./scripts/status.sh

# Test All Providers
./scripts/test-providers-simple.sh
./scripts/test-all-providers.sh

# v2.0 Features
lodestar status              # Check module health
lodestar costs --dashboard   # Real-time cost TUI
lodestar route "fix bug"     # Test routing decision
lodestar tournament "prompt" model1 model2  # Compare models
lodestar diff                # Visual AI diff
lodestar run "python app.py" # Self-healing execution
lodestar cache               # View cache stats
lodestar cache --clear       # Clear response cache

# Test Infrastructure
./scripts/test-lodestar.sh

# Create ADR
./scripts/adr-new.sh "Decision Title"

πŸ’° Cost Comparison

Before Lodestar (Pure Claude):

  • ~100 requests/day Γ— 30 days = 3,000 requests/month
  • Average ~1,000 tokens per request
  • Cost: ~$9-15/month
  • Usage limits block work

With Lodestar (90% FREE, 10% Claude):

  • 2,700 requests via FREE DeepSeek (unlimited)
  • 300 requests via Claude (complex tasks)
  • Cost: ~$0.90-1.50/month
  • Savings: 90%+ with unlimited usage

🎯 Use Cases

Perfect For:

  • Solo developers seeking cost-effective AI coding
  • Projects with budget constraints
  • Learning AI-assisted development
  • Long coding sessions (4-8 hours)
  • Experimentation without usage anxiety

When to Upgrade to Paid:

  • Complex architecture decisions
  • Critical bug fixes requiring deep reasoning
  • Code reviews of large PRs
  • Documentation generation for complex systems

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Write/update tests
  5. Submit a pull request

See CONTRIBUTING.md for details.


πŸ“„ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments

Built with:


πŸ“¬ Contact


Status: v2.0.0-beta.2 - Core features complete, 296 tests passing Last Updated: February 10, 2026

✨ SSH authentication configured

About

AI development environment with 90% cost savings. Routes between 8 LLM providers while defaulting to FREE local models. Production-ready with automated testing.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors