npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lmrouter/cli

v0.1.11

Published

An open-source, all-in-one AI API router

Readme

LMRouter

LMRouter is an open-source, all-in-one API router that gives AI developers a single, unified way to connect to the best model providers.

With LMRouter, you don’t need to create accounts on multiple platforms or juggle different API keys. A single API key unlocks access to any provider, any model, any service, all through one interface.

It’s an open-source alternative to OpenRouter, but goes far beyond language models. LMRouter supports multiple modalities and services out of the box:

  • Language: Chat Completions, Responses API, Anthropic Messages
  • Image: Image generation and editing
  • Audio: Speech-to-text and audio models
  • Video: Video generation (coming soon)
  • Embeddings: Semantic search and RAG
  • Search: Jina, Exa, and other web search APIs (coming soon)
  • Code: Execution with interpreters such as e2b (coming soon)

Quick Start

LMRouter is still under active development. When the full service is launched, it will be available at lmrouter.com.

For now, you can try out LMRouter by connecting Claude Code to the demo server. This allows Claude Code to run on any model available through OpenRouter, not just Claude itself.

The demo environment proxies requests to OpenRouter and supports both the OpenAI Chat Completions API and the Anthropic Messages API. It runs in BYOK (Bring Your Own Key) mode, which means you’ll need to supply your own OpenRouter API key.

Connect Claude Code to LMRouter

ANTHROPIC_BASE_URL=https://api.lmrouter.com/anthropic \
ANTHROPIC_AUTH_TOKEN=BYOK:<YOUR_OPENROUTER_API_KEY> \
ANTHROPIC_MODEL=<YOUR_MODEL_NAME> claude

Local Development/Deployment

To setup LMRouter locally, make sure you have Node.js and pnpm installed, then follow these steps:

git clone https://github.com/LMRouter/lmrouter
cd lmrouter
pnpm i
cp config/config.example.yaml config/config.yaml

Edit config/config.yaml to set up your own provider and model configurations.

# Run the server in development mode
pnpm dev

# Run the server in production mode
pnpm build
pnpm start

Alternatively, you can use pnpx to run the server:

pnpx @lmrouter/cli /path/to/config.yaml

Features

API Compatibility

LMRouter provides drop-in compatibility with existing APIs, so applications that already work with OpenAI or Anthropic can integrate without changes:

OpenAI API
  /openai/v1/chat/completions     — Chat Completions
  /openai/v1/images/generations   — Image generation
  /openai/v1/images/edits         — Image editing
  /openai/v1/embeddings           — Embeddings
  /openai/v1/responses            — Responses
  /openai/v1/audio/speech         — Audio speech
  /openai/v1/audio/transcriptions — Audio transcriptions
  /openai/v1/audio/translations   — Audio translations
  /openai/v1/models               — List available models

Anthropic API
  /anthropic/v1/messages          — Messages
  /anthropic/v1/models            — List available models

Multi-Provider Support

LMRouter connects to the broader AI ecosystem, with built-in support for:

  • OpenAI-compatible — OpenAI, Google, Perplexity, Fireworks, Groq, Cerebras, etc.
  • Anthropic-compatible — Anthropic, Amazon Bedrock, etc.
  • Fireworks — FLUX.1 [schnell] FP8, FLUX.1 Kontext Pro, FLUX.1 Kontext Max
  • Google — Imagen, Gemini image generation, etc.

Multi-Runtime Deployment

LMRouter is built on Hono and runs in multiple environments:

  • Node.js — Standard server deployment
  • Cloudflare Workers — Lightweight edge deployment at scale

Contributing

We believe LMRouter should be built by the community, for the community. Every contribution, whether it’s fixing a bug, adding a feature, improving documentation, or sharing feedback, helps make LMRouter stronger.

Roadmap

Checkout our Kanban for the latest roadmap.

How to Get Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Build your changes, code, docs, or tests
  4. Verify everything works as expected
  5. Submit a pull request and join the conversation

No contribution is too small, even a typo fix helps. And if you have big ideas, we’d love to hear them.

Tip: If you’re not sure where to start, check out the open issues labeled good first issue.

License

LMRouter is licensed under the MIT License. See the LICENSE file for details.