Repolode
Fast-Editor

Fast-Editor/Lynkr

A self-hosted LLM gateway for AI coding tools like Claude Code and Cursor that routes requests across providers and compresses tool output to cut token usage.

Stars
636
Forks
73
Open issues
5
Last commit
yesterday

What is it?

Lynkr is a Node.js CLI and HTTP proxy that sits between AI coding tools and model providers. Tools such as Claude Code, Cursor, and Codex send requests to a local Lynkr endpoint, which forwards them to providers including Ollama, llama.cpp, LM Studio, OpenRouter, AWS Bedrock, Azure OpenAI, Databricks, and OpenAI. Switching providers requires only changing the base URL and API key, so the client needs no code changes.

The project's main focus is reducing token spend. It compresses large JSON tool results, strips unused tool definitions, serves semantically similar repeated prompts from a cache, and classifies each request by complexity so simple tasks go to cheaper models while harder ones escalate. It also includes a local dashboard for spend, tier mix, and request logs, plus a status line for Claude Code.

Installation is available through npm, Homebrew, Docker, or a one-line script. Lynkr also provides a `lynkr init` wizard for generating a `.env` file, and supports MCP integration and streaming responses.

Key features

  • 01Proxies requests from Claude Code, Cursor, and Codex to 14+ LLM providers, including local models.
  • 02Compresses large JSON tool results and removes unused tool definitions to reduce tokens.
  • 03Routes requests to SIMPLE, MEDIUM, COMPLEX, or REASONING model tiers based on complexity.
  • 04Caches semantically similar prompts and returns cached responses without billing tokens.
  • 05Includes a local dashboard for spend, routing accuracy, and per-request logs.
  • 06Supports real-time streaming responses and MCP integration.

Use cases

  • Running AI coding assistants against free local models such as Ollama to avoid API costs.
  • Routing simple coding questions to cheap models while sending hard tasks to a premium model.
  • Using a company's Azure, Bedrock, or Databricks endpoints with existing coding tools.
  • Tracking token spend across coding sessions and providers.

Quick start

  1. 1

    Install Lynkr globally via npm

    npm install -g lynkr
  2. 2

    Run the interactive setup wizard to write your .env file

    lynkr init
  3. 3

    Install Ollama from ollama.com, then pull the recommended free model

    ollama pull qwen2.5-coder:latest
  4. 4

    Start Lynkr

    lynkr start

Things to know

  • Requires Node.js 20 or newer.
  • Many features need an external provider, API key, or a local model server like Ollama, and a local model needs substantial RAM.

Topics

FAQ

What is Lynkr?
A self-hosted LLM gateway for AI coding tools like Claude Code and Cursor that routes requests across providers and compresses tool output to cut token usage. Lynkr is a Node.js CLI and HTTP proxy that sits between AI coding tools and model providers. Tools such as Claude Code, Cursor, and Codex send requests to a local Lynkr endpoint, which forwards them to providers including Ollama, llama.cpp, LM Studio, OpenRouter, AWS Bedrock, Azure OpenAI, Databricks, and OpenAI. Switching providers requires only changing the base URL and API key, so the client needs no code changes.
Is Lynkr free to use? What license does it have?
Lynkr is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is Lynkr still maintained?
Actively maintained. The last commit to Lynkr was on Oct 21, 2026.
What can I use Lynkr for?
Running AI coding assistants against free local models such as Ollama to avoid API costs. Routing simple coding questions to cheap models while sending hard tasks to a premium model. Using a company's Azure, Bedrock, or Databricks endpoints with existing coding tools. Tracking token spend across coding sessions and providers.
How do I install Lynkr?
Install Lynkr globally via npm: npm install -g lynkr Run the interactive setup wizard to write your .env file: lynkr init Install Ollama from ollama.com, then pull the recommended free model: ollama pull qwen2.5-coder:latest Start Lynkr: lynkr start
Where can I get Lynkr?
The source code and installation instructions are on GitHub: https://github.com/Fast-Editor/Lynkr

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects