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

@stack0/cli

v0.1.1

Published

Stack0 CLI — manage your Stack0 resources from the terminal

Readme

Stack0 CLI

Manage your Stack0 resources from the terminal — send email, upload to the CDN, capture screenshots, extract structured data, run AI workflows, and more.

stack0 mail send --from [email protected] --to [email protected] \
  --subject "Hello" --text "Sent from the Stack0 CLI"

Installation

Requires Node.js 18+.

npm install -g @stack0/cli
# or
bun add -g @stack0/cli

Or run without installing:

npx @stack0/cli --help
# or
bunx @stack0/cli --help

The CLI is installed as the stack0 binary.

Authentication

Sign in with the interactive device flow (opens your browser):

stack0 auth login

Prefer an API key directly? Pass it inline, set it as an environment variable, or save it:

stack0 auth login --api-key sk_live_...     # save the key
stack0 config set apiKey sk_live_...         # same thing, persisted to config
export STACK0_API_KEY=sk_live_...            # per-shell

Inspect or clear your session:

stack0 auth whoami     # show the active identity (key is masked)
stack0 auth status     # auth + config summary, including config file path
stack0 auth logout     # clear all stored credentials

Credentials are stored locally via conf. Run stack0 auth status to see the exact config file path.

Configuration

The CLI resolves each value from, in order: command-line flag → environment variable → saved config.

| Config key | Flag | Environment variable | Description | | -------------------- | --------------------- | -------------------- | ------------------------------------ | | apiKey | --api-key <key> | STACK0_API_KEY | API key used for authentication | | defaultProject | -p, --project <id> | STACK0_PROJECT | Default project | | defaultEnvironment | -e, --env <env> | STACK0_ENV | sandbox or production | | baseUrl | --base-url <url> | STACK0_BASE_URL | Custom API base URL |

Manage saved defaults:

stack0 config set defaultProject my-project
stack0 config set defaultEnvironment production
stack0 config get                  # show all values
stack0 config get defaultProject   # show one value
stack0 config reset                # clear everything (asks to confirm)

Global options

These flags work on every command:

| Option | Description | | ------------------- | ------------------------------------------------- | | --api-key <key> | API key for authentication | | -p, --project <id>| Project ID | | -e, --env <env> | Environment (sandbox or production) | | --json | Output raw JSON instead of formatted tables | | --verbose | Verbose output | | --no-color | Disable colored output | | --base-url <url> | Override the API base URL |

Pass --json to any command for machine-readable output, ideal for scripting:

stack0 mail list --json | jq '.[].id'

Commands

Run stack0 <command> --help (or stack0 <command> <subcommand> --help) for full, up-to-date options on any command.

auth — Authentication

login · logout · whoami · status

config — CLI configuration

set · get · reset

mail — Email sending, templates, and campaigns

send · list · get · resend · cancel · analytics · domains · templates · contacts · audiences · campaigns · sequences · events

# Send a plain-text email
stack0 mail send --from [email protected] --to [email protected] \
  --subject "Welcome" --text "Thanks for signing up!"

# Send HTML from a file (prefix the path with @)
stack0 mail send --from [email protected] --to [email protected] \
  --subject "Welcome" --html @./welcome.html

# Send a template with variables
stack0 mail send --from [email protected] --to [email protected] \
  --subject "Your receipt" --template-id tmpl_123 \
  --vars '{"name":"Alex","amount":"$42.00"}'

cdn — Assets, folders, video, and private files

upload · list · get · update · delete · delete-many · move · transform · usage · folders · video · private · bundles · imports

stack0 cdn upload ./logo.png --folder brand --project my-project
stack0 cdn list --project my-project
stack0 cdn transform asset_123 --width 400 --format webp

screenshots — Capture and manage webpage screenshots

capture · list · get · delete · batch · schedules

# Capture and wait for the result
stack0 screenshots capture https://example.com --full-page --format webp

# Fire-and-forget: return a job ID immediately
stack0 screenshots capture https://example.com --no-wait

extraction — Extract structured data from webpages with AI

extract · list · get · delete · batch · usage · schedules

# Markdown extraction
stack0 extraction extract https://example.com/article --mode markdown

# Schema-driven structured extraction (inline JSON or @file.json)
stack0 extraction extract https://example.com/product \
  --mode schema --schema @./product-schema.json

workflows — AI workflows and execution

create · list · get · update · delete · run · runs

stack0 workflows list
stack0 workflows run wf_123
stack0 workflows runs list --project my-project

integrations — Third-party integrations

connectors · connections · stats · logs · crm · storage · communication · productivity

marketing — Trends, content, and campaigns

trends · opportunities · content · scripts · analytics · calendar · settings · usage

Programmatic use

The CLI is a thin wrapper over the @stack0/sdk. If you need Stack0 inside your own code, use the SDK directly:

import Stack0 from "@stack0/sdk";

const stack0 = new Stack0({ apiKey: process.env.STACK0_API_KEY });
await stack0.mail.send({ from, to, subject, text });

License

MIT