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

@stackbilt/bildy

v0.1.0

Published

Local-first LLM gateway for Claude Code, Codex, and future agent CLIs

Readme

@stackbilt/bildy

Local-first LLM routing gateway for Claude Code, Codex, and OpenAI-compatible clients.

See the root README for user setup and configuration.

Endpoints

| Method | Path | Auth | Description | |---|---|---|---| | GET | /health | none | Service status + provider availability | | GET | /health?live=1 | none | + live provider probe | | GET | /providers | key | Provider health snapshot | | GET | /providers?live=1 | key | Live provider health + circuit-breaker state | | GET | /metrics | key | Aggregate counts, latency, cost estimate | | GET | /events/recent | key | Last 100 request events | | GET | /shadow/stats | key | Shadow routing summary + projected savings + catalog snapshot | | POST | /routes/inspect | key | Route decision, model/provider selection, cache plan, capability report, degradations, warnings | | POST | /v1/messages | key | Anthropic Messages API (Claude Code) | | POST | /v1/responses | key | OpenAI Responses API (Codex) | | POST | /v1/chat/completions | key | OpenAI Chat Completions API | | POST | /v1/context/compact | key | Distill session transcript to structured facts |

Auth: x-api-key: <STACKBILT_GATEWAY_KEY> on all keyed endpoints.

Architecture

  • src/server.ts — Hono server, request classification, shadow-mode enforcement, routing
  • src/policy/classify.tsclassifyRequest() assigns a RouteClass from signal heuristics
  • src/policy/compatibility.tsselectCompatibleProvider() walks the route candidates, preferring providers rated safe for the client, then experimentally-rated providers if experimentalModels is enabled
  • src/policy/use-case.tsROUTE_TO_USE_CASE maps each RouteClass to a ModelRecommendationUseCase for catalog-driven model selection
  • src/providers/llm-providers.tsGatewayProviderClient wraps @stackbilt/llm-providers, applies cache hints, handles fallback tracking
  • src/cache/sqlite-cache.ts — JSON file-backed response cache; src/telemetry/sqlite-events.ts — JSONL event sink
  • src/config.ts — Config loading and merge (defaults → file → CLI flags)
  • src/types.ts — Shared types: RouteClass, LLMRequest, LLMResponse, GatewayConfig, etc.
  • src/adapters/ — Protocol adapters: Anthropic Messages, OpenAI Responses, OpenAI Chat

Providers

| Provider | Key env var | Route classes | |---|---|---| | anthropic | ANTHROPIC_API_KEY | tool_loop, long_context, fallback_safe | | openai | OPENAI_API_KEY | tool_loop, fallback_safe | | groq | GROQ_API_KEY | planning, code_draft, summary, long_context | | cerebras | CEREBRAS_API_KEY | planning, code_draft, summary | | nvidia | NVIDIA_API_KEY | planning, code_draft, long_context | | cloudflare | CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN | any |

Model selection is catalog-driven via rankModels(useCase, [provider]) and route inspection uses getGatewayRoutePlan() from @stackbilt/llm-providers — not hardcoded model names.

Shadow mode

When routing.shadowMode: true (default), the gateway forces all traffic to Anthropic regardless of classification, and records shadowRoute + projectedSavingsUsd on each event. Flip to false to route live.

Per-route override via routing.shadowRoutes: { summary: false }.

Config

Loads in order (later wins): defaults in src/config.tsgateway.config.json / stackbilt.gateway.json → CLI flags.

Development

npm run build          # tsc
npm test               # run test suite
npm run typecheck      # tsc --noEmit