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

@pocketbk/cli

v2.0.1

Published

Pocketbook AI Gateway — universal LLM proxy for Claude Code, Cursor, Aider, OpenClaw and any CLI tool

Readme

@pocketbook/cli

Universal LLM proxy for Claude Code, Cursor, Aider, and any AI coding tool. Route all your team's AI calls through the Pocketbook gateway for cost governance, model optimization, and usage visibility — with no code changes required.

How it works

Pocketbook sits between your AI tools and the LLM providers. It intercepts every call, routes it to the best model for the task, enforces your org's budget rules, and logs everything to your dashboard.

Claude Code → Pocketbook proxy → Pocketbook gateway → gpt-4o-mini / claude-sonnet / etc.

Your tools don't know anything changed. You get full visibility and control.


Prerequisites

  • Node.js 18 or later
  • An invite from your organization's Pocketbook admin

Install

npm install -g @pocketbook/cli

Quick start (2 minutes)

1. Log in

pocketbook login

You'll receive a one-time code at your work email. Enter it when prompted.

2. Start the proxy

pocketbook start --detach

3. Route your tools

# bash / zsh
eval $(pocketbook env)

# PowerShell
pocketbook env --shell powershell | Invoke-Expression

That's it. All supported tools now route through your organization's gateway.


Supported tools

| Tool | Env vars set | |------|-------------| | Claude Code | ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY | | Cursor | OPENAI_API_BASE, OPENAI_API_KEY | | Aider | ANTHROPIC_BASE_URL, OPENAI_API_BASE | | Continue.dev | ANTHROPIC_BASE_URL, OPENAI_API_BASE | | OpenClaw | ANTHROPIC_BASE_URL | | LiteLLM | All of the above | | OpenAI CLI | OPENAI_API_BASE, OPENAI_BASE_URL |


Commands

pocketbook login               # Authenticate with your work email (OTP)
pocketbook logout              # Sign out
pocketbook whoami              # Show current user

pocketbook start               # Start proxy (foreground)
pocketbook start --detach      # Start proxy (background)
pocketbook start --port 3101   # Custom port
pocketbook stop                # Stop background proxy

pocketbook status              # Recent calls: model, provider, cost, latency
pocketbook status --watch      # Live view, refreshes every 2s

pocketbook env                 # Print export commands (all tools)
pocketbook env --tool claude-code        # Specific tool
pocketbook env --shell powershell        # PowerShell format
pocketbook env --unset                   # Remove env vars

pocketbook tools               # List supported tools
pocketbook config              # View config

Per-project cost tracking

Create a .pocketbook file in any project root:

{ "label": "my-project-name" }

Calls from that directory are attributed to that label in your org's dashboard.


Make env vars permanent

Add to your shell profile so tools are always routed:

# ~/.zshrc or ~/.bashrc
eval $(pocketbook env)
# PowerShell $PROFILE
pocketbook env --shell powershell | Invoke-Expression

Troubleshooting

"Not authenticated" error — Run pocketbook login and try again.

Claude Code showing a login prompt — Run eval $(pocketbook env) in the same terminal before launching Claude Code. If prompted, select option 2 (Anthropic Console account).

"Port already in use" — Run pocketbook start --port 3101, then re-run eval $(pocketbook env).

No account found — Ask your admin to invite you from the Pocketbook dashboard under Settings → Users.


Uninstall

pocketbook env --unset
pocketbook stop
npm uninstall -g @pocketbook/cli

About

Pocketbook AI Gateway gives engineering teams visibility and control over AI API spend. Learn more at pocketbk.com.