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

pinelabs-cli

v0.1.1

Published

Pine Labs command-line interface — auto-generated from public/openapi.yaml on top of the Fern-generated TypeScript SDK (pinelabs-node).

Readme

pinelabs-cli

npm license

A flat, Stripe-CLI–style command-line interface for the Pine Labs Online Payment Gateway (Plural). Built on top of pinelabs-node.

The CLI ships 74 commands spanning Authentication, Orders, Payments, Refunds, Customers, Settlements, Subscriptions (Plans + Subscriptions + Presentations), Payouts, Checkout & Payment Links, Card Payments, BNPL, Apple Pay, Tokenization, Convenience Fee, Affordability Suite, Split Settlements, and more.

Install

npm install -g pinelabs-cli
# or
pnpm add -g pinelabs-cli

Requires Node.js ≥ 18.

pinelabs --help
pinelabs --version

Authenticate

The CLI uses OAuth2 client_credentials and refreshes the token automatically per invocation.

export PINELABS_CLIENT_ID=your_client_id
export PINELABS_CLIENT_SECRET=your_client_secret

Or pass per command:

pinelabs --client-id $ID --client-secret $SECRET get-order-by-id --order_id v1-...

Environments

| Flag | Default | Notes | | --------------------- | -------------------------------- | ------------------ | | (none) | https://pluraluat.v2.pinepg.in | UAT (default) | | --base-url <url> | — | Override per call |

For production, pass --base-url https://api.pluralpay.in or set it once via a shell alias.

Quickstart

# Create an order for ₹11.00
pinelabs create-order \
  --json merchant_order_reference=ord-1 \
  --json order_amount.value=1100 \
  --json order_amount.currency=INR \
  --json pre_auth=false \
  --json 'allowed_payment_methods[0]=CARD' \
  --json 'allowed_payment_methods[1]=UPI' \
  --json [email protected]

# Look it up
pinelabs get-order-by-merchant-reference --merchant_order_reference ord-1

# Capture
pinelabs capture-order --order_id v1-... \
  --json amount.value=1100 --json amount.currency=INR

# Refund
pinelabs create-refund --order_id v1-... \
  --json refund_amount.value=1100 --json refund_amount.currency=INR \
  --json merchant_refund_reference=rfd-1

Sending a request body

Use repeatable --json key=value with dot + bracket notation:

pinelabs create-payment-link \
  --json merchant_order_reference=link-1 \
  --json amount.value=50000 \
  --json amount.currency=INR \
  --json [email protected] \
  --json customer.mobile_number=9999999999 \
  --json 'notification_channels[0]=EMAIL' \
  --json 'notification_channels[1]=SMS' \
  --json expiry_in_minutes=60

true / false / null and bare numbers are auto-coerced. Quote-wrap to keep strings: --json order_amount.value='"1100"'.

You can also pass a complete JSON body or load it from a file:

pinelabs create-order --json '{"merchant_order_reference":"ord-2","order_amount":{"value":1100,"currency":"INR"}}'
pinelabs create-order --json @./order.json

Path & query parameters

Path params become required flags; query params optional flags:

pinelabs get-order-by-id --order_id v1-4405071524-aa-qlAtAf
pinelabs get-refund-order-details --order_id v1-...
pinelabs get-settlements-by-utr --utr 410092786849
pinelabs cancel-subscription --subscription_id sub_123

Output

| Flag | Effect | | --------- | --------------------------------------- | | (default) | Pretty-printed JSON to stdout | | --raw | Compact single-line JSON (per command) |

Pipe into jq for filtering:

pinelabs get-all-settlements --raw | jq '.data[].utr'

Global options

| Flag | Description | | ----------------------------- | ---------------------------------------------- | | --client-id <id> | Overrides PINELABS_CLIENT_ID | | --client-secret <secret> | Overrides PINELABS_CLIENT_SECRET | | --base-url <url> | Override base URL (default: UAT) | | -V, --version | Print version | | -h, --help | Print help (also per command) |

Discoverability

pinelabs --help                       # all 74 commands
pinelabs create-order --help          # flags for one command
pinelabs --help | grep -i refund      # find by keyword

Examples by domain

# Auth
pinelabs generate-token

# Settlements
pinelabs get-all-settlements
pinelabs get-settlements-by-utr --utr 410092786849

# Subscriptions
pinelabs create-plan \
  --json plan_name=Gold \
  --json amount.value=49900 \
  --json amount.currency=INR \
  --json frequency=MONTHLY
pinelabs pause-subscription --subscription_id sub_123
pinelabs resume-subscription --subscription_id sub_123

# Payouts
pinelabs get-payout-balance
pinelabs create-payout \
  --json amount.value=10000 \
  --json amount.currency=INR \
  --json beneficiary_id=ben_1

Troubleshooting

  • 401 Unauthorized — verify PINELABS_CLIENT_ID / PINELABS_CLIENT_SECRET and that you're hitting the correct --base-url.
  • Unknown option — run pinelabs <command> --help to see the exact flag spelling (params follow the OpenAPI casing, usually snake_case).
  • pinelabs: command not found — the -g global install bin directory may not be on PATH. Run npm bin -g and add it.
  • Inspect requests — set NODE_DEBUG=http to dump request/response.

License

MIT