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

@flexops/cli

v0.1.2

Published

Command-line companion for the FlexOps Gateway API. Issue sandbox keys, create labels, and track shipments without leaving the terminal.

Readme

@flexops/cli

Command-line companion for the FlexOps Gateway API. Issue a sandbox key, create a label, and track it — without leaving the terminal.

# 1. Get a free sandbox key (no signup, ~1 hour TTL, mock carriers)
npx @flexops/cli sandbox

# 2. Use the key to ship a sandbox label
npx @flexops/cli labels create --key test_… --from 78701 --to 97201 --weight-oz 8

# 3. Track it
npx @flexops/cli track 9400000000000000000000 --key test_…

The default flag values match the homepage demo (USPS Priority, Austin TX → Portland OR, 8 oz) so a no-flag invocation succeeds end-to-end against a fresh sandbox key.

Install

npm i -g @flexops/cli
# or invoke ad-hoc:
npx @flexops/cli <command>

Requires Node 18 or newer.

Authentication

The CLI talks to the Gateway with X-API-Key (not Authorization: Bearer — the Gateway rejects bearer-wrapped API keys with 401).

Three ways to supply a key, evaluated in this order:

  1. --key <key> on the command line.
  2. FLEXOPS_API_KEY environment variable.
  3. (sandbox command only) no key required — it issues one.
# session-scoped:
export FLEXOPS_API_KEY=test_yourkey
flexops labels create --from 78701 --to 97201 --weight-oz 8

Keys must start with test_ (sandbox, mock carriers) or live_ (production, real money). Other prefixes are rejected loudly before the request goes out, which catches the classic "pasted a JWT instead of an API key" mistake.

Commands

flexops sandbox

POSTs to /api/Sandbox/demo-keys (no auth) and prints a freshly minted test_ key plus its expiry. The endpoint is anonymous-IP-rate-limited; bursts get 429.

flexops labels create

Creates a shipment label via POST /api/v1/shipping/labels. Flags map to the LabelRequest DTO the Gateway expects:

| Flag | Maps to | Default | |---|---|---| | --carrier | carrierCode | USPS | | --service | serviceCode | PRIORITY | | --from, --from-name, --from-address, --from-city, --from-state, --from-country | origin.* | Austin TX 78701 | | --to, --to-name, --to-address, --to-city, --to-state, --to-country | destination.* | Portland OR 97201 | | --weight-oz, --length-in, --width-in, --height-in | package.* (units: oz / in) | 8 oz, 10×6×4 in |

flexops track <trackingNumber>

GETs /api/v1/shipping/track/{trackingNumber} and prints the latest status, location, carrier, ETA, plus the five most recent events.

Global flags

  • --gateway-url <url> — point the CLI at a non-production Gateway (e.g. local dev). Also reads FLEXOPS_GATEWAY_URL.
  • --json — emit the raw Gateway response as JSON for piping into jq, CI scripts, or another tool. All commands respect this flag.
  • -v, --version / --help — standard.

Examples

Ship-it-now smoke test from a fresh terminal:

KEY=$(npx @flexops/cli sandbox --json | jq -r .apiKey)
npx @flexops/cli labels create --key $KEY --json | jq -r .trackingNumber

Use against a local Aspire dev gateway:

FLEXOPS_GATEWAY_URL=https://localhost:7012 \
FLEXOPS_API_KEY=test_yourkey \
flexops labels create

Production cutover — same commands, swap the key prefix:

export FLEXOPS_API_KEY=live_…
flexops labels create --carrier USPS --service PRIORITY \
  --from 78701 --to 97201 --weight-oz 12

License

MIT © FlexOps, LLC