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

lemonsqueezy-cli

v0.1.4

Published

CLI for the LemonSqueezy API — built for AI coding agents and humans

Readme

lemonsqueezy-cli

CLI for the LemonSqueezy API — built for AI coding agents and humans.

Disclaimer: This project is not affiliated with, endorsed by, or sponsored by Lemon Squeezy Software, LLC.

Quick Start

npx lemonsqueezy-cli products list --json

Install

npm install -g lemonsqueezy-cli

Authentication

export LEMONSQUEEZY_API_KEY=your_api_key

Or pass it directly:

lemonsqueezy store list --api-key your_api_key

Optionally set a default store:

export LEMONSQUEEZY_STORE_ID=your_store_id

Usage

lemonsqueezy <resource> <action> [id] [flags]

Resources

| Resource | Actions | Description | |---|---|---| | auth | whoami | Authentication info | | store | get, list | Store management | | products | get, list | Product catalog | | variants | get, list | Product variants | | customers | get, list, create, update, archive | Customer management | | orders | get, list, invoice, refund | Order management | | subscriptions | get, list, update, cancel | Subscription management | | checkouts | get, list, create | Checkout links | | webhooks | get, list, create, update, delete | Webhook management | | discounts | get, list, create, delete, redemptions | Discount codes | | licenses | get, list, update, activate, deactivate, validate, instances | License keys | | usage | get, list, create | Usage-based billing |

Examples

# List products
lemonsqueezy products list --json

# Get subscription details
lemonsqueezy subscriptions get 12345 --json

# List active subscriptions
lemonsqueezy subscriptions list --status active --json

# Create a checkout
lemonsqueezy checkouts create --variant-id 12345 --email [email protected] --json

# Cancel subscription
lemonsqueezy subscriptions cancel 12345 --json

# Paginate orders
lemonsqueezy orders list --limit 25 --page 2 --json

# Create a discount
lemonsqueezy discounts create --name "Launch" --code LAUNCH20 --amount 20 --amount-type percent --json

# Validate a license
lemonsqueezy licenses validate --key "ABCD-1234-EFGH-5678" --json

# Create a webhook
lemonsqueezy webhooks create --url https://example.com/hook --events subscription_created,order_created --secret mysecret --json

Output Formats

Human (default)

 ID      Name             Status     Price        Created
 ─────── ──────────────── ────────── ──────────── ──────────────────
 12345   AppIntel Pro     published  $29.00/mo    2025-06-15

Showing page 1 of 1 (1 total)

JSON (--json)

{
  "data": [
    {
      "id": "12345",
      "type": "products",
      "name": "AppIntel Pro",
      "status": "published",
      "price": 2900,
      "price_formatted": "$29.00/mo"
    }
  ],
  "meta": { "page": { "currentPage": 1, "lastPage": 1, "total": 1 } }
}

Plain (--plain)

12345	AppIntel Pro	published	$29.00/mo	2025-06-15

Global Flags

| Flag | Description | Default | |---|---|---| | --json | Output as JSON | false | | --plain | Tab-separated output | false | | --api-key | LemonSqueezy API key | $LEMONSQUEEZY_API_KEY | | --store-id | Default store ID | $LEMONSQUEEZY_STORE_ID | | --limit | Page size | 10 | | --page | Page number | 1 | | --all | Fetch all pages | false | | --no-color | Disable color | false / $NO_COLOR | | --help | Show help | | | --version | Show version | |

Error Handling

Errors are written to stderr. Exit codes:

| Code | Meaning | |---|---| | 0 | Success | | 1 | API/runtime error | | 2 | Usage error (bad arguments) |

JSON error format (stderr):

{"error": "Authentication required.", "code": "AUTH_REQUIRED"}

AI Agent Integration

This CLI is designed for AI coding agents (Claude Code, Cursor, etc.).

  • Use --json for structured output
  • Errors go to stderr, data to stdout
  • Non-interactive — never prompts
  • Includes SKILL.md for Claude Code auto-discovery

Environment Variables

| Variable | Required | Description | |---|---|---| | LEMONSQUEEZY_API_KEY | Yes | Your LemonSqueezy API key | | LEMONSQUEEZY_STORE_ID | No | Default store ID | | NO_COLOR | No | Disable color when set |

Development

git clone https://github.com/Haknt/lemonsqueezy-cli.git
cd lemonsqueezy-cli
npm install
npm run dev    # watch mode
npm run build  # production build
npm test       # run tests

License

MIT