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

@mirage-cli/presscart-cli

v0.1.12

Published

Presscart CLI — drives the Presscart API (api.presscart.com). Mirage-compatible command shape.

Readme

@mirage-cli/presscart-cli

Presscart CLI — drives the api.presscart.com REST API.

bun add -g @mirage-cli/presscart-cli
presscart login --token pc_xxx_xxxxxxx_xxxxxxxx_xxxxxxxx
presscart campaigns list --format json
presscart outlets list --country US --limit 50
presscart outlets list --max-price 500 --all --format csv
presscart products listings --channel facebook
presscart products listings --max-price 500 --page 1 --limit 100

Auth

The Presscart API uses bearer tokens prefixed pc_. Get a token from your Presscart team settings; it shows only at creation time.

  • presscart login --token pc_... — verifies via GET /auth/token, saves to ~/.config/presscart/session.json (0600).
  • PRESSCART_API_TOKEN env var — overrides the saved session (CI/headless). PRESSCART_API_BASE_URL overrides the base URL.

See https://docs.presscart.com/getting-started/authentication.

Endpoints covered

| Group | Subcommands | | --- | --- | | auth | login, whoami, logout | | campaigns | list, get, create, update, articles, status-count, assign-items | | orders | list, get, items, checkout | | outlets | list, get, products, countries, states, cities, tags, disclaimers | | profiles | list, create, update, orders, order-items, campaigns | | products | get, listings, categories | | teams | list | | articles | get, upload-own-article, submit | | files | upload (multipart) | | attachments | create |

Every list/get supports --format ascii|json|csv|markdown and --output <file>.

Publishing a placement

The articles, files, attachments, and campaigns upload-content commands cover the team-scoped publishing flow (the endpoints live under /teams/:slug/...). Resolve :slug once via teams list (map it from the team_id that whoami shows). A typical run, given a chosen product, a Google Doc, and image files:

SLUG=$(presscart teams list --format json | jq -r '.[0].slug')
# 1. create the (unpaid) order
presscart orders checkout --file order.json --format json          # -> order.id
# 2. find the auto-created article id for the order's line item
presscart orders items --format json                               # -> article_id
# 3. attach the customer's Google Doc (share it "Anyone with the link -> Editor")
presscart articles upload-own-article "$SLUG" "$ARTICLE_ID" \
  --source google_doc --google-doc-url "$DOC_URL"
# 4. upload the images, then link them to the article
FILE_IDS=$(presscart files upload "$SLUG" --file a.png b.png c.png --format json | jq -r '[.files[].id]|join(",")')
presscart attachments create --file-ids "$FILE_IDS" \
  --resource-type article_photo --resource-id "$ARTICLE_ID"
# 5. (after the order is PAID and reviewed) submit
presscart articles submit "$SLUG" "$ARTICLE_ID" \
  --action pending-publishing --feedback "Ready to publish"

Payment is intentionally not automated: orders checkout returns an order in CREATED status (with a Stripe client_secret / checkout_link) unless it is covered by Team Credits. Pay and review in the app, then submit.

Marketplace budget filters

outlets list and products listings support --min-price <usd> and --max-price <usd>. These filters are client-side because Presscart does not expose server-side price filtering. unit_amount is whole USD, not Stripe cents, so 775 means $775.

outlets list also supports --all, which follows pagination through every page, capped at 100 pages for safety, adds a price_usd column, and writes a summary to stderr so --format json|csv stdout stays pipeable.

Programmatic use

import { buildProgram, ApiClient, loadSession } from "@mirage-cli/presscart-cli";

const program = buildProgram();
await program.parseAsync(["node", "presscart", "campaigns", "list", "--format", "json"]);

const session = loadSession();
if (session) {
  const client = new ApiClient(session);
  const campaigns = await client.request<{ data: unknown[] }>("/campaigns");
}

Drop-in for mirage: see @mirage-cli/presscart.