StackMap
Subscribe
Explore / Lynkr
Fast-Editor

Lynkr

Self-hosted LLM gateway wrapping Claude Code, Cursor or Codex with zero code changes — strips unused tools, compresses JSON tool results ~88%, semantic-caches, tier-routes easy work to local models.

531 57 JavaScript Apache-2.0updated 5 days ago
Curator's take

Use it when your Claude Code/Cursor subscription limits or API bill hurt: `lynkr wrap claude` is a one-liner, and compression + routing SIMPLE-tier traffic to a free Ollama model genuinely stretches quotas. Also the escape hatch when corporate policy forces traffic through Databricks/Azure/Bedrock. NOT a model server — it only routes, so pair it with Ollama or another backend. Skip it for light usage: a proxy is one more moving part with a big config surface (tiers, budgets, cache), and semantic caching can serve stale hits on near-duplicate prompts. If you only want provider switching without the token tricks, plain LiteLLM is the boring default.

Mapped by ShipWithAI editors · links verified
README.md

Lynkr

An LLM Gateway which optimises your token usage.

87.6% fewer tokens on JSON tool results. 53% fewer tokens on tool-heavy requests. 171ms semantic cache hits. Zero code changes.

npm version Tests License: Apache 2.0 Node.js Ask DeepWiki

87.6%
JSON Compression
53%
Tool Token Reduction
171ms
Semantic Cache Hits
13+
LLM Providers
0
Code Changes Required

Numbers from a live benchmark against LiteLLM on identical workloads. See full report →


🚀 New: Wrap Mode for AI Coding Tools

Use Lynkr's routing with your AI coding assistant — maximize your subscription value:

npm install -g lynkr


# Claude Code Pro/Max
lynkr wrap claude

Wrapping gives you:

  • ✅ Tier routing (send simple tasks to free Ollama, complex to your subscription/API)
  • ✅ TOON/RTK compression (87% token reduction on tool outputs)
  • ✅ Semantic caching (171ms cache hits)
  • 3-5x more usage from the same subscription limits
  • ✅ Works with OAuth (Claude, Copilot, Cursor) or API keys (Aider, Codex)

Full wrap guide →


Quick Start (2 Minutes)

1. Install Lynkr

npm install -g lynkr

2. Configure Lynkr

The fastest path is the interactive wizard:

lynkr init

It asks four questions — usage mode (Claude Pro/Max via wrap, or direct API keys), tier picks for SIMPLE/MEDIUM/COMPLEX/REASONING across the 12 supported providers, credentials for what you chose, and a few routing-intelligence knobs — then writes a fully-populated .env with sensible production defaults for everything else (caching, compression, policy budgets, MCP sandbox, agents, rate limiting).

Useful flags:

lynkr init --force                # overwrite an existing .env

See docs/init.md for the full wizard reference.

If you'd rather configure by hand, the manual options below still work — copy .env.example to .env and edit it directly:

Option A: Free & Local (Ollama) - Recommended for Testing

# Install Ollama first: https://ollama.com
ollama pull qwen2.5-coder:latest

Then start Lynkr:

lynkr start

3. Connect Your Tool

Cursor IDE

  • Settings → Models → Override Base URL
  • Set to: http://localhost:8081/v1
  • API Key: any-value

Codex CLI

Edit ~/.codex/config.toml:

model_provider = "lynkr"

[model_providers.lynkr]
base_url = "http://localhost:8081/v1"
wire_api = "responses"

Done! Your AI tool now uses your chosen provider.


Common Startup Errors

Error: unable to determine transport target for "pino-pretty"

Problem: You're running an older version (< 9.3.0).

Solution: Update to the latest version:

npm install -g lynkr@latest

If you must use an older version, set NODE_ENV=production before starting.

Warning: Missing tier configuration: TIER_SIMPLE, TIER_MEDIUM...

This is just a warning - you can ignore it. Tier routing is optional.

To remove the warning, add to .env:

TIER_SIMPLE=ollama:qwen2.5-coder:latest
TIER_MEDIUM=ollama:qwen2.5-coder:latest
TIER_COMPLEX=ollama:qwen2.5-coder:latest
TIER_REASONING=ollama:qwen2.5-coder:latest

Warning: FALLBACK_PROVIDER='databricks' is enabled but missing credentials

Solution: Add to .env:

FALLBACK_EN

Continue your stack

What teams reach for next — and why each earns a place beside Lynkr. Ranked by curator confidence.