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

@chargebee/cli

v1.4.2

Published

Chargebee CLI — Build with Chargebee from the terminal

Downloads

1,589

Readme

Chargebee CLI

Build and test your Chargebee integration from the terminal.

With the Chargebee CLI, you can:

  • Work with Chargebee API resources such as customers, subscriptions, invoices, items, and more.
  • Stream webhook events directly to your local application.
  • Generate runnable SDK code from API commands using --code-sample.

Installation

The Chargebee CLI is available for macOS, Linux, and Windows.

macOS / Linux

curl -fsSL https://raw.githubusercontent.com/chargebee/cli/main/install.sh | bash

On musl-based Linux distributions, install the libstdc++ and libgcc runtime libraries with your package manager first. On Alpine, run apk add --no-cache libstdc++ libgcc. The installer selects the musl build automatically; glibc-based distributions use the standard Linux build.

The installer can also add the Chargebee skill for detected coding agents. To choose agents manually, decline the prompt and run:

chargebee skills add --global --agent cursor

Repeat --agent for each agent.

Windows (PowerShell)

irm https://raw.githubusercontent.com/chargebee/cli/main/install.ps1 | iex

npm (requires Node.js 22+)

npm install -g @chargebee/cli

Verify the installation:

chargebee --version

Upgrade to the latest version:

chargebee update

Prebuilt binaries are available on the Releases page.

Configuration

Connect the CLI to your Chargebee site:

chargebee auth add

The CLI prompts for your site name and API key, verifies them, and saves the profile locally.

API keys are stored in macOS Keychain, Linux Secret Service, or Windows Credential Manager when available. Otherwise, they are saved in the local profile file. auth add reports the storage used.

You can also pass credentials directly:

chargebee auth add --site acme-test --api-key test_xxxxxxxxxxxx

Or use environment variables:

export CHARGEBEE_SITE=acme-test
export CHARGEBEE_API_KEY=test_xxxxxxxxxxxx

Create API keys from Settings → Configure Chargebee → API Keys in the Chargebee Dashboard.

Write operations are blocked on live sites. Use a test site when building or testing integrations.

Quick Example

Create a customer:

chargebee customer create \
  -d [email protected] \
  -d first_name=Ada \
  -d last_name=Lovelace \
  -d auto_collection=off

Pass request parameters as JSON on stdin with -:

echo '{"email":"[email protected]","first_name":"Ada","billing_address":{"city":"San Francisco"}}' \
  | chargebee customer create -

echo '{"id":{"is":"cbdemo_alex"}}' | chargebee customer list -
echo '{"status":{"in":["active","paused"]}}' | chargebee subscription list -

Retrieve the customer:

chargebee customer retrieve <customer-id>

API responses are JSON, so standard tools work as expected:

chargebee customer list | jq '.list[].customer.email'

JSON output

API commands print readable JSON by default. Use --json when you need compact output for scripts:

chargebee customer list --json | jq '.list[].customer.id'
chargebee auth status --json

In JSON mode, successful commands write JSON to stdout. Failures write a JSON error to stderr.

Commands

| Command | Description | |---|---| | auth | Add API-key credentials and manage saved profiles. | | whoami | Show the active site and configuration. | | resources | List available API resources. | | <resource> <operation> | Call a Chargebee API. | | docs | Browse API documentation from the terminal. | | listen | Forward webhook events to a local URL. | | skills | Install the Chargebee skill for supported AI coding agents. | | open | Open Chargebee Dashboard pages. | | feedback | Share feedback about the CLI. | | alias | Configure a shell alias for chargebee. | | update | Update the CLI. | | telemetry | Manage CLI telemetry. |

Explore commands with:

chargebee --help
chargebee <resource> --help
chargebee <resource> <operation> --help

For API parameters and operations:

chargebee docs <resource> <operation>

Generate SDK Code

Use --code-sample <language> to generate runnable SDK code instead of making the API request:

chargebee customer create \
  -d [email protected] \
  --code-sample python

Supported languages include curl, python, nodejs, go, java, php, ruby, and dotnet.

To see all supported languages:

chargebee customer create --code-sample list

Webhook Forwarding

Listen for webhook events and forward them to your local application:

chargebee listen --forward-to http://localhost:3000/webhooks

Use --json for machine-readable listener output:

chargebee listen --forward-to http://localhost:3000/webhooks --json

Press Ctrl+C to stop listening.

Use with AI Agents

Install Chargebee skills for your coding agent:

chargebee skills add --list
chargebee skills add --agent claude-code

Use --global for user-wide installation. See chargebee skills --help and chargebee skills add --help for options.

Uninstall

Remove the CLI using the same installation method you used.

npm

npm uninstall -g @chargebee/cli

macOS / Linux installer

rm "$(command -v chargebee)"

Windows

Remove-Item (Get-Command chargebee).Source

Remove CLI configuration and local state:

rm -rf ~/.chargebee/cli

Telemetry

The Chargebee CLI collects limited usage telemetry to improve the CLI. Opt out with:

chargebee telemetry disable

See TELEMETRY.md for details.

Documentation

Browse API documentation from the CLI:

chargebee docs

Feedback

Found a bug or have a feature request?

chargebee feedback "what happened"

Contributing

See CONTRIBUTING.md for details on contributing to the Chargebee CLI.

License

MIT