Run Cursor, Claude Code, Cline, and more on ANY LLM — including free local models
If you're like me, you've probably fallen in love with AI coding assistants. Tools like Cursor, Claude Code CLI, Cline, and OpenClaw/Clawdbot have genuinely transformed how I write code. But there's a catch — they're expensive.
Between API costs and subscription fees, I was burning through $100-300/month just on AI coding tools. That's when I built Lynkr.
🔗 What is Lynkr?
Lynkr is an open-source universal LLM proxy that lets you run your favorite AI coding tools on any model provider — including completely free local models via Ollama.
Think of it as a universal adapter. Your tools think they're talking to their native API, but Lynkr transparently routes requests to whatever backend you choose.
💡 The Problem Lynkr Solves
Here's what frustrates developers:
- Vendor lock-in — Cursor only works with OpenAI/Anthropic. Claude Code CLI only works with Anthropic.
- Expensive APIs — Claude API costs add up fast, especially for heavy coding sessions
- No local option — Want to use your RTX 4090 for coding assistance? Too bad.
- Enterprise restrictions — Many companies can't send code to external APIs
Lynkr fixes all of this.
🏗️ How It Works
┌─────────────┐ ┌─────────┐ ┌──────────────────┐
│ Cursor │ │ │ │ Ollama (local) │
│ Claude Code │────▶│ Lynkr │────▶│ AWS Bedrock │
│ Cline │ │ Proxy │ │ Azure OpenAI │
│ OpenClaw │ │ │ │ OpenRouter │
└─────────────┘ └─────────┘ └──────────────────┘
Lynkr acts as a drop-in replacement for the Anthropic API. It:
- Receives requests from your AI coding tool
- Translates them to your target provider's format
- Streams responses back seamlessly
Your tools don't know the difference.
🚀 Supported Providers
Lynkr supports 12+ providers:
- Ollama - 100% local, FREE
- AWS Bedrock - Enterprise-grade, ~60% cheaper
- Azure OpenAI - Enterprise-grade
- Azure Anthropic - Claude on Azure
- OpenRouter - 100+ models via single API
- OpenAI - Direct GPT access
- Google Vertex AI - Gemini models
- Databricks - Enterprise ML platform
- Z.AI (Zhipu) - ~1/7 cost of Anthropic
- LM Studio - Local models with GUI
- llama.cpp - Local GGUF models
📦 Quick Start (5 minutes)
Option 1: Run locally with Ollama (FREE)
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull a coding model
ollama pull qwen2.5-coder:latest
# Clone and configure Lynkr
git clone https://github.com/Fast-Editor/Lynkr.git
cd Lynkr
cp .env.example .env
# Edit .env:
MODEL_PROVIDER=ollama
OLLAMA_MODEL=qwen2.5-coder:latest
OLLAMA_ENDPOINT=http://localhost:11434
# Start
npm install && npm start
Option 2: Use with AWS Bedrock
# Clone and configure
git clone https://github.com/Fast-Editor/Lynkr.git
cd Lynkr
cp .env.example .env
# Edit .env:
MODEL_PROVIDER=bedrock
AWS_BEDROCK_API_KEY=your-bedrock-api-key
AWS_BEDROCK_REGION=us-east-1
AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
# Start
npm install && npm start
Option 3: OpenRouter (Simplest Cloud Setup)
# Edit .env:
MODEL_PROVIDER=openrouter
OPENROUTER_API_KEY=sk-or-v1-your-key
OPENROUTER_MODEL=anthropic/claude-3.5-sonnet
npm start
Configure Your Tool
Point your AI coding tool to Lynkr:
# For Claude Code CLI
export ANTHROPIC_API_KEY=dummy
export ANTHROPIC_BASE_URL=http://localhost:8081
# Now use Claude Code normally!
claude "Refactor this function"
💰 Real Cost Comparison
Here's what I was spending vs. what I spend now:
| Tool | Before (Direct API) | After (Lynkr + Bedrock) | Savings |
|---|---|---|---|
| Claude Code CLI | $150/month | $45/month | 70% |
| Heavy Cursor usage | $100/month | $30/month | 70% |
| With Ollama | - | $0/month | 100% |
The local Ollama option is genuinely free. If you have a decent GPU (RTX 3080+), models like qwen2.5-coder run surprisingly well.
🔒 Enterprise Use Cases
Lynkr shines in enterprise environments:
- Air-gapped networks: Run entirely local with Ollama
- Compliance: Keep code on AWS/Azure infrastructure you control
- Cost control: Set usage limits and track spending per team
- Audit trails: Log all requests for compliance
⚡ Advanced Features
- Hybrid Routing: Use Ollama for simple requests, fallback to cloud for complex ones
- Token Optimization: 60-80% cost reduction through smart compression
- Long-Term Memory: Titans-inspired memory system for context persistence
- Headroom Compression: 47-92% token reduction via intelligent context compression
- Hot Reload: Config changes apply without restart
- Smart Tool Selection: Automatic tool filtering to reduce token usage
🤝 Contributing
Lynkr is open source (MIT license). Contributions welcome:
- 🐛 Bug reports and fixes
- 🔌 New provider integrations
- 📖 Documentation improvements
- ⭐ Stars on GitHub!
Try It Today
Stop overpaying for AI coding tools. With Lynkr, you can:
- Save 60-80% using AWS Bedrock or Azure
- Pay nothing using local Ollama models
- Keep code private in enterprise environments
⭐ Star on GitHub: github.com/Fast-Editor/Lynkr
📚 Full Documentation: deepwiki.com/Fast-Editor/Lynkr
What AI coding tools do you use? Have you tried running them locally? Let me know in the comments!
Top comments (0)