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.

545 59 JavaScript Apache-2.0updated 2 days ago
View on GitHubDispute this mapping →
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.

Alternative to See all + compare →
9router

Self-hosted gateway pointing any AI coding CLI (Claude Code, Codex, Cursor, Cline) at 40+ providers, with subscription→cheap→free auto-fallback and tool_result compression for 20-40% token savings.

Why it fitsBoth are self-hosted LLM gateways that wrap coding agents (Claude Code/Codex/Cursor/Cline) with zero code changes and cut tokens by compressing tool_result payloads, then route across backends. 9router optimizes for cost/uptime — 40+ providers, multi-account round-robin, subscription→cheap→free auto-fallback. lynkr optimizes for efficiency — strips unused tools, semantic-caches, and tier-routes easy work to local models. Pick by whether you need free-provider breadth or local-model routing.
CLIProxyAPI

Turns your coding-CLI subscriptions (Claude Code, Codex, Antigravity, Kimi, Grok) into a local OpenAI/Gemini/Claude-compatible API — multi-account rotation in one Go proxy.

Why it fitsBoth self-hosted proxies between coding subscriptions and clients: lynkr optimizes (compression, caching, tier-routing); CLIProxyAPI multiplexes accounts and re-exposes them as standard APIs.
freellmapi

OpenAI-compatible proxy that stacks free tiers of 18 LLM providers (~1.7B tokens/mo) behind one /v1 — smart routing, failover, per-key quota tracking; Claude Code and Codex shims included.

Why it fitsSame slot — a local proxy in front of Claude Code/Codex to cut LLM spend. lynkr's lever is compression, semantic caching and tier-routing of paid traffic; FreeLLMAPI's is routing everything to free-tier quota across providers.