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

@w3devx/stripe-cli

v0.0.1

Published

CLI tool for browsing Stripe data with local caching

Readme

xstripe

Read-only Stripe CLI for browsing account data with local caching, profile support, table/JSON/CSV output, and direct access to Stripe's Search API.

xstripe is built for developers who want a fast terminal workflow for inspecting Stripe resources without opening the dashboard for every lookup.

The npm package name is @w3devx/stripe-cli, and the installed executable is xstripe.

Features

  • Read-only Stripe data browser
  • Local response caching for faster repeat queries
  • Multiple profiles for test/live or multiple Stripe accounts
  • Table, JSON, and CSV output
  • Stripe Search API support for supported resources
  • Raw authenticated API requests for endpoints outside the built-in modules
  • Expand support for nested Stripe objects

Supported Resources

  • customers
  • charges
  • payment-intents
  • subscriptions
  • invoices
  • products
  • prices
  • payment-methods
  • balance
  • events
  • refunds
  • disputes
  • payouts

Short aliases are also available, for example cust, ch, pi, sub, inv, prod, pr, pm, bal, ev, ref, dis, and po.

Installation

xstripe is a Bun-based CLI published as @w3devx/stripe-cli. Users need bun installed and available on their PATH.

npm install -g @w3devx/stripe-cli

Verify the install after global installation:

xstripe --version

After installation, run the CLI as xstripe.

If you are using it from source instead of the npm registry:

bun install
bun run src/index.ts --help

Quick Start

  1. Get a Stripe secret key from https://dashboard.stripe.com/apikeys
  2. Run the setup wizard:
xstripe auth setup
  1. Browse data:
xstripe customers
xstripe charges
xstripe balance

Authentication

xstripe stores credentials per profile under ~/.xstripe/profiles/<name>/auth.json.

  • Accepted key prefixes: sk_test_, sk_live_, rk_test_, rk_live_
  • File permissions are set to 0600
  • Authentication is validated against GET /v1/balance during setup when possible

Useful commands:

xstripe auth setup
xstripe auth status
xstripe auth clear

Common Usage

List records:

xstripe customers
xstripe charges --limit 20
xstripe subscriptions --status active

Get a single record by ID:

xstripe cust cus_123
xstripe pi pi_123
xstripe invoices in_123

Filter by date:

xstripe charges --from 2026-01-01 --to 2026-03-31

Expand nested Stripe objects:

xstripe payment-intents pi_123 --expand customer --expand latest_charge

Choose output format:

xstripe customers --table
xstripe customers --json
xstripe customers --csv

Search API

For searchable Stripe resources, xstripe supports Stripe's Search API:

xstripe search customers --query "email:'[email protected]'"
xstripe search charges --query "amount>5000 AND status:'succeeded'"
xstripe search invoices --query "customer:'cus_123'" --limit 10

Searchable resources:

  • customers
  • charges
  • payment-intents
  • subscriptions
  • invoices
  • products
  • prices

Raw API Access

Use raw when you want to hit Stripe endpoints that do not have a dedicated module yet.

xstripe raw /customers
xstripe raw /customers --param limit=5
xstripe raw /charges/ch_123 --json
xstripe raw /balance

Supported methods today:

  • GET
  • POST

Profiles

Profiles let you separate credentials and preferences for different Stripe accounts or modes.

xstripe profile list
xstripe profile create live
xstripe profile use live
xstripe profile show
xstripe customers --profile default

Profile resolution order:

  1. --profile <name>
  2. XSTRIPE_PROFILE
  3. default profile from ~/.xstripe/config.json
  4. default

Configuration

Per-profile settings:

  • outputFormat: table, json, csv
  • cacheTtl: cache TTL in seconds

Examples:

xstripe config show
xstripe config set outputFormat json
xstripe config set cacheTtl 7200

Caching

API responses are cached under ~/.xstripe/cache/<profile>/<module>/.

Useful flags:

  • --refresh to bypass cache and refresh it
  • --no-cache to skip cache entirely

Cache commands:

xstripe cache stats
xstripe cache clear
xstripe cache clear customers
xstripe cache clear --all

Balance Commands

balance is a special command:

xstripe balance
xstripe balance transactions
xstripe balance transactions txn_123

Global Flags

Available on the CLI root:

  • -h, --help
  • -V, --version
  • -v, --verbose
  • -q, --quiet

Available on most data commands:

  • --json
  • --csv
  • --table
  • --refresh
  • --no-cache
  • --from <date>
  • --to <date>
  • --limit <n>
  • --expand <field>
  • --filter k=v
  • --profile <name>

Data Directory

xstripe stores all local state in:

~/.xstripe/
  config.json
  profiles/<name>/auth.json
  profiles/<name>/config.json
  cache/<name>/<module>/

Development

bun install
bun run src/index.ts --help
bun run dev
bun run build

Package scripts:

  • bun run start
  • bun run dev
  • bun run build
  • bun run link
  • bun run unlink
  • bun test

Notes

  • This CLI is intentionally read-only for built-in resource commands.
  • It uses Stripe's REST API directly at https://api.stripe.com/v1.
  • Search behavior depends on Stripe's Search API support for each resource.

License

MIT