โ ๏ธ IMPORTANT: This is a client-side wrapper that routes queries to tools you install separately. It does NOT include, modify, or redistribute GitHub Copilot, Ollama, or any LLM models. You must have a valid GitHub Copilot subscription to use this tool. See ATTRIBUTION.md for full legal details.
A smart AI assistant for everyone - from solo entrepreneurs to developers - combining local LLMs with GitHub Copilot for faster, private, and cost-effective AI assistance.
- ๐ Entrepreneurs & Small Business Owners - Need quick answers without paying per query
- ๐ผ Freelancers - Managing multiple projects, need fast context switching
- ๐จโ๐ป Developers - Building, debugging, learning new technologies
- ๐ Students - Learning to code, need instant syntax help
- ๐จ Content Creators - Researching, fact-checking, getting ideas
- ๐ง IT Professionals - Server management, troubleshooting, scripting
You're already paying for GitHub Copilot. This makes it faster for simple queries while keeping the quality high for complex ones, plus adds memory so it never forgets what you're working on.
A memory-aware hybrid AI system that intelligently routes queries between:
- Local Model (DeepSeek Coder) - Fast, free, private
- GitHub Copilot (Claude Sonnet 3.5) - Powerful, context-aware
- Memory Database (SQLite) - Remembers your work, prevents looping
- ๐น Simple queries โ Local model (instant, < 1 second)
- ๐ถ Complex queries โ GitHub Copilot (2-5 seconds)
- ๐ง Status queries โ Memory database (milliseconds)
- ๐ Auto-fallback โ If local fails, uses Copilot
- โ Smart routing based on query complexity
- โ Memory-aware - queries SQLite database for context
- โ Cross-platform - Linux, macOS, Windows
- โ Loop prevention - remembers recent work
- โ Auto-fallback - always get good answers
- โ Usage statistics - track routing patterns
- โ Learning-ready - can fine-tune over time
- โ Private: Simple queries stay local (never sent anywhere)
- โ Cost-effective: Uses GitHub Copilot you already pay for
- โ No extra subscriptions: Just needs Copilot Pro/Business
- โ Offline capable: Local model works without internet
- GitHub Copilot subscription (Pro or Business) - $10-19/month
- GitHub CLI (
gh) installed and authenticated - Ollama for local models (free, open source)
# Clone repository
git clone https://github.com/barrersoftware/hybrid-llm-copilot.git
cd hybrid-llm-copilot
# Run installer
chmod +x install.sh
./install.sh# Clone repository
git clone https://github.com/barrersoftware/hybrid-llm-copilot.git
cd hybrid-llm-copilot
# Run installer
.\install.ps1# Ask a simple question (local - instant)
ask "what is the grep flag for recursive search?"
# Ask about your current work (memory - instant)
ask "what am I currently working on?"
# Ask something complex (Copilot - high quality)
ask "create a business plan outline for a SaaS startup"
# View statistics
ai-statsask "create a pitch deck outline"
ask "what's my project status?"
ask "draft a customer email about shipping delays"ask "what's the git command to undo last commit?"
ask "is my build done?"
ask "debug this error: connection refused"ask "explain Python loops"
ask "what homework did I just complete?"
ask "create a study schedule for 5 subjects"ask "research topics on sustainable tech"
ask "what articles have I written this week?"
ask "generate 10 YouTube video ideas about cooking"User Query
โ
โโโโโโโโโโโโโโโโโโโ
โ Classify Query โ
โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโดโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโ
โ โ โ โ
โโโโโโโโโโ โโโโโโโโ โโโโโโโโโโ โโโโโโโโโโ
โMemory โ โLocal โ โCopilot โ โ GitHub โ
โCheck โ โModel โ โ CLI โ โ API โ
โโโโโโโโโโ โโโโโโโโ โโโโโโโโโโ โโโโโโโโโโ
โ โ โ โ
โโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโ
โ
Response
Memory Database Queries (Instant):
- "What am I working on?"
- "Is my project done?"
- "What did I just complete?"
Local Model (< 1 second):
- Command syntax: "how to copy files?"
- Simple lookups: "what is HTML?"
- Basic questions: "list git commands"
GitHub Copilot (2-5 seconds):
- Business tasks: "create invoice template"
- Complex generation: "write marketing email"
- Debugging: "why isn't this working?"
The system maintains a SQLite database with:
- Active tasks - What you're currently working on
- Recent completions - What was just done
- Command history - Recent actions taken
- Project state - Current status
- Notes & reminders - Things to remember
Without Memory:
You: "What's the status of my project?"
AI: "I don't have that information..."
You: [5 minutes later] "What's the status?"
AI: "I don't have that information..." (frustrating!)
With Memory:
You: "What's the status of my project?"
AI: "Project XYZ: 75% complete, last updated 10 minutes ago"
You: [5 minutes later] "What's the status?"
AI: "Project XYZ: 78% complete, just deployed to staging"
$ ask "how do I compress a folder?"
๐น [Local Model]
tar -czf archive.tar.gz folder_name/$ ask "write a professional email declining a meeting"
๐ถ [GitHub Copilot]
[Full professional email template with warm tone]$ ask "what projects am I working on?"
๐ง [Memory Database]
Active projects:
- Website redesign (80% complete)
- Client proposal (draft ready)
- Blog post (in review)$ ask "how do I test this?"
๐ถ [Copilot with Memory Context]
[Context from memory: You're working on website redesign]
[Specific testing instructions for YOUR project]Edit ~/.config/hybrid-llm/config (Linux/macOS) or %APPDATA%\hybrid-llm\config (Windows):
[local]
model=deepseek-coder:1.3b
# Other options: codellama:7b, qwen2.5-coder:3b
[routing]
simple_threshold=10 # Words to consider query "simple"
local_min_response=20 # Min chars before fallback
[memory]
database=~/.local/share/hybrid-llm/memory.db
update_interval=600 # 10 minutesTrack your usage and savings:
$ ai-stats
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Hybrid AI Statistics
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total Queries: 142
Routing:
Memory: 23 (16.2%) - Instant from database
Local: 67 (47.2%) - Free local model
Copilot: 52 (36.6%) - GitHub Copilot
Time Saved:
Local handled: 67 queries instantly
Average time saved: ~2 seconds per query
Total: ~2.2 minutes saved this week
Cost Efficiency:
Using Copilot Pro: $10/month (unlimited)
Without hybrid: Would need faster responses = frustration
With hybrid: 63% queries instant = productivity boost
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโask "query" # Smart routing
explain "command" # Always use Copilot for detailed explanation
ai-stats # Show usage statistics
memory-query status # Check current tasks
memory-query recent # Recent activityhybrid-llm memory query # Query current state
hybrid-llm memory add-task NAME # Add active task
hybrid-llm memory complete NAME # Mark task complete
hybrid-llm memory recent # Recent activity| Platform | Status | Notes |
|---|---|---|
| Linux | โ Full | Bash scripts, systemd integration |
| macOS | โ Full | Bash scripts, launchd integration |
| Windows | โ Full | PowerShell scripts, Task Scheduler |
Contributions welcome! Please see CONTRIBUTING.md
This project integrates with and references the following trademarked products and services:
- GitHubยฎ and GitHub Copilotยฎ are registered trademarks of GitHub, Inc. (a subsidiary of Microsoft Corporation)
- Microsoftยฎ is a registered trademark of Microsoft Corporation
- Anthropic and Claudeโข are trademarks of Anthropic, PBC
- Ollamaโข is a trademark of Ollama, Inc.
- DeepSeek is a trademark of DeepSeek AI
- Affiliated with, endorsed by, or sponsored by GitHub, Microsoft, Anthropic, or any LLM provider
- A modification or fork of GitHub Copilot
- Sharing, redistributing, or reverse-engineering any proprietary systems
- Circumventing any terms of service
โ This project IS:
- An independent tool that uses GitHub Copilot via its official CLI
- A client-side router that directs queries to appropriate services
- Fully compliant with GitHub Copilot's Terms of Service
- Using only official, documented APIs and CLI tools
- Open source (MIT License) for the routing logic only
This tool acts as a smart wrapper around official tools:
- GitHub CLI (
gh) - Official GitHub command-line tool - Ollama - Open source local LLM runtime
- SQLite - Open source database
It does NOT:
- โ Modify GitHub Copilot
- โ Access GitHub's servers directly
- โ Reverse engineer any APIs
- โ Redistribute proprietary code
- โ Bypass authentication or payment
It DOES:
- โ Route queries to the appropriate tool (local or Copilot)
- โ
Use GitHub Copilot via official
ghCLI commands - โ Maintain a local memory database (your data only)
- โ Provide usage statistics
To use this tool, you MUST:
- โ Have a valid GitHub Copilot subscription (Pro or Business)
- โ Authenticate via official GitHub CLI
- โ Comply with GitHub Copilot Terms of Service
- โ Comply with GitHub Terms of Service
- Local model queries: Stay 100% on your computer (Ollama)
- Copilot queries: Sent to GitHub/Microsoft/Anthropic per their terms
- Memory database: Stored locally, never uploaded
- No tracking: This tool collects no telemetry
This project's routing logic and scripts are licensed under the MIT License.
The underlying services have their own licenses:
- GitHub Copilot: Proprietary (subscription required)
- Ollama: MIT License
- DeepSeek Coder: Proprietary (free to use via Ollama)
- SQLite: Public Domain
MIT License
Copyright (c) 2025 Barrer Software
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This project would not be possible without:
- GitHub & Microsoft - For creating GitHub Copilot and providing official CLI access
- Anthropic - For developing Claude (Sonnet 3.5), which powers GitHub Copilot
- Ollama team - For making local LLMs accessible and easy to run
- DeepSeek AI - For creating excellent open coding models
- Open source community - For tools, libraries, and inspiration
Thank you for making AI accessible to everyone! ๐
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: opensource@barrersoftware.com
- Core routing system
- Memory database integration
- Linux support
- macOS support
- Windows support
- Web UI dashboard
- Weekly fine-tuning pipeline
- VSCode extension
- Response caching
- Multi-model support
- Business workflow templates
Built with โค๏ธ by Barrer Software
Making AI assistance faster, smarter, and more accessible to everyone.
Disclaimer: This is an independent open-source project. Not affiliated with GitHub, Microsoft, Anthropic, or any LLM provider.