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

@senecabot/sncb

v0.4.1

Published

CLI for the Seneca REST API (manage websites, pages, folders, and agent configuration).

Readme

sncb

sncb is the command-line interface for Seneca - the Headers platform for chatbots, knowledge bases, and help centers. Designed for humans on the terminal and for AI agents driving Seneca from scripts and CI.

Runs on Bun (>= 1.3).

Install

bun install -g @senecabot/sncb

After install, sncb is on your $PATH.

Authentication

You need a per-organization API token issued in the Seneca console.

# Recommended: interactive, non-echoing prompt (token never hits argv).
sncb auth login

sncb auth whoami
sncb auth logout

For automation (CI, scripts), pass the token via the SNCB_TOKEN environment variable rather than a flag:

SNCB_TOKEN=snc_live_xxx_yyyy sncb website list

Token is stored at ~/.config/sncb/config.json with mode 0600, inside a 0700 directory (XDG Base Directory spec, respects XDG_CONFIG_HOME).

Per-invocation overrides (highest priority first):

  • --token <token> flag - avoid: arguments are visible in process listings (ps) and shell history. Prefer the prompt or SNCB_TOKEN. sncb prints a warning when a token is supplied this way.
  • SNCB_TOKEN environment variable
  • Stored config

Same priority applies to --api-url / SNCB_API_URL. The token is only sent over https (plain http is allowed for loopback dev hosts only), and a token read from stored config is never sent to a host other than the one it was stored for unless you pass --insecure-allow-token-host.

Configuration

Read or modify the stored config from the CLI:

sncb config get                              # entire config, token masked
sncb config get apiUrl                       # one value
sncb config set apiUrl http://localhost:3002/ # update
sncb config set autoUpdate false
sncb config unset apiUrl                     # reset key to default
sncb config path                             # print config file path

Usage

sncb health
sncb website list
sncb website get <id>
sncb website create --name "Docs" --url https://docs.example.com
sncb website update <id> --name "New" --domain docs.example.com
sncb website delete <id>

sncb website design update <id> --scheme design-01 --primary "#283593"

sncb page list <website-id>
sncb page get <id>
sncb page create --website <id> --title "Hello" --slug hello -f page.html
sncb page create --website <id> --title "Inline" --slug inline -f -    # stdin
sncb page update <id> --title "New title" -f page.html
sncb page publish <id>
sncb page unpublish <id>
sncb page move <id> --parent <folder-id>
sncb page versions <id>
sncb page revert <id> <version-id>
sncb page delete <id>

sncb folder list <website-id>
sncb folder get <id>
sncb folder create --website <id> --title "Docs" --slug docs
sncb folder update <id> --title "Renamed"
sncb folder delete <id>

sncb agent list
sncb agent get <id>
sncb agent update <id> -f agent.json

Folders are pages with is_folder: true; folder is a convenience namespace.

Output formats

Default is a human-readable table. Switch via:

  • --json (alias for --output json)
  • -o yaml
  • -o table (default)

JSON output is the stable contract for scripting and AI agents. Tables are best-effort and may change formatting between releases.

Verbose mode

sncb -v website list

Logs every HTTP request and response to stderr (method, URL, status, duration). Useful for debugging integrations and grabbing request IDs for bug reports.

Exit codes

  • 0 success
  • 1 user/client error (4xx, validation, missing flags)
  • 2 server error (5xx)
  • 3 network error (DNS, timeout, connection refused)
  • 4 not authenticated (401 or no token)

Error format

The Seneca API returns structured errors that sncb surfaces verbatim plus an actionable hint when one applies:

API error (404 not_found): Page abc not found
  hint: resource not found, or it belongs to a different organization. Verify the id and your token's org.

In JSON mode (or via -v), the raw API error envelope is { error: { code, message, details? } }.

Auto-update

sncb checks npm once per 24 hours after any command (skipped for sncb upgrade itself). If a new version is available, you'll see a one-line notice on stderr. It never installs anything on its own - run sncb upgrade to update.

To disable the check:

sncb upgrade --no-auto-update

To force an update right now:

sncb upgrade            # installs latest if newer
sncb upgrade --check    # only report, no install

sncb upgrade invokes whichever package manager you used to install it (Bun, pnpm, or npm), detected from npm_config_user_agent.

Configuration file

~/.config/sncb/config.json:

{
  "apiUrl": "https://app.senecabot.com",
  "token": "snc_live_xxx_yyyy",
  "autoUpdate": true,
  "lastUpdateCheckAt": 0,
  "lastSeenLatestVersion": null
}

Edit safely - it's a plain JSON file. Token field is sensitive; the file is created with 0600 permissions.

Development

bun install
bun run dev -- --help     # run from source
bun test                  # run the test suite
bun test --coverage       # coverage report
bun run lint
bun run typecheck
bun run build             # produces dist/cli.js

License

MIT - see LICENSE.