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

figura-cli

v0.9.0

Published

Command-line client for the Figura visualization SaaS

Readme

figura-cli

Command-line client for the Figura visualization SaaS. Talks to the Figura /api/v1 HTTP API with a Bearer fig_ token.

Install

# global (preferred)
bun add -g figura-cli
# or run ad-hoc
bunx figura-cli --help

# no bun? npm/npx still work:
npm i -g figura-cli
npx figura-cli --help

The binary is figura.

Update later with one command — it bumps the CLI (and the bundled figura mcp server) to the latest and reinstalls the skills to match:

figura update            # detects bun vs npm; add --dry-run to preview

Authentication

# browser login (default) — opens a short authorize page, no token to paste
figura login

# print the URL instead of opening a browser (still no paste)
figura login --no-browser

# or pass a token directly (CI / headless)
figura login --token fig_xxxxxxxxxxxx

figura login uses an OAuth-2.0 device flow: the CLI gets a device code from the engine, opens a clean authorize URL (no localhost port), and polls until you approve in the browser — nothing to copy-paste, and it works over SSH. The minted fig_ token is validated against GET /v1/whoami, then written to ~/.figura/config.json (mode 0600) with { apiUrl, token, team }.

Resolution precedence:

| Value | Order | | ------ | ------------------------------------------------------ | | token | FIGURA_TOKEN env → --token flag → project .figura/config.json → global ~/.figura/config.json | | apiUrl | FIGURA_API_URL env → --api-url flag → project config → global config → default https://figura.so |

Multiple teams — one per project

A project config (.figura/config.json, found by walking up from the current directory) overrides the global one, so each repo can use its own team — with its own brand and company brain:

cd ~/workspace/pano-fm && figura login --project   # pin this repo to Pano's team
cd ~/workspace/sha7n   && figura login --project   # pin this repo to sha7n's team

Now every figura/fig/brand command (and figura mcp — so Claude Code too) resolves the team from the nearest .figura/config.json. The file holds a live token, so add .figura/ to the repo's .gitignore.

Brand — set it from your repo, no UI

Figs render against your team's brand profile. Set it from the CLI instead of the figura.so UI:

# pipe a tokens block (colors+roles, type, spacing, voice) — exactly what /fig reads
cat tokens.txt | figura brand set --name "Acme" --description "a SaaS analytics dashboard" --tokens -
figura brand                       # verify (shows name / product / token size)

Omitted fields keep their saved value — a name-only brand set won't wipe your tokens. Best of all, let Claude Code build the whole profile from your codebase — see the figura-brand skill below ("introduce my repo to Figura").

Claude Code skills

Install the bundled skills so Claude Code can work with Figura from any project:

figura skill install            # → ~/.claude/skills (global)
figura skill install --project  # → ./.claude/skills (this repo only)

This installs both:

  • /fig — generate on-brand, device-framed HTML figs in your team (thin wrapper over the Figura MCP).
  • figura-brand — "introduce my repo to Figura": Claude scans the repo's design system (tokens, brand docs, app name) and sets your team's brand profile for you.

Re-run after upgrading figura-cli to update them — the skills are bundled with the CLI, so they stay in lockstep.

MCP server

The Figura MCP server ships inside the CLI — no separate install. Add it to Claude Code with:

claude mcp add figura -- figura mcp

figura mcp serves the same tools as the standalone figura-mcp package, but resolves your token from the nearest .figura/config.json (see Multiple teams above), so the MCP uses the right team per project automatically. (The bunx -y figura-mcp form still works if you'd rather not install the CLI.)

Usage

figura whoami                       # show the authenticated identity
figura teams                        # list accessible teams

# Create a fig from a file or stdin
figura fig create --file mock.html --title "Feed redesign" --area feed --tags ui,feed
cat mock.html | figura fig create --area profile --orientation landscape

# List + inspect
figura fig list --area feed --tag ui --limit 20
figura fig list --json
figura fig get <id>

# Open in the browser (downloads the raw HTML to a temp file)
figura fig open <id>
figura fig open <id> --print        # write HTML to stdout instead

# Comment
figura comment <id> --body "ship it"

# Token introspection
figura token current

Every command accepts --help. Add --json where noted to get machine-readable output.

Global options

  • --token <fig_...> — override the token for one invocation
  • --api-url <url> — override the API base
  • --help, -h — help
  • --version, -v — version

Development

bun install
bun run dev -- --help   # run from source with bun
bun run build           # bundle + minify src -> dist/index.js (single file)
node dist/index.js --help