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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sharedllm

v0.3.7

Published

SharedLLM CLI — route agentic coding tools (Claude Code, etc.) through the SharedLLM gateway

Downloads

1,351

Readme

sharedllm

Launch agentic coding tools (Claude Code today; Codex and Aider next) through the SharedLLM gateway with one command. Pick a model from an interactive list, let Auto route to the best available one, track every request, and map Anthropic-tier aliases (Opus / Sonnet / Haiku) to whichever upstream you've configured.

The CLI is a launcher, not a proxy. It loads your SharedLLM credentials, sets the right environment variables, and execs the target tool. The gateway handles auth, model resolution, billing, and forwarding.


Install

One-line installer (recommended):

macOS / Linux:

curl -fsSL https://sharedllm.com/install.sh | sh

Windows (PowerShell):

irm https://sharedllm.com/install.ps1 | iex

Both pick whichever JS package manager you already have (bunpnpmnpm; the Unix script also tries yarn and can bootstrap bun), install sharedllm globally, and put the install dir on your PATH — appending to ~/.bashrc / ~/.zshrc / fish config on Unix, or your User PATH on Windows.

Or pick a package manager directly:

bun  add -g sharedllm     # bun  (macOS / Linux / Windows)
pnpm add -g sharedllm     # pnpm (macOS / Linux / Windows)
npm  install -g sharedllm # npm  (Unix may need sudo for /usr/local)

On Windows, the npm/pnpm global launchers are rewritten to call node directly by the package's postinstall step, so sharedllm / sllm work from cmd.exe and PowerShell out of the box (Node.js ≥ 18 required).

The package installs both sharedllm (long) and sllm (short) on your PATH. Use whichever you prefer. Examples below use sllm.

Quickstart

sllm login                 # opens browser, creates a CLI key
sllm claude                # pick a model from the interactive list

Or name a model directly (skips the picker):

sllm claude --model kimi-2.6

Don't have a browser handy (SSH, CI, sandboxes)? Grab a key from your dashboard and paste it:

sllm login --no-browser --key sk-sharedllm-...

Choosing a model

Interactive picker

Run sllm claude with no --model in a terminal and you get a searchable, colour-coded list:

Select a model  ↑/↓ navigate · type to search · enter select · esc cancel
  search: kimi
❯ ollama     kimi-2.6        translated/chat
  3/41 models
  • ↑/↓ (or Ctrl-P/Ctrl-N) to move, Enter to select, Esc / Ctrl-C to cancel.
  • Type to filter by provider, model id, or type; Backspace edits, Ctrl-U clears the search.
  • Each row shows the provider and whether it runs native (green) or via translated (yellow) Anthropic↔OpenAI conversion. Your default is marked with a .

Set NO_COLOR=1 to disable colour; on non-interactive shells (pipes / CI) the CLI falls back to a plain numbered prompt.

Auto (smart routing)

auto resolves, per request, to the first model in a priority list that currently has an available key — your own contributed key first, then the shared pool:

sllm claude --model auto

The priority order comes from your list (set it in the dashboard under Playground → Auto, up to 10 models), falling back to the admin default order, and finally to the best available model. Pick Auto at the top of the interactive picker to do the same thing.

Make it your default so plain sllm claude always uses it:

sllm config set default_model auto

Commands

sllm login [--key <key>] [--endpoint <url>] [--no-browser]
sllm logout [--all] [--profile <name>]
sllm status [--profile <name>]

sllm <tool> [--model <id>] [--profile <name>] [--no-preflight] [--no-pick] [-- <tool args...>]
  tools: claude
  --model accepts any model id, or "auto"

sllm models [--provider <name>] [--type <type>] [--json]
sllm models resolve <model-id>

sllm usage [--days <n>] [--json]

sllm config show
sllm config set <key> <value>
sllm config path

sllm update [--pm <bun|pnpm|npm|yarn>] [--check] [--to <version>] [--force]

sllm version

Keeping the CLI up to date

sllm update          # upgrade the global install to the latest published version
sllm update --check  # just report whether a newer version exists

update detects the package manager that installed the CLI (bun / pnpm / npm / yarn) and runs its global-upgrade command; override detection with --pm. If the gateway enforces a minimum CLI version and yours is older, sllm claude (and other launches) will update in place automatically and re-run your command — no manual step. Set SHAREDLLM_NO_AUTO_UPDATE=1 (or run under CI) to disable the silent auto-update and just be told what to run instead.

Pass-through to the wrapped tool

Anything after a bare -- is forwarded verbatim to the child binary:

sllm claude --model kimi-2.6 -- --resume --dangerously-skip-permissions

Tier overrides for Claude

If you want Claude Code's built-in Opus/Sonnet/Haiku selectors to map to specific upstream models, set them once:

sllm config set tier_models.opus   claude-opus-4-20250918
sllm config set tier_models.sonnet claude-sonnet-4-20250514
sllm config set tier_models.haiku  claude-haiku-4-5-20251001

From then on, selecting Sonnet inside Claude Code routes through the model you mapped, no flags needed.

Profiles

Multiple SharedLLM accounts or endpoints (prod / staging / self-hosted)? Profiles are first-class:

sllm login --profile staging --endpoint https://api.staging.sharedllm.com
sllm config set active_profile staging
sllm claude                          # uses staging
sllm claude --profile default

Self-hosted gateway

sllm login \
  --endpoint http://localhost:3000 \
  --endpoint-dashboard http://localhost:3001

When the gateway runs on :3000, the CLI defaults the dashboard to :3001. Override either with the flags above, or via SHAREDLLM_ENDPOINT / SHAREDLLM_ENDPOINT_DASHBOARD env vars.

Configuration

Config is stored at:

  • macOS / Linux: ~/.config/sharedllm/config.json
  • Windows: %APPDATA%\sharedllm\config.json

Permissions are enforced to 0600 on POSIX (the file contains your API token). Run sllm config path to see the location, or sllm config show for a redacted dump.

Setting precedence: CLI flag → SHAREDLLM_* env var → active profile → built-in default.

Environment variables the CLI sets for claude

When sllm claude runs, it sets these for the child process:

| Variable | Value | |---|---| | ANTHROPIC_BASE_URL | <endpoint>/anthropic | | ANTHROPIC_AUTH_TOKEN | your SharedLLM key | | ANTHROPIC_API_KEY | "" (must be empty for AUTH_TOKEN to take effect) | | ANTHROPIC_MODEL | from --model or default_model (may be auto) | | ANTHROPIC_DEFAULT_OPUS_MODEL | from tier_models.opus (if set) | | ANTHROPIC_DEFAULT_SONNET_MODEL | from tier_models.sonnet (if set) | | ANTHROPIC_DEFAULT_HAIKU_MODEL | from tier_models.haiku (if set) |

If you already have ANTHROPIC_* vars in your shell, the CLI overrides them and prints a one-line warning so the source of changes stays obvious.

Troubleshooting

| Symptom | Fix | |---|---| | claude not found in PATH | npm install -g @anthropic-ai/claude-code | | Not authenticated. Run: sllm login | Run that. | | Stored key was rejected | The key was revoked from the dashboard. Run sllm login to issue a new one. | | Auto: no model … has an available key | Add a provider key (dashboard → Resource Pool), or adjust your Auto order. | | Browser doesn't open | The login URL is printed; open it manually. Or pass --no-browser and --key sk-sharedllm-.... | | Config has loose permissions | chmod 600 ~/.config/sharedllm/config.json |

License

MIT