lynkr 9.3.2 → 9.3.3
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 +164 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,63 +27,201 @@
|
|
|
27
27
|
npm install -g lynkr
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
### 2. Configure
|
|
30
|
+
### 2. Configure for Ollama (Free & Local)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
**Step 2a: Install and start Ollama**
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Download from https://ollama.com and install, then:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
# Install Ollama first: https://ollama.com
|
|
38
37
|
ollama pull qwen2.5-coder:latest
|
|
38
|
+
ollama serve
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
**Step 2b: Set environment variables**
|
|
42
|
+
|
|
43
|
+
**Windows (Command Prompt):**
|
|
44
|
+
```cmd
|
|
45
|
+
set MODEL_PROVIDER=ollama
|
|
46
|
+
set FALLBACK_ENABLED=false
|
|
47
|
+
set OLLAMA_MODEL=qwen2.5-coder:latest
|
|
48
|
+
set OLLAMA_ENDPOINT=http://localhost:11434
|
|
49
|
+
set PORT=8081
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Windows (PowerShell):**
|
|
53
|
+
```powershell
|
|
54
|
+
$env:MODEL_PROVIDER="ollama"
|
|
55
|
+
$env:FALLBACK_ENABLED="false"
|
|
56
|
+
$env:OLLAMA_MODEL="qwen2.5-coder:latest"
|
|
57
|
+
$env:OLLAMA_ENDPOINT="http://localhost:11434"
|
|
58
|
+
$env:PORT="8081"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Linux/macOS:**
|
|
42
62
|
```bash
|
|
43
|
-
|
|
63
|
+
export MODEL_PROVIDER=ollama
|
|
64
|
+
export FALLBACK_ENABLED=false
|
|
65
|
+
export OLLAMA_MODEL=qwen2.5-coder:latest
|
|
66
|
+
export OLLAMA_ENDPOINT=http://localhost:11434
|
|
67
|
+
export PORT=8081
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Alternative: Use a .env file (recommended for permanent config)**
|
|
71
|
+
|
|
72
|
+
Create a file named `.env` in your home directory or project folder:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Required: Provider Configuration
|
|
44
76
|
MODEL_PROVIDER=ollama
|
|
45
77
|
FALLBACK_ENABLED=false
|
|
46
78
|
|
|
47
|
-
# Ollama
|
|
48
|
-
OLLAMA_ENDPOINT=http://localhost:11434
|
|
79
|
+
# Required: Ollama Settings
|
|
49
80
|
OLLAMA_MODEL=qwen2.5-coder:latest
|
|
81
|
+
OLLAMA_ENDPOINT=http://localhost:11434
|
|
50
82
|
|
|
51
|
-
# Server
|
|
83
|
+
# Required: Server
|
|
52
84
|
PORT=8081
|
|
85
|
+
HOST=0.0.0.0
|
|
86
|
+
```
|
|
53
87
|
|
|
54
|
-
|
|
55
|
-
POLICY_MAX_STEPS=50
|
|
56
|
-
POLICY_MAX_TOOL_CALLS=100
|
|
88
|
+
### 3. Start Lynkr
|
|
57
89
|
|
|
58
|
-
|
|
59
|
-
|
|
90
|
+
```bash
|
|
91
|
+
lynkr start
|
|
60
92
|
```
|
|
61
93
|
|
|
62
|
-
|
|
94
|
+
You should see:
|
|
95
|
+
```
|
|
96
|
+
[Ollama] Server ready, model "qwen2.5-coder:latest" available
|
|
97
|
+
Claude→Databricks proxy listening on http://localhost:8081
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 4. Connect Claude Code (or your AI tool)
|
|
101
|
+
|
|
102
|
+
**Windows (Command Prompt):**
|
|
103
|
+
```cmd
|
|
104
|
+
set ANTHROPIC_BASE_URL=http://localhost:8081
|
|
105
|
+
set ANTHROPIC_API_KEY=dummy
|
|
106
|
+
claude "write hello world in python"
|
|
107
|
+
```
|
|
63
108
|
|
|
109
|
+
**Linux/macOS:**
|
|
64
110
|
```bash
|
|
65
|
-
|
|
111
|
+
export ANTHROPIC_BASE_URL=http://localhost:8081
|
|
112
|
+
export ANTHROPIC_API_KEY=dummy
|
|
113
|
+
claude "write hello world in python"
|
|
66
114
|
```
|
|
67
115
|
|
|
68
|
-
|
|
116
|
+
✅ **Done!** Claude Code now uses your local Ollama model.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Alternative Setup: Cloud Provider (OpenRouter)
|
|
121
|
+
|
|
122
|
+
Get API key from https://openrouter.ai, then:
|
|
123
|
+
|
|
124
|
+
**Windows (Command Prompt):**
|
|
125
|
+
```cmd
|
|
126
|
+
set MODEL_PROVIDER=openrouter
|
|
127
|
+
set OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
128
|
+
set FALLBACK_ENABLED=false
|
|
129
|
+
set PORT=8081
|
|
130
|
+
lynkr start
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Linux/macOS:**
|
|
134
|
+
```bash
|
|
135
|
+
export MODEL_PROVIDER=openrouter
|
|
136
|
+
export OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
137
|
+
export FALLBACK_ENABLED=false
|
|
138
|
+
export PORT=8081
|
|
139
|
+
lynkr start
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Or use .env file:**
|
|
69
143
|
```bash
|
|
70
|
-
# Provider
|
|
71
144
|
MODEL_PROVIDER=openrouter
|
|
72
145
|
OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
73
146
|
FALLBACK_ENABLED=false
|
|
74
|
-
|
|
75
|
-
# Server
|
|
76
147
|
PORT=8081
|
|
148
|
+
```
|
|
77
149
|
|
|
78
|
-
|
|
79
|
-
POLICY_MAX_STEPS=50
|
|
80
|
-
POLICY_MAX_TOOL_CALLS=100
|
|
150
|
+
---
|
|
81
151
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
152
|
+
## Common Startup Errors (READ THIS IF IT DOESN'T WORK!)
|
|
153
|
+
|
|
154
|
+
### Error: `unable to determine transport target for "pino-pretty"`
|
|
155
|
+
|
|
156
|
+
**Problem:** This error happens on Windows or when NODE_ENV is not set.
|
|
157
|
+
|
|
158
|
+
**Solution:** Set NODE_ENV before starting:
|
|
159
|
+
|
|
160
|
+
**Windows (Command Prompt):**
|
|
161
|
+
```cmd
|
|
162
|
+
set NODE_ENV=production
|
|
163
|
+
lynkr start
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Windows (PowerShell):**
|
|
167
|
+
```powershell
|
|
168
|
+
$env:NODE_ENV="production"
|
|
169
|
+
lynkr start
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Linux/macOS:**
|
|
173
|
+
```bash
|
|
174
|
+
export NODE_ENV=production
|
|
175
|
+
lynkr start
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Or add to your `.env` file:
|
|
179
|
+
```bash
|
|
180
|
+
NODE_ENV=production
|
|
85
181
|
```
|
|
86
182
|
|
|
183
|
+
### Warning: `Missing tier configuration: TIER_SIMPLE, TIER_MEDIUM...`
|
|
184
|
+
|
|
185
|
+
**This is just a warning - you can ignore it.** Tier routing is optional for advanced use.
|
|
186
|
+
|
|
187
|
+
To remove the warning, add these to your environment or `.env`:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
TIER_SIMPLE=ollama:qwen2.5-coder:latest
|
|
191
|
+
TIER_MEDIUM=ollama:qwen2.5-coder:latest
|
|
192
|
+
TIER_COMPLEX=ollama:qwen2.5-coder:latest
|
|
193
|
+
TIER_REASONING=ollama:qwen2.5-coder:latest
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
(Use the same model for all tiers if you only have one model)
|
|
197
|
+
|
|
198
|
+
### Warning: `FALLBACK_PROVIDER='databricks' is enabled but missing credentials`
|
|
199
|
+
|
|
200
|
+
**Solution:** Disable fallback if you're only using one provider:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
set FALLBACK_ENABLED=false # Windows
|
|
204
|
+
export FALLBACK_ENABLED=false # Linux/macOS
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Or add to `.env`:
|
|
208
|
+
```bash
|
|
209
|
+
FALLBACK_ENABLED=false
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Error: `Ollama connection refused`
|
|
213
|
+
|
|
214
|
+
**Problem:** Ollama is not running.
|
|
215
|
+
|
|
216
|
+
**Solution:**
|
|
217
|
+
1. Check if Ollama is running: `ollama list`
|
|
218
|
+
2. Start Ollama: `ollama serve` (or restart the Ollama app)
|
|
219
|
+
3. Verify model is pulled: `ollama pull qwen2.5-coder:latest`
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Additional Provider Examples
|
|
224
|
+
|
|
87
225
|
**Option C: Enterprise (AWS Bedrock)**
|
|
88
226
|
|
|
89
227
|
Create/edit `.env`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lynkr",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.3",
|
|
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": {
|