lynkr 9.1.9 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +211 -215
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
[](https://github.com/Fast-Editor/Lynkr)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://nodejs.org)
|
|
9
|
-
[](https://github.com/vishalveerareddy123/homebrew-lynkr)
|
|
10
9
|
[](https://deepwiki.com/vishalveerareddy123/Lynkr)
|
|
11
10
|
|
|
12
11
|
<table>
|
|
@@ -20,289 +19,281 @@
|
|
|
20
19
|
|
|
21
20
|
---
|
|
22
21
|
|
|
23
|
-
##
|
|
22
|
+
## Quick Start (2 Minutes)
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**The real costs:**
|
|
28
|
-
- Anthropic API at $15/MTok output adds up fast for daily coding
|
|
29
|
-
- No way to use free local models (Ollama, llama.cpp) with Claude Code
|
|
30
|
-
- Enterprise teams can't route through their own cloud infrastructure
|
|
31
|
-
- Provider outages take your entire workflow down
|
|
32
|
-
|
|
33
|
-
## The Solution
|
|
34
|
-
|
|
35
|
-
Lynkr is a self-hosted proxy that sits between your AI coding tools and any LLM provider. One environment variable change, and your tools work with any model.
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
Claude Code / Cursor / Codex / Cline / Continue / Vercel AI SDK
|
|
39
|
-
|
|
|
40
|
-
Lynkr
|
|
41
|
-
|
|
|
42
|
-
Ollama | Bedrock | Databricks | OpenRouter | Azure | OpenAI | llama.cpp
|
|
43
|
-
```
|
|
24
|
+
### 1. Install Lynkr
|
|
44
25
|
|
|
45
26
|
```bash
|
|
46
|
-
# That's it. Three lines.
|
|
47
27
|
npm install -g lynkr
|
|
48
|
-
export ANTHROPIC_BASE_URL=http://localhost:8081
|
|
49
|
-
lynkr start
|
|
50
28
|
```
|
|
51
29
|
|
|
52
|
-
|
|
30
|
+
### 2. Choose Your Setup
|
|
53
31
|
|
|
54
|
-
|
|
32
|
+
**Option A: Free & Local (Ollama)**
|
|
33
|
+
```bash
|
|
34
|
+
# Install Ollama first: https://ollama.com
|
|
35
|
+
ollama pull qwen2.5-coder:latest
|
|
55
36
|
|
|
56
|
-
|
|
37
|
+
# Start Lynkr
|
|
38
|
+
lynkr start
|
|
39
|
+
```
|
|
57
40
|
|
|
58
|
-
|
|
41
|
+
Your `.env` file (auto-created on first run):
|
|
59
42
|
```bash
|
|
60
|
-
|
|
43
|
+
MODEL_PROVIDER=ollama
|
|
44
|
+
FALLBACK_ENABLED=false
|
|
45
|
+
OLLAMA_MODEL=qwen2.5-coder:latest
|
|
61
46
|
```
|
|
62
47
|
|
|
63
|
-
**
|
|
48
|
+
**Option B: Cloud Provider (OpenRouter)**
|
|
64
49
|
```bash
|
|
65
|
-
|
|
50
|
+
# Get API key from https://openrouter.ai
|
|
51
|
+
lynkr start
|
|
66
52
|
```
|
|
67
53
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
**Free & Local (Ollama)**
|
|
54
|
+
Your `.env` file:
|
|
71
55
|
```bash
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
MODEL_PROVIDER=openrouter
|
|
57
|
+
OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
58
|
+
FALLBACK_ENABLED=false
|
|
75
59
|
```
|
|
76
60
|
|
|
77
|
-
**
|
|
61
|
+
**Option C: Enterprise (AWS Bedrock)**
|
|
78
62
|
```bash
|
|
79
|
-
export MODEL_PROVIDER=bedrock
|
|
80
|
-
export AWS_BEDROCK_API_KEY=your-key
|
|
81
|
-
export AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
|
|
82
63
|
lynkr start
|
|
83
64
|
```
|
|
84
65
|
|
|
85
|
-
|
|
66
|
+
Your `.env` file:
|
|
86
67
|
```bash
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
68
|
+
MODEL_PROVIDER=bedrock
|
|
69
|
+
AWS_BEDROCK_API_KEY=your-aws-key
|
|
70
|
+
AWS_BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0
|
|
71
|
+
FALLBACK_ENABLED=false
|
|
90
72
|
```
|
|
91
73
|
|
|
92
|
-
### Connect Your Tool
|
|
74
|
+
### 3. Connect Your Tool
|
|
93
75
|
|
|
94
76
|
**Claude Code**
|
|
95
77
|
```bash
|
|
96
78
|
export ANTHROPIC_BASE_URL=http://localhost:8081
|
|
97
79
|
export ANTHROPIC_API_KEY=dummy
|
|
98
|
-
claude "
|
|
80
|
+
claude "write a hello world in python"
|
|
99
81
|
```
|
|
100
82
|
|
|
101
|
-
**
|
|
83
|
+
**Cursor IDE**
|
|
84
|
+
- Settings → Models → Override Base URL
|
|
85
|
+
- Set to: `http://localhost:8081/v1`
|
|
86
|
+
- API Key: `any-value`
|
|
87
|
+
|
|
88
|
+
**Codex CLI**
|
|
89
|
+
|
|
90
|
+
Edit `~/.codex/config.toml`:
|
|
102
91
|
```toml
|
|
103
92
|
model_provider = "lynkr"
|
|
104
|
-
model = "gpt-4o"
|
|
105
93
|
|
|
106
94
|
[model_providers.lynkr]
|
|
107
|
-
name = "Lynkr Proxy"
|
|
108
95
|
base_url = "http://localhost:8081/v1"
|
|
109
96
|
wire_api = "responses"
|
|
110
97
|
```
|
|
111
98
|
|
|
112
|
-
**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
**Vercel AI SDK**
|
|
118
|
-
```ts
|
|
119
|
-
import { generateText } from "ai";
|
|
120
|
-
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
|
|
121
|
-
|
|
122
|
-
const lynkr = createOpenAICompatible({
|
|
123
|
-
baseURL: "http://localhost:8081/v1",
|
|
124
|
-
name: "lynkr",
|
|
125
|
-
apiKey: "sk-lynkr",
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
const { text } = await generateText({
|
|
129
|
-
model: lynkr.chatModel("auto"),
|
|
130
|
-
prompt: "Hello!",
|
|
131
|
-
});
|
|
132
|
-
```
|
|
99
|
+
✅ **Done!** Your AI tool now uses your chosen provider.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Why Lynkr?
|
|
133
104
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"base_url": "http://localhost:8081/v1",
|
|
143
|
-
"api_key": "any-value",
|
|
144
|
-
"models": ["auto"]
|
|
145
|
-
}]
|
|
146
|
-
}
|
|
147
|
-
}
|
|
105
|
+
AI coding tools lock you into one provider. Lynkr breaks that lock.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Claude Code / Cursor / Codex / Cline / Continue
|
|
109
|
+
↓
|
|
110
|
+
Lynkr
|
|
111
|
+
↓
|
|
112
|
+
Ollama | Bedrock | Azure | OpenRouter | OpenAI
|
|
148
113
|
```
|
|
149
|
-
Set `OPENCLAW_MODE=true` in Lynkr's `.env` to show actual provider/model in responses.
|
|
150
114
|
|
|
151
|
-
|
|
115
|
+
**What you get:**
|
|
116
|
+
- ✅ Use **free local models** (Ollama, llama.cpp) with Claude Code
|
|
117
|
+
- ✅ Route through **your company's infrastructure** (Databricks, Azure, Bedrock)
|
|
118
|
+
- ✅ Cut costs **60-80%** with smart token optimization
|
|
119
|
+
- ✅ **Zero code changes** - just change one environment variable
|
|
152
120
|
|
|
153
121
|
---
|
|
154
122
|
|
|
155
123
|
## Supported Providers
|
|
156
124
|
|
|
157
|
-
| Provider | Type | Models | Cost |
|
|
158
|
-
|
|
159
|
-
| **Ollama** | Local |
|
|
125
|
+
| Provider | Type | Example Models | Cost |
|
|
126
|
+
|----------|------|---------------|------|
|
|
127
|
+
| **Ollama** | Local | qwen2.5-coder, deepseek-coder, llama3 | **Free** |
|
|
160
128
|
| **llama.cpp** | Local | Any GGUF model | **Free** |
|
|
161
129
|
| **LM Studio** | Local | Local models with GUI | **Free** |
|
|
162
|
-
| **
|
|
163
|
-
| **AWS Bedrock** | Cloud |
|
|
164
|
-
| **OpenRouter** | Cloud | 100+ (GPT, Claude, Llama, Gemini) | $-$$ |
|
|
130
|
+
| **OpenRouter** | Cloud | GPT-4o, Claude 3.5, Llama 3, Gemini | $ |
|
|
131
|
+
| **AWS Bedrock** | Cloud | Claude, Llama, Mistral, Titan | $$ |
|
|
165
132
|
| **Databricks** | Cloud | Claude Sonnet 4.5, Opus 4.6 | $$$ |
|
|
166
133
|
| **Azure OpenAI** | Cloud | GPT-4o, o1, o3 | $$$ |
|
|
167
|
-
| **Azure Anthropic** | Cloud | Claude
|
|
168
|
-
| **OpenAI** | Cloud | GPT-4o, o3
|
|
169
|
-
| **
|
|
170
|
-
| **Moonshot AI** | Cloud | Kimi K2 Thinking/Turbo | $$ |
|
|
171
|
-
| **Z.AI** | Cloud | GLM-4.7 | $$ |
|
|
172
|
-
| **DeepSeek** | Cloud | DeepSeek Reasoner, R1 | $ |
|
|
134
|
+
| **Azure Anthropic** | Cloud | Claude Sonnet, Opus | $$$ |
|
|
135
|
+
| **OpenAI** | Cloud | GPT-4o, o3-mini | $$$ |
|
|
136
|
+
| **DeepSeek** | Cloud | DeepSeek R1, Reasoner | $ |
|
|
173
137
|
|
|
174
|
-
4 local providers for
|
|
138
|
+
**4 local providers** for 100% offline, free usage. **10+ cloud providers** for scale.
|
|
175
139
|
|
|
176
140
|
---
|
|
177
141
|
|
|
178
|
-
##
|
|
179
|
-
|
|
180
|
-
| Feature | Lynkr | LiteLLM (42K stars) | OpenRouter | PortKey |
|
|
181
|
-
|---------|-------|---------------------|------------|---------|
|
|
182
|
-
| **Setup** | `npm install -g lynkr` | Python + Docker + Postgres | Account signup | Docker + config |
|
|
183
|
-
| **Claude Code support** | Drop-in, native | Requires config | No CLI support | Requires config |
|
|
184
|
-
| **Cursor support** | Drop-in, native | Partial | Via API key | Partial |
|
|
185
|
-
| **Codex CLI support** | Drop-in, native | No | No | No |
|
|
186
|
-
| **Built for coding tools** | Yes (purpose-built) | No (general gateway) | No (general API) | No (general gateway) |
|
|
187
|
-
| **Local models** | Ollama, llama.cpp, LM Studio, MLX | Ollama only | No | No |
|
|
188
|
-
| **Token optimization** | Built-in (60-80% savings) | No | No | Caching only |
|
|
189
|
-
| **Complexity routing** | Auto-routes by task difficulty | Manual | Cost/latency only | Manual |
|
|
190
|
-
| **Memory system** | Titans-inspired long-term memory | No | No | No |
|
|
191
|
-
| **Self-hosted** | Yes (Node.js) | Yes (Python stack) | No (SaaS) | Yes (Docker) |
|
|
192
|
-
| **Offline capable** | Yes | Yes | No | No |
|
|
193
|
-
| **Transaction fees** | None | None (OSS) / Paid enterprise | 5.5% on credits | Free tier / Paid |
|
|
194
|
-
| **Dependencies** | Node.js only | Python, Prisma, PostgreSQL | N/A | Docker, Python |
|
|
195
|
-
| **Format conversion** | Anthropic <-> OpenAI (automatic) | Automatic | N/A | Automatic |
|
|
196
|
-
| **Code intelligence** | Graphify (19-lang AST graph) | No | No | No |
|
|
197
|
-
| **Routing telemetry** | Built-in (SQLite + REST API) | No | Dashboard | Dashboard |
|
|
198
|
-
| **Admin hot-reload** | Yes (no restart) | Requires restart | N/A | Requires restart |
|
|
199
|
-
| **License** | Apache 2.0 | MIT | Proprietary | MIT (gateway) |
|
|
200
|
-
|
|
201
|
-
**Lynkr's edge:** Purpose-built for AI coding tools. Not a general LLM gateway — a proxy that understands Claude Code, Cursor, and Codex natively, with built-in token optimization, complexity-based routing, and a memory system designed for coding workflows. Installs in one command, runs on Node.js, zero infrastructure required.
|
|
142
|
+
## Advanced: Tier Routing (Save Even More)
|
|
202
143
|
|
|
203
|
-
|
|
144
|
+
Route different request types to different models automatically:
|
|
204
145
|
|
|
205
|
-
|
|
146
|
+
```bash
|
|
147
|
+
# .env file
|
|
148
|
+
MODEL_PROVIDER=ollama
|
|
149
|
+
FALLBACK_ENABLED=false
|
|
206
150
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
| Daily Claude Code usage | ~$10-30/day | **$0 (free)** | ~$2-8/day | ~$5-15/day |
|
|
210
|
-
| Token optimization savings | — | — | 60-80% further | 60-80% further |
|
|
211
|
-
| Monthly (heavy use) | $300-900 | **$0** | $60-240 | $150-450 |
|
|
151
|
+
# Use small/fast models for simple tasks
|
|
152
|
+
TIER_SIMPLE=ollama:qwen2.5:3b
|
|
212
153
|
|
|
213
|
-
|
|
154
|
+
# Use medium models for normal coding
|
|
155
|
+
TIER_MEDIUM=ollama:qwen2.5:7b
|
|
156
|
+
|
|
157
|
+
# Use powerful models for complex architecture
|
|
158
|
+
TIER_COMPLEX=ollama:deepseek-r1:14b
|
|
159
|
+
TIER_REASONING=ollama:deepseek-r1:14b
|
|
160
|
+
|
|
161
|
+
# Increase limits for long conversations
|
|
162
|
+
POLICY_MAX_STEPS=50
|
|
163
|
+
POLICY_MAX_TOOL_CALLS=100
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Lynkr analyzes each request and routes it to the appropriate tier. Simple questions use fast models. Complex refactoring uses powerful models.
|
|
167
|
+
|
|
168
|
+
**Result:** 70-90% of requests use cheaper/faster models. Only hard problems hit expensive models.
|
|
214
169
|
|
|
215
170
|
---
|
|
216
171
|
|
|
217
|
-
##
|
|
172
|
+
## Configuration Examples
|
|
218
173
|
|
|
219
|
-
|
|
174
|
+
### Minimal Ollama Setup
|
|
175
|
+
```bash
|
|
176
|
+
# .env
|
|
177
|
+
MODEL_PROVIDER=ollama
|
|
178
|
+
FALLBACK_ENABLED=false
|
|
179
|
+
OLLAMA_MODEL=qwen2.5-coder:latest
|
|
180
|
+
POLICY_MAX_STEPS=50
|
|
181
|
+
POLICY_MAX_TOOL_CALLS=100
|
|
182
|
+
```
|
|
220
183
|
|
|
221
|
-
###
|
|
222
|
-
|
|
184
|
+
### Production Cloud Setup
|
|
185
|
+
```bash
|
|
186
|
+
# .env
|
|
187
|
+
MODEL_PROVIDER=openrouter
|
|
188
|
+
OPENROUTER_API_KEY=sk-or-v1-your-key
|
|
189
|
+
FALLBACK_ENABLED=false
|
|
190
|
+
|
|
191
|
+
# Tier routing for cost optimization
|
|
192
|
+
TIER_SIMPLE=openrouter:google/gemini-flash-1.5
|
|
193
|
+
TIER_MEDIUM=openrouter:anthropic/claude-3.5-sonnet
|
|
194
|
+
TIER_COMPLEX=openrouter:anthropic/claude-opus-4
|
|
195
|
+
TIER_REASONING=openrouter:anthropic/claude-opus-4
|
|
196
|
+
|
|
197
|
+
# Increase limits
|
|
198
|
+
POLICY_MAX_STEPS=50
|
|
199
|
+
POLICY_MAX_TOOL_CALLS=100
|
|
200
|
+
|
|
201
|
+
# Optional: Enable caching for repeated prompts
|
|
202
|
+
PROMPT_CACHE_ENABLED=true
|
|
203
|
+
SEMANTIC_CACHE_ENABLED=true
|
|
204
|
+
```
|
|
223
205
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
206
|
+
### Enterprise Databricks Setup
|
|
207
|
+
```bash
|
|
208
|
+
# .env
|
|
209
|
+
MODEL_PROVIDER=databricks
|
|
210
|
+
DATABRICKS_API_BASE=https://your-workspace.cloud.databricks.com
|
|
211
|
+
DATABRICKS_API_KEY=your-token
|
|
212
|
+
FALLBACK_ENABLED=false
|
|
213
|
+
|
|
214
|
+
POLICY_MAX_STEPS=50
|
|
215
|
+
POLICY_MAX_TOOL_CALLS=100
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
227
219
|
|
|
228
|
-
|
|
229
|
-
- **MCP Code Mode** — replaces 100+ MCP tool schemas with 4 meta-tools (~96% reduction, lazy tool discovery)
|
|
230
|
-
- **Smart tool selection** — only sends tools relevant to the current task (50-70% reduction)
|
|
231
|
-
- **Prompt caching** — SHA-256 keyed LRU cache (30-45% reduction on repeated prompts)
|
|
232
|
-
- **Memory deduplication** — eliminates repeated information across turns (20-30% reduction)
|
|
233
|
-
- **Tool response truncation** — intelligent truncation of long outputs (15-25% reduction)
|
|
234
|
-
- **Dynamic system prompts** — adapt complexity to request type (10-20% reduction)
|
|
235
|
-
- **Distill compression** — structural similarity, delta rendering, smart dedup of repetitive tool outputs (20-40% reduction)
|
|
236
|
-
- **Headroom sidecar** — optional ML-based compression: Smart Crusher, CCR, LLMLingua (47-92% reduction)
|
|
220
|
+
## Common Issues & Fixes
|
|
237
221
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
222
|
+
| Issue | Solution |
|
|
223
|
+
|-------|----------|
|
|
224
|
+
| **"Service temporarily overloaded"** | Ollama model too large for RAM. Use smaller model or increase `--max-old-space-size` |
|
|
225
|
+
| **"Route not found: HEAD /"** | Ignore - harmless health check from Claude Code |
|
|
226
|
+
| **"Hallucinated tool calls"** | Normal - Lynkr automatically filters invalid tools |
|
|
227
|
+
| **"Safe Command DSL blocked"** | Add `POLICY_SAFE_COMMANDS_ENABLED=false` to `.env` |
|
|
228
|
+
| **Slow first request (20+ sec)** | Ollama loading model into memory. Add `OLLAMA_KEEP_ALIVE=30m` in Ollama config |
|
|
229
|
+
| **No response after N turns** | Increase limits: `POLICY_MAX_STEPS=50` and `POLICY_MAX_TOOL_CALLS=100` |
|
|
245
230
|
|
|
246
|
-
|
|
247
|
-
Titans-inspired long-term memory with surprise-based filtering. The system remembers important context across sessions and forgets noise — reducing token waste from repeated context.
|
|
231
|
+
---
|
|
248
232
|
|
|
249
|
-
|
|
250
|
-
Cache responses for semantically similar prompts. Hit rate depends on your workflow, but repeat questions (common in coding) get instant responses.
|
|
233
|
+
## Advanced Features
|
|
251
234
|
|
|
235
|
+
### Token Optimization (60-80% savings)
|
|
252
236
|
```bash
|
|
237
|
+
# Enable all optimizations
|
|
238
|
+
PROMPT_CACHE_ENABLED=true
|
|
253
239
|
SEMANTIC_CACHE_ENABLED=true
|
|
254
|
-
|
|
240
|
+
TOOL_INJECTION_ENABLED=false
|
|
241
|
+
CODE_MODE_ENABLED=true
|
|
255
242
|
```
|
|
256
243
|
|
|
257
|
-
###
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
- Reduces tool catalog from ~17,500 tokens to ~700 tokens (**96% reduction**)
|
|
263
|
-
- Enables lazy tool discovery: model queries `mcp_list_tools`, then `mcp_tool_info`, then `mcp_execute`
|
|
264
|
-
- Best for: 50+ MCP tools, long conversations, context-constrained setups
|
|
265
|
-
- Trade-off: 3 sequential calls instead of 1 (adds ~2-3s latency)
|
|
244
|
+
### Memory System (Titans-inspired)
|
|
245
|
+
```bash
|
|
246
|
+
MEMORY_ENABLED=true
|
|
247
|
+
MEMORY_TTL=3600000 # 1 hour
|
|
248
|
+
```
|
|
266
249
|
|
|
250
|
+
### Load Shedding & Resilience
|
|
267
251
|
```bash
|
|
268
|
-
|
|
269
|
-
|
|
252
|
+
LOAD_SHEDDING_ENABLED=true
|
|
253
|
+
LOAD_SHEDDING_HEAP_THRESHOLD=0.85
|
|
270
254
|
```
|
|
271
255
|
|
|
272
|
-
|
|
256
|
+
### Admin Hot-Reload (no restart needed)
|
|
257
|
+
```bash
|
|
258
|
+
curl -X POST http://localhost:8081/v1/admin/reload
|
|
259
|
+
```
|
|
273
260
|
|
|
274
261
|
---
|
|
275
262
|
|
|
276
|
-
##
|
|
263
|
+
## Installation Methods
|
|
277
264
|
|
|
278
|
-
**
|
|
265
|
+
**NPM (recommended)**
|
|
266
|
+
```bash
|
|
267
|
+
npm install -g lynkr
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**One-line installer**
|
|
279
271
|
```bash
|
|
280
272
|
curl -fsSL https://raw.githubusercontent.com/Fast-Editor/Lynkr/main/install.sh | bash
|
|
281
273
|
```
|
|
282
274
|
|
|
283
|
-
**
|
|
275
|
+
**Homebrew**
|
|
284
276
|
```bash
|
|
285
|
-
|
|
277
|
+
brew tap vishalveerareddy123/lynkr
|
|
278
|
+
brew install lynkr
|
|
286
279
|
```
|
|
287
280
|
|
|
288
281
|
**Docker**
|
|
289
282
|
```bash
|
|
283
|
+
git clone https://github.com/Fast-Editor/Lynkr.git
|
|
284
|
+
cd Lynkr
|
|
290
285
|
docker-compose up -d
|
|
291
286
|
```
|
|
292
287
|
|
|
293
|
-
**
|
|
288
|
+
**From source**
|
|
294
289
|
```bash
|
|
295
290
|
git clone https://github.com/Fast-Editor/Lynkr.git
|
|
296
|
-
cd Lynkr
|
|
291
|
+
cd Lynkr
|
|
292
|
+
npm install
|
|
293
|
+
cp .env.example .env
|
|
297
294
|
npm start
|
|
298
295
|
```
|
|
299
296
|
|
|
300
|
-
**Homebrew**
|
|
301
|
-
```bash
|
|
302
|
-
brew tap vishalveerareddy123/lynkr
|
|
303
|
-
brew install lynkr
|
|
304
|
-
```
|
|
305
|
-
|
|
306
297
|
---
|
|
307
298
|
|
|
308
299
|
## Documentation
|
|
@@ -310,54 +301,59 @@ brew install lynkr
|
|
|
310
301
|
| Guide | Description |
|
|
311
302
|
|-------|-------------|
|
|
312
303
|
| [Installation](documentation/installation.md) | All installation methods |
|
|
313
|
-
| [Provider
|
|
314
|
-
| [Claude Code
|
|
315
|
-
| [
|
|
316
|
-
| [
|
|
317
|
-
| [
|
|
318
|
-
| [
|
|
319
|
-
| [Token Optimization](documentation/token-optimization.md) | 60-80% cost reduction strategies |
|
|
320
|
-
| [Memory System](documentation/memory-system.md) | Titans-inspired long-term memory |
|
|
321
|
-
| [Tools & Execution](documentation/tools.md) | Tool calling and execution modes |
|
|
322
|
-
| [Smart Routing](documentation/routing.md) | Complexity-based model routing |
|
|
323
|
-
| [Docker Deployment](documentation/docker.md) | docker-compose with GPU support |
|
|
324
|
-
| [Production Hardening](documentation/production.md) | Circuit breakers, metrics, load shedding |
|
|
325
|
-
| [API Reference](documentation/api.md) | All endpoints and formats |
|
|
304
|
+
| [Provider Setup](documentation/providers.md) | Configuration for all 12+ providers |
|
|
305
|
+
| [Claude Code](documentation/claude-code-cli.md) | Claude Code CLI integration |
|
|
306
|
+
| [Cursor IDE](documentation/cursor-integration.md) | Cursor setup + troubleshooting |
|
|
307
|
+
| [Codex CLI](documentation/codex-cli.md) | Codex configuration |
|
|
308
|
+
| [Tier Routing](documentation/routing.md) | Smart model routing by complexity |
|
|
309
|
+
| [Token Optimization](documentation/token-optimization.md) | 60-80% cost reduction |
|
|
326
310
|
| [Troubleshooting](documentation/troubleshooting.md) | Common issues and solutions |
|
|
327
|
-
| [
|
|
311
|
+
| [API Reference](documentation/api.md) | REST API endpoints |
|
|
312
|
+
| [Production](documentation/production.md) | Enterprise deployment |
|
|
328
313
|
|
|
329
314
|
---
|
|
330
315
|
|
|
331
|
-
##
|
|
316
|
+
## Cost Comparison
|
|
332
317
|
|
|
333
|
-
|
|
|
334
|
-
|
|
335
|
-
|
|
|
336
|
-
|
|
|
337
|
-
|
|
338
|
-
|
|
318
|
+
| Scenario | Direct Anthropic | Lynkr + Ollama | Lynkr + OpenRouter |
|
|
319
|
+
|----------|-----------------|----------------|-------------------|
|
|
320
|
+
| Daily coding (8h) | $10-30/day | **$0 (free)** | $2-8/day |
|
|
321
|
+
| Monthly (heavy use) | $300-900 | **$0** | $60-240 |
|
|
322
|
+
|
|
323
|
+
With tier routing + token optimization: **additional 60-80% savings** on cloud providers.
|
|
339
324
|
|
|
340
325
|
---
|
|
341
326
|
|
|
342
|
-
##
|
|
327
|
+
## Why Lynkr vs Alternatives
|
|
328
|
+
|
|
329
|
+
| Feature | Lynkr | LiteLLM | OpenRouter | PortKey |
|
|
330
|
+
|---------|-------|---------|-----------|---------|
|
|
331
|
+
| **Setup** | `npm install -g lynkr` | Python + Docker + Postgres | Account signup | Docker stack |
|
|
332
|
+
| **Claude Code native** | ✅ Drop-in | ⚠️ Requires config | ❌ | ⚠️ Partial |
|
|
333
|
+
| **Cursor native** | ✅ Drop-in | ⚠️ Partial | ❌ | ⚠️ Partial |
|
|
334
|
+
| **Local models** | Ollama, llama.cpp, LM Studio, MLX | Ollama only | ❌ | ❌ |
|
|
335
|
+
| **Tier routing** | Auto complexity-based | ❌ Manual | Cost-based only | ❌ Manual |
|
|
336
|
+
| **Token optimization** | 60-80% built-in | ❌ | ❌ | Cache only |
|
|
337
|
+
| **Self-hosted** | ✅ Node.js only | ✅ Python stack | ❌ SaaS | ✅ Docker |
|
|
338
|
+
| **Dependencies** | Node.js 20+ | Python, Prisma, PostgreSQL | None | Docker, Python |
|
|
343
339
|
|
|
344
|
-
|
|
340
|
+
**Lynkr's edge:** Purpose-built for AI coding tools. Zero-config for Claude Code, Cursor, and Codex. Installs in one command, runs anywhere Node.js runs.
|
|
345
341
|
|
|
346
342
|
---
|
|
347
343
|
|
|
348
|
-
##
|
|
344
|
+
## Community
|
|
349
345
|
|
|
350
|
-
|
|
346
|
+
- [GitHub Discussions](https://github.com/Fast-Editor/Lynkr/discussions) — Ask questions
|
|
347
|
+
- [Report Issues](https://github.com/Fast-Editor/Lynkr/issues) — Bug reports
|
|
348
|
+
- [NPM Package](https://www.npmjs.com/package/lynkr) — Official releases
|
|
349
|
+
- [DeepWiki](https://deepwiki.com/vishalveerareddy123/Lynkr) — AI-powered docs
|
|
351
350
|
|
|
352
351
|
---
|
|
353
352
|
|
|
354
|
-
##
|
|
353
|
+
## License
|
|
355
354
|
|
|
356
|
-
|
|
357
|
-
- [Report Issues](https://github.com/Fast-Editor/Lynkr/issues) — Bug reports and feature requests
|
|
358
|
-
- [NPM Package](https://www.npmjs.com/package/lynkr) — Official package
|
|
359
|
-
- [DeepWiki](https://deepwiki.com/vishalveerareddy123/Lynkr) — AI-powered docs search
|
|
355
|
+
Apache 2.0 — See [LICENSE](LICENSE).
|
|
360
356
|
|
|
361
357
|
---
|
|
362
358
|
|
|
363
|
-
**Built by [Vishal Veera Reddy](https://github.com/vishalveerareddy123)
|
|
359
|
+
**Built by [Vishal Veera Reddy](https://github.com/vishalveerareddy123) for developers who want control over their AI tools.**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lynkr",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "Self-hosted Claude Code & Cursor proxy with Databricks,AWS BedRock,Azure adapters, openrouter, Ollama,llamacpp,LM Studio, workspace tooling, and MCP integration.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|