lynkr 0.1.0 → 0.1.1

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.
@@ -0,0 +1,56 @@
1
+ name: Notify IndexNow on Docs Update
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'docs/**'
9
+
10
+ jobs:
11
+ notify-indexnow:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Notify IndexNow
19
+ run: |
20
+ echo "Notifying IndexNow about updated docs..."
21
+
22
+ # Host and key settings
23
+ HOST="vishalveerareddy123.github.io"
24
+ KEY="42642f749da6234f41b6b425c3bb07c9"
25
+ KEY_LOCATION="https://$HOST/Lynkr/42642f749da6234f41b6b425c3bb07c9.txt"
26
+
27
+ # URLs to notify – you can add more here as your site grows
28
+ URLS_JSON=$(cat <<EOF
29
+ {
30
+ "host": "$HOST",
31
+ "key": "$KEY",
32
+ "keyLocation": "$KEY_LOCATION",
33
+ "urlList": [
34
+ "https://$HOST/Lynkr/",
35
+ "https://$HOST/Lynkr/sitemap.xml"
36
+ ]
37
+ }
38
+ EOF
39
+ )
40
+
41
+ echo "Payload:"
42
+ echo "$URLS_JSON"
43
+
44
+ HTTP_CODE=$(curl -s -o /tmp/indexnow_response.txt -w "%{http_code}" \
45
+ -X POST "https://www.bing.com/indexnow" \
46
+ -H "Content-Type: application/json; charset=utf-8" \
47
+ -d "$URLS_JSON")
48
+
49
+ echo "IndexNow response HTTP code: $HTTP_CODE"
50
+ echo "IndexNow response body:"
51
+ cat /tmp/indexnow_response.txt
52
+
53
+ if [ "$HTTP_CODE" -ge 400 ]; then
54
+ echo "IndexNow request failed"
55
+ exit 1
56
+ fi
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
- # Lynkr
1
+ # Lynkr
2
2
 
3
- > Drop-in HTTP proxy that lets Claude Code CLI talk to non-Anthropic backends, manage local tools, and compose Model Context Protocol (MCP) servers with prompt caching, repo intelligence, and Git-aware automation.
3
+ [![npm version](https://img.shields.io/npm/v/lynkr.svg)](https://www.npmjs.com/package/lynkr)
4
+ [![Homebrew Tap](https://img.shields.io/badge/homebrew-lynkr-brightgreen.svg)](https://github.com/vishalveerareddy123/homebrew-lynkr)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/vishalveerareddy123/Lynkr)
7
+ [![Databricks Supported](https://img.shields.io/badge/Databricks-Supported-orange)](https://www.databricks.com/)
8
+ [![IndexNow Enabled](https://img.shields.io/badge/IndexNow-Enabled-success?style=flat-square)](https://www.indexnow.org/)
9
+
10
+
11
+ > It is a Cli tool which acts like a HTTP proxy that lets Claude Code CLI talk to non-Anthropic backends, manage local tools, and compose Model Context Protocol (MCP) servers with prompt caching, repo intelligence, and Git-aware automation.
4
12
 
5
13
  ## Table of Contents
6
14
 
@@ -45,6 +53,8 @@ The result is a self-hosted alternative that stays close to Anthropic’s ergono
45
53
 
46
54
  > **Compatibility note:** Claude models hosted on Databricks work out of the box. Set `MODEL_PROVIDER=azure-anthropic` (and related credentials) to target the Azure-hosted Anthropic `/anthropic/v1/messages` endpoint. Additional providers will require future adapters.
47
55
 
56
+ Further documentation and usage notes are available on [DeepWiki](https://deepwiki.com/vishalveerareddy123/Lynkr).
57
+
48
58
  ---
49
59
 
50
60
  ## Core Capabilities
@@ -156,6 +166,15 @@ The result is a self-hosted alternative that stays close to Anthropic’s ergono
156
166
  ### Installation
157
167
 
158
168
  ```bash
169
+ # from npm (recommended)
170
+ npm install -g lynkr
171
+ lynkr start
172
+
173
+ # via Homebrew tap
174
+ brew tap vishalveerareddy123/lynkr
175
+ brew install vishalveerareddy123/lynkr/lynkr
176
+
177
+ # or clone the repo
159
178
  git clone https://github.com/vishalveerareddy123/Lynkr.git
160
179
  cd Lynkr
161
180
  npm install
@@ -234,14 +253,15 @@ See `src/config/index.js` for the full configuration matrix, including sandbox m
234
253
  ### Launching the Proxy
235
254
 
236
255
  ```bash
237
- # Development: auto-restarts on file changes (requires nodemon)
238
- npm run dev
256
+ # global install
257
+ lynkr start
239
258
 
240
- # Production
241
- npm start
259
+ # local checkout
260
+ npm run dev # development: auto-restarts on file changes
261
+ npm start # production
242
262
  ```
243
263
 
244
- Logs stream to stdout. The server listens on `PORT` and exposes `/v1/messages` in the Anthropic-compatible shape.
264
+ Logs stream to stdout. The server listens on `PORT` and exposes `/v1/messages` in the Anthropic-compatible shape. If you installed via npm globally, `lynkr start` reads the same environment variables described above.
245
265
 
246
266
  ### Connecting Claude Code CLI
247
267
 
@@ -313,7 +333,7 @@ The compose file exposes:
313
333
  - Proxy HTTP API on `8080`
314
334
  - Optional SearxNG instance on `8888` (started automatically when `WEB_SEARCH_ENDPOINT` is the default)
315
335
 
316
- Workspace files are mounted into the container (`./:/workspace`), and `./data` is persisted for SQLite state.
336
+ Workspace files are mounted into the container (`./:/workspace`), and `./data` is persisted for SQLite state. If you launch the proxy outside of this compose setup you must provide your own search backend and point `WEB_SEARCH_ENDPOINT` at it (for example, a self-hosted SearxNG instance). Without a reachable search service the `web_search` and `web_fetch` tools will return placeholder responses or fail.
317
337
 
318
338
  #### Manual Docker build
319
339
 
@@ -328,6 +348,24 @@ docker run --rm -p 8080:8080 -p 8888:8888 \
328
348
 
329
349
  Adjust port and volume mappings to suit your environment. Ensure the container has access to the target workspace and required credentials.
330
350
 
351
+ #### Direct `docker run` with inline environment variables
352
+
353
+ ```bash
354
+ docker run --rm -p 8080:8080 \
355
+ -v "$(pwd)":/workspace \
356
+ -v "$(pwd)/data":/app/data \
357
+ -e MODEL_PROVIDER=databricks \
358
+ -e DATABRICKS_API_BASE=https://<workspace>.cloud.databricks.com \
359
+ -e DATABRICKS_ENDPOINT_PATH=/serving-endpoints/<endpoint-name>/invocations \
360
+ -e DATABRICKS_API_KEY=<personal-access-token> \
361
+ -e WORKSPACE_ROOT=/workspace \
362
+ -e PORT=8080 \
363
+ claude-code-proxy
364
+ ```
365
+
366
+ Use additional `-e` flags (or `--env-file`) to pass Azure Anthropic credentials or other configuration values as needed.
367
+ Replace `<workspace>` and `<endpoint-name>` with your Databricks workspace host and the Serving Endpoint you want to target (e.g. `/serving-endpoints/databricks-gpt-4o-mini/invocations`) so you can choose any available model.
368
+
331
369
  ### Provider-specific behaviour
332
370
 
333
371
  - **Databricks** – Mirrors Anthropic’s hosted behaviour. Automatic policy web fallbacks (`needsWebFallback`) can trigger an extra `web_fetch`, and the upstream service executes dynamic pages on your behalf.
@@ -415,3 +453,7 @@ A: In SQLite at `data/sessions.db` (configurable via `SESSION_DB_PATH`).
415
453
  ## License
416
454
 
417
455
  MIT License. See [LICENSE](LICENSE) for details.
456
+
457
+ ---
458
+
459
+ If you find Lynkr useful, please ⭐ the repo — it helps more people discover it.
@@ -0,0 +1 @@
1
+ 42642f749da6234f41b6b425c3bb07c9
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0"?>
2
+ <users>
3
+ <user>124252D20CDCDAB4459245ACF3CFE165</user>
4
+ </users>
@@ -0,0 +1 @@
1
+ google-site-verification: google5be250e608e6da39.html
package/docs/index.md ADDED
@@ -0,0 +1,362 @@
1
+
2
+ <link rel="stylesheet" href="style.css">
3
+
4
+
5
+ # Lynkr – Claude Code-Compatible Proxy for Databricks
6
+ #### Lynkr is an open-source Claude Code-compatible proxy that allows the Claude Code CLI to run directly on Databricks. It supports MCP servers, Git workflows, repo intelligence, workspace tools, and prompt caching for LLM-powered development.
7
+ <!--
8
+ SEO Keywords:
9
+ Databricks, Claude Code, Anthropic, Azure Anthropic,
10
+ LLM tools, LLM agents, Model Context Protocol, MCP,
11
+ developer tools, proxy, git automation, AI developer tools,
12
+ prompt caching, Node.js
13
+ -->
14
+
15
+
16
+ ---
17
+
18
+ # Lynkr
19
+ ### Claude Code-Compatible Proxy for Databricks & Azure Anthropic
20
+ **MCP • Git Tools • Repo Intelligence • Prompt Caching • Workspace Automation**
21
+
22
+ [⭐ Star on GitHub](https://github.com/vishalveerareddy123/Lynkr) ·
23
+ [📘 Documentation](https://deepwiki.com/vishalveerareddy123/Lynkr) ·
24
+ [🐙 Source Code](https://github.com/vishalveerareddy123/Lynkr)
25
+
26
+ ---
27
+
28
+ # 🚀 What is Lynkr?
29
+
30
+ **Lynkr** is an open-source **Claude Code-compatible backend proxy** that lets you run the **Claude Code CLI** and Claude-style tools **directly against Databricks** or **Azure-hosted Anthropic models** instead of the default Anthropic cloud.
31
+
32
+ It enables full repo-aware LLM workflows:
33
+
34
+ - code navigation
35
+ - diff review
36
+ - Git operations
37
+ - test execution
38
+ - workspace tools
39
+ - Model Context Protocol (MCP) servers
40
+ - repo indexing and project intelligence
41
+ - prompt caching
42
+ - conversational sessions
43
+
44
+ This makes Databricks a first-class environment for **AI-assisted software development**, **LLM agents**, **automated refactoring**, **debugging**, and **ML/ETL workflow exploration**.
45
+
46
+ ---
47
+
48
+ # 🌟 Key Features (SEO Summary)
49
+
50
+ ### ✔ Claude Code-compatible API (`/v1/messages`)
51
+ Emulates Anthropic’s backend so the **Claude Code CLI works without modification**.
52
+
53
+ ### ✔ Works with Databricks LLM Serving
54
+ Supports **Databricks-hosted Claude Sonnet / Haiku models**, or any LLM served from Databricks.
55
+
56
+ ### ✔ Supports Azure Anthropic models
57
+ Route Claude Code requests into Azure’s `/anthropic/v1/messages` endpoint.
58
+
59
+ ### ✔ Full Model Context Protocol (MCP) integration
60
+ Auto-discovers MCP manifests and exposes them as tools for smart workflows.
61
+
62
+ ### ✔ Repo Intelligence: `CLAUDE.md`, Symbol Index, Cross-file analysis
63
+ Lynkr builds a repo index using SQLite + Tree-sitter for rich context.
64
+
65
+ ### ✔ Git Tools and Workflow Automation
66
+ Commit, push, diff, stage, generate release notes, etc.
67
+
68
+ ### ✔ Prompt Caching (LRU + TTL)
69
+ Reuses identical prompts to reduce cost + latency.
70
+
71
+ ### ✔ Workspace Tools
72
+ Task tracker, file I/O, test runner, index rebuild, etc.
73
+
74
+ ### ✔ Fully extensible Node.js architecture
75
+ Add custom tools, policies, or backend adapters.
76
+
77
+ ---
78
+
79
+ # 📚 Table of Contents
80
+
81
+ - [What Lynkr Solves](#-what-lynkr-solves)
82
+ - [Architecture Overview](#-architecture-overview)
83
+ - [Installation](#-installation)
84
+ - [Configuring Providers (Databricks & Azure Anthropic)](#-configuring-providers)
85
+ - [Using Lynkr With Claude Code CLI](#-using-lynkr-with-claude-code-cli)
86
+ - [Repo Intelligence & Indexing](#-repo-intelligence--indexing)
87
+ - [Prompt Caching](#-prompt-caching)
88
+ - [MCP (Model Context Protocol) Integration](#-model-context-protocol-mcp)
89
+ - [Git Tools](#-git-tools)
90
+ - [API Examples](#-api-examples)
91
+ - [Roadmap](#-roadmap)
92
+ - [Links](#-links)
93
+
94
+ ---
95
+
96
+ # 🧩 What Lynkr Solves
97
+
98
+ ### **The Problem**
99
+ Claude Code is exceptionally useful—but it only communicates with Anthropic’s hosted backend.
100
+
101
+ This means:
102
+
103
+ ❌ You can’t point Claude Code at **Databricks LLMs**
104
+ ❌ You can’t run Claude workflows **locally**, offline, or in secure contexts
105
+ ❌ MCP tools must be managed manually
106
+ ❌ You don’t control caching, policies, logs, or backend behavior
107
+
108
+ ### **The Solution: Lynkr**
109
+ Lynkr is a **Claude Code-compatible backend** that sits between the CLI and your actual model provider.
110
+
111
+ ```
112
+
113
+ Claude Code CLI
114
+
115
+ Lynkr Proxy
116
+
117
+ Databricks / Azure Anthropic / MCP / Tools
118
+
119
+ ```
120
+
121
+ This enables:
122
+
123
+ - **Databricks-native LLM development**
124
+ - **Enterprise-private model usage**
125
+ - **LLM agents with Git + file system access**
126
+ - **Smart workflows via MCP**
127
+ - **Transparent caching + logging**
128
+
129
+ ---
130
+
131
+ # 🏗 Architecture Overview
132
+
133
+ ```
134
+
135
+ Claude Code CLI
136
+ ↓ (HTTP POST /v1/messages)
137
+ Lynkr Proxy (Node.js + Express)
138
+
139
+ ────────────────────────────────────────
140
+ │ Orchestrator (Agent Loop) │
141
+ │ ├─ Tool Execution Pipeline │
142
+ │ ├─ MCP Registry + Sandbox │
143
+ │ ├─ Prompt Cache (LRU + TTL) │
144
+ │ ├─ Session Store (SQLite) │
145
+ │ ├─ Repo Indexer (Tree-sitter) │
146
+ │ ├─ Policy Engine │
147
+ ────────────────────────────────────────
148
+
149
+ Databricks / Azure Anthropic / Other Providers
150
+
151
+ ````
152
+
153
+ Key directories:
154
+
155
+ - `src/api` → Claude-compatible API proxy
156
+ - `src/orchestrator` → LLM agent runtime loop
157
+ - `src/mcp` → Model Context Protocol tooling
158
+ - `src/tools` → Git, diff, test, tasks, fs tools
159
+ - `src/cache` → prompt caching backend
160
+ - `src/indexer` → repo intelligence
161
+
162
+ ---
163
+
164
+ # ⚙ Installation
165
+
166
+ ## Global install (recommended)
167
+ ```bash
168
+ npm install -g lynkr
169
+ lynkr start
170
+ ````
171
+
172
+ ## Homebrew
173
+
174
+ ```bash
175
+ brew tap vishalveerareddy123/lynkr
176
+ brew install vishalveerareddy123/lynkr/lynkr
177
+ ```
178
+
179
+ ## From source
180
+
181
+ ```bash
182
+ git clone https://github.com/vishalveerareddy123/Lynkr.git
183
+ cd Lynkr
184
+ npm install
185
+ npm start
186
+ ```
187
+
188
+ ---
189
+
190
+ # 🔧 Configuring Providers
191
+
192
+ ## Databricks Setup
193
+
194
+ ```env
195
+ MODEL_PROVIDER=databricks
196
+ DATABRICKS_API_BASE=https://<workspace>.cloud.databricks.com
197
+ DATABRICKS_API_KEY=<personal-access-token>
198
+ DATABRICKS_ENDPOINT_PATH=/serving-endpoints/databricks-claude-sonnet-4-5/invocations
199
+ WORKSPACE_ROOT=/path/to/your/repo
200
+ PORT=8080
201
+ ```
202
+
203
+ ## Azure Anthropic Setup
204
+
205
+ ```env
206
+ MODEL_PROVIDER=azure-anthropic
207
+ AZURE_ANTHROPIC_ENDPOINT=https://<resource>.services.ai.azure.com/anthropic/v1/messages
208
+ AZURE_ANTHROPIC_API_KEY=<api-key>
209
+ AZURE_ANTHROPIC_VERSION=2023-06-01
210
+ WORKSPACE_ROOT=/path/to/repo
211
+ PORT=8080
212
+ ```
213
+
214
+ ---
215
+
216
+ # 💬 Using Lynkr With Claude Code CLI
217
+
218
+ ```bash
219
+ export ANTHROPIC_BASE_URL=http://localhost:8080
220
+ export ANTHROPIC_API_KEY=dummy
221
+ ```
222
+
223
+ Then:
224
+
225
+ ```bash
226
+ claude chat
227
+ claude diff
228
+ claude review
229
+ claude apply
230
+ ```
231
+
232
+ Everything routes through your Databricks or Azure model.
233
+
234
+ ---
235
+
236
+ # 🧠 Repo Intelligence & Indexing
237
+
238
+ Lynkr uses Tree-sitter and SQLite to analyze your workspace:
239
+
240
+ * **Symbol definitions**
241
+ * **Cross-file references**
242
+ * **Language mix**
243
+ * **Framework hints**
244
+ * **Dependency patterns**
245
+ * **Testing metadata**
246
+
247
+ It generates a structured `CLAUDE.md` so the model always has context.
248
+
249
+ ---
250
+
251
+ # ⚡ Prompt Caching
252
+
253
+ Lynkr includes an LRU+TTL prompt cache.
254
+
255
+ ### Benefits:
256
+
257
+ * Reduced Databricks compute consumption
258
+ * Faster response times
259
+ * Deterministic repeated responses
260
+
261
+ Configure:
262
+
263
+ ```env
264
+ PROMPT_CACHE_ENABLED=true
265
+ PROMPT_CACHE_TTL_MS=300000
266
+ PROMPT_CACHE_MAX_ENTRIES=64
267
+ ```
268
+
269
+ ---
270
+
271
+ # 🧩 Model Context Protocol (MCP)
272
+
273
+ Lynkr automatically discovers MCP manifests from:
274
+
275
+ ```
276
+ ~/.claude/mcp
277
+ ```
278
+
279
+ or directories defined via:
280
+
281
+ ```
282
+ MCP_MANIFEST_DIRS
283
+ ```
284
+
285
+ MCP tools become available inside the Claude Code environment, including:
286
+
287
+ * GitHub integrations
288
+ * Jira automations
289
+ * custom internal tools
290
+ * filesystem operations
291
+ * build systems
292
+ * CI/CD triggers
293
+
294
+ Optional sandboxing uses Docker or OCI runtimes.
295
+
296
+ ---
297
+
298
+ # 🔧 Git Tools
299
+
300
+ Lynkr includes a full suite of Git operations:
301
+
302
+ * `workspace_git_status`
303
+ * `workspace_git_diff`
304
+ * `workspace_git_stage`
305
+ * `workspace_git_commit`
306
+ * `workspace_git_push`
307
+ * `workspace_git_pull`
308
+ * Release-note generation
309
+ * Diff summarization & analysis
310
+
311
+ Policies:
312
+
313
+ * `POLICY_GIT_ALLOW_PUSH`
314
+ * `POLICY_GIT_REQUIRE_TESTS`
315
+ * `POLICY_GIT_TEST_COMMAND`
316
+
317
+ Example:
318
+
319
+ > Disallow push unless tests pass?
320
+ > Set `POLICY_GIT_REQUIRE_TESTS=true`.
321
+
322
+ ---
323
+
324
+ # 🧪 API Example (Index Rebuild)
325
+
326
+ ```bash
327
+ curl http://localhost:8080/v1/messages \
328
+ -H 'Content-Type: application/json' \
329
+ -d '{
330
+ "model": "claude-proxy",
331
+ "messages": [{ "role": "user", "content": "Rebuild the index." }],
332
+ "tool_choice": {
333
+ "type": "function",
334
+ "function": { "name": "workspace_index_rebuild" }
335
+ }
336
+ }'
337
+ ```
338
+
339
+ ---
340
+
341
+ # 🛣 Roadmap
342
+
343
+ * LSP integration (TypeScript, Python, more languages)
344
+ * Per-file diff comments
345
+ * Risk scoring for Git diffs
346
+ * Expand MCP support
347
+ * Skill-like declarative automation layer
348
+ * Historical test dashboards
349
+ * Databricks-specific tools
350
+
351
+ ---
352
+
353
+ # 🔗 Links
354
+
355
+ * **GitHub**: [https://github.com/vishalveerareddy123/Lynkr](https://github.com/vishalveerareddy123/Lynkr)
356
+ * **Docs**: [https://deepwiki.com/vishalveerareddy123/Lynkr](https://deepwiki.com/vishalveerareddy123/Lynkr)
357
+ * **Issues**: [https://github.com/vishalveerareddy123/Lynkr/issues](https://github.com/vishalveerareddy123/Lynkr/issues)
358
+
359
+ If you use Databricks or Azure Anthropic and want rich Claude Code workflows, Lynkr gives you the control and extensibility you need.
360
+
361
+ Feel free to open issues, contribute tools, or integrate with MCP servers!
362
+
@@ -0,0 +1,4 @@
1
+ User-agent: *
2
+ Allow: /
3
+
4
+ Sitemap: https://vishalveerareddy123.github.io/Lynkr/sitemap.xml
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ <url>
4
+ <loc>https://vishalveerareddy123.github.io/Lynkr/</loc>
5
+ <changefreq>weekly</changefreq>
6
+ <priority>1.0</priority>
7
+ </url>
8
+ </urlset>
package/docs/style.css ADDED
@@ -0,0 +1,24 @@
1
+ /* E-ink-ish font */
2
+ @import url('https://fonts.googleapis.com/css2?family=Literata:wght@400;600;700&display=swap');
3
+
4
+ body {
5
+ font-family: "Literata", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
6
+ background-color: #fbf8f3;
7
+ color: #222;
8
+
9
+ /* 🔥 key part: make it flow instead of centered */
10
+ margin: 0;
11
+ padding: 1.5rem 2rem;
12
+ line-height: 1.65;
13
+ }
14
+
15
+ /* GitHub Pages often wraps content in .markdown-body – kill its max-width */
16
+ .markdown-body {
17
+ max-width: none !important;
18
+ }
19
+
20
+ /* Optional: make headings breathe a bit */
21
+ h1, h2, h3 {
22
+ font-weight: 600;
23
+ margin-top: 1.6em;
24
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lynkr",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Self-hosted Claude Code proxy with Databricks and Azure Anthropic adapters, workspace tooling, and MCP integration.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "homepage": "https://github.com/vishalveerareddy123/Lynkr#readme",
33
33
  "engines": {
34
- "node": ">=18.0.0"
34
+ "node": ">=20.0.0"
35
35
  },
36
36
  "dependencies": {
37
37
  "better-sqlite3": "^9.4.0",