---
title: "Lynkr"
type: "tool"
slug: "fast-editor-lynkr"
canonical_url: "https://www.graphcanon.com/tools/fast-editor-lynkr"
github_url: "https://github.com/Fast-Editor/Lynkr"
homepage_url: "https://fast-editor.github.io/Lynkr/"
stars: 520
forks: 55
primary_language: "JavaScript"
license: "Apache-2.0"
categories: ["llm-frameworks", "developer-tools"]
tags: ["llm-proxy", "claudecode", "agents", "ai-gateway", "code-assistant"]
updated_at: "2026-07-07T18:49:49.05279+00:00"
---

# Lynkr

> Optimize LLM token usage with Lynkr, a CLI tool.

Lynkr is an HTTP proxy CLI that helps streamline workflows by optimizing language model interactions and reducing token usage.

## Facts

- Repository: https://github.com/Fast-Editor/Lynkr
- Homepage: https://fast-editor.github.io/Lynkr/
- Stars: 520 · Forks: 55 · Open issues: 2 · Watchers: 4
- Primary language: JavaScript
- License: Apache-2.0
- Last pushed: 2026-07-05T08:00:05+00:00

## Categories

- [LLM Frameworks](/categories/llm-frameworks.md)
- [Developer Tools](/categories/developer-tools.md)

## Tags

llm-proxy, claudecode, agents, ai-gateway, code-assistant

## Related tools

- [ECC](/tools/affaan-m-ecc.md) - The agent harness performance optimization system (★ 226,962)
- [AutoGPT](/tools/significant-gravitas-autogpt.md) - AutoGPT: Build, Deploy, and Run AI Agents (★ 185,417)
- [ollama](/tools/ollama-ollama.md) - Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models. (★ 175,659)
- [prompts.chat](/tools/f-prompts-chat.md) - The world's largest open-source prompt library for AI (★ 165,019)
- [transformers](/tools/huggingface-transformers.md) - 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models (★ 162,347)
- [JavaGuide](/tools/snailclimb-javaguide.md) - Snailclimb/JavaGuide: 面试 & 后端通用面试指南，覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发 (★ 156,863)
- [open-webui](/tools/open-webui-open-webui.md) - User-friendly AI Interface (Supports Ollama, OpenAI API, ...) (★ 144,575)
- [awesome-llm-apps](/tools/shubhamsaboo-awesome-llm-apps.md) - 100+ AI Agent & RAG apps you can actually run — clone, customize, ship. (★ 116,702)

## README (excerpt)

```text
# 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.**







<table>
<tr>
<td align="center"><strong>87.6%</strong><br/>JSON Compression</td>
<td align="center"><strong>53%</strong><br/>Tool Token Reduction</td>
<td align="center"><strong>171ms</strong><br/>Semantic Cache Hits</td>
<td align="center"><strong>13+</strong><br/>LLM Providers</td>
<td align="center"><strong>0</strong><br/>Code Changes Required</td>
</tr>
</table>

> Numbers from a live benchmark against LiteLLM on identical workloads. [See full report →](BENCHMARK_REPORT.md)

---

## 🚀 New: Wrap Mode for AI Coding Tools

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

```bash
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 →](docs/wrap-guide.md)

---

## Quick Start (2 Minutes)

### 1. Install Lynkr

```bash
npm install -g lynkr
```

### 2. Configure Lynkr

The fastest path is the interactive wizard:

```bash
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:

```bash
lynkr init --force                # overwrite an existing .env
```

See [`docs/init.md`](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**

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


Then start Lynkr:

```bash
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`:
```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:
```bash
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`:
```bash
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`:
```bash
FALLBACK_ENABLED=false
```

### Error: `connect ECONNREFUSED ::1:11434` (Ollama)

**Problem:** Ollama is not running.

**Solution:**
```bash
ollama serve
```

Keep this terminal open, and start Lynkr in a new terminal.

### Error: `Connection refused` or `404 Not Found`

**Problem:** Lynkr is not running or wrong port.

**Solution:** Check Lynkr is running on the correct port:
```bash
curl http://localhost:8081/
```

Should return: `{"service":"Lynkr","version":"9.x.x","
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/fast-editor-lynkr`](/api/graphcanon/tools/fast-editor-lynkr)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
