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

@topbilling/cli

v0.4.3

Published

Point Claude Code, Codex, OpenCode, Continue, Zed, Aider and other AI coding tools at Top Billing in one command.

Readme

@topbilling/cli

Point your AI coding tools at Top Billing — prepaid INR credits, one key, Anthropic- and OpenAI-compatible APIs — in one command.

npx @topbilling/cli

It signs you in through your browser (or takes an API key from app.topbilling.in/keys), checks the key, shows the models your key can use, lets you pick the tools to configure, and writes their config files. Every file it changes is backed up first, and npx @topbilling/cli remove undoes everything.

Prefer a short command? Install it once and use topbilling from then on:

npm install -g @topbilling/cli
topbilling claude

Claude Code only

npx @topbilling/cli claude

Writes the env block of ~/.claude/settings.json — base URL, your key as ANTHROPIC_AUTH_TOKEN, the default model and the opus / sonnet / haiku / fable aliases, the context window Top Billing publishes for those models, and the flags the gateway needs. If the Claude Code extension is installed in VS Code, Cursor or Windsurf, its claudeCode.environmentVariables setting is written too. Start a new claude session and check /status. If you are also logged in with a claude.ai account, Claude Code warns once; run /logout.

--project writes .claude/settings.local.json in the current folder instead, and adds it to .gitignore.

Supported tools

| Tool | What happens | |---|---| | Claude Code (terminal) | ~/.claude/settings.json → env | | Claude Code in VS Code / Cursor / Windsurf | editor user settings → claudeCode.environmentVariables | | Codex CLI | ~/.codex/config.toml → provider topbilling on the Responses API | | OpenCode | ~/.config/opencode/opencode.json → providers topbilling and topbilling-anthropic | | Continue | ~/.continue/config.yaml models; key in ~/.continue/.env | | Zed | settings.json → language_models.openai_compatible.topbilling (paste the key in Zed's Agent settings — Zed keeps keys in the OS keychain) | | Aider | ~/.aider.conf.yml | | Cursor, Cline, Roo Code, Kilo Code | keep settings in their own UI, so the CLI prints exactly what to paste where |

Not supported: Windsurf's own agent has no custom base URL (Cline, Roo or Kilo inside Windsurf work).

Commands

npx @topbilling/cli                 # interactive setup
npx @topbilling/cli login           # sign in with your browser — no key to copy
npx @topbilling/cli claude          # Claude Code only
npx @topbilling/cli usage           # balance, how long it lasts, spend per agent and per coding session
npx @topbilling/cli mcp install     # Claude Code can then tell you your balance and what a session cost
npx @topbilling/cli models          # models your key can use (--json for scripts)
npx @topbilling/cli env             # print env vars for your shell (--shell sh|powershell|fish|cmd)
npx @topbilling/cli status          # check the key and what each tool points at
npx @topbilling/cli remove          # undo (--forget also deletes the saved key)

Non-interactive (CI, dotfiles):

TOPBILLING_API_KEY=tb_live_… npx @topbilling/cli --tools claude-code,opencode --model <model-id> --yes

--dry-run shows the files it would write, with the key masked, and writes nothing.

Where your key goes

In the config file of each tool you choose (that is how those tools read keys), and in ~/.topbilling/config.json so later commands do not ask again. Files the CLI creates are readable only by you on macOS and Linux. It never prints the full key, and it only ever talks to Top Billing: api.topbilling.in for models and usage, app.topbilling.in for browser sign-in.

Requires Node.js 20.12 or newer.