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

@delexw/rollbar-cli

v1.0.0

Published

CLI tool wrapping the full Rollbar API v1 (93 endpoints). Tokens stored in OS keychain.

Readme

rollbar-cli

A TypeScript CLI tool wrapping the full Rollbar API v1 (93 endpoints across 24 categories). Designed for easy use by both humans and AI agents.

Prerequisites

Installation

bun install
bun run build

The built CLI will be at dist/rollbar.js. You can also run directly with:

bun run dev -- <command>

Setup

Configure a project access token before using API commands:

rollbar config set-token <project-name> <access-token>
rollbar config set-default <project-name>

# For account-level commands (teams, users, projects) — one global token
rollbar config set-account-token <account-token>

Tokens are stored securely in your OS keychain via @napi-rs/keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service). Only project names and the default project setting are stored in ~/.rollbar-cli/config.json — no tokens are written to disk.

You can also pass tokens inline:

rollbar --token <token> items list

Global Options

| Option | Description | |---|---| | --project <name> | Use a specific project's token | | --token <token> | Override with an explicit access token | | --account-token <token> | Override with an explicit account-level token | | --format <json\|table\|plain> | Output format (default: json) |

Commands

| Command | Description | Endpoints | |---|---|---| | rollbar config | Token and project configuration | - | | rollbar items | Error groups (items) | 6 | | rollbar occurrences | Individual error events | 4 | | rollbar metrics | Item, occurrence, and TTR metrics | 3 | | rollbar deploys | Deploy tracking | 4 | | rollbar environments | Environment listing | 1 | | rollbar sourcemaps | Source map / symbol file uploads | 4 | | rollbar rql | Rollbar Query Language jobs | 5 | | rollbar reports | Top active items and counts | 3 | | rollbar projects | Project management (account token) | 4 | | rollbar tokens | Project access token management | 6 | | rollbar teams | Team management (account token) | 4 | | rollbar users | User listing (account token) | 2 | | rollbar team-users | Team-user relationships | 9 | | rollbar team-projects | Team-project relationships | 5 | | rollbar user-projects | User-project listing | 1 | | rollbar people | People / GDPR data deletion | 2 | | rollbar notifications | Notification channels and rules | 28 | | rollbar replays | Session replay management | 2 | | rollbar service-links | Service link management | 5 | | rollbar versions | Version info and items | 2 | | rollbar agent | Output AI agent prompt | - |

Use rollbar <command> --help for subcommand details.

AI Agent Integration

The rollbar agent command outputs a structured prompt that describes all available commands, expected input/output formats, authentication setup, and common workflows:

rollbar agent          # Full prompt
rollbar agent --compact # Compact version

Examples

# Investigate active errors
rollbar items list --status active --level error
rollbar occurrences list-by-item <item-id>
rollbar occurrences get <occurrence-id>

# Resolve an item
rollbar items update <id> --data '{"status":"resolved"}'

# Track a deploy
rollbar deploys create --data '{"environment":"production","revision":"abc123"}'

# Run an RQL query
rollbar rql create --query "SELECT * FROM item_occurrence WHERE item.counter = 1"
rollbar rql results <job-id>

# Get project health
rollbar reports top-active --hours 24

# Manage notifications
rollbar notifications rules list slack
rollbar notifications rules create webhook --data '{"trigger":"new_item","config":{"url":"https://example.com/hook"}}'

Development

bun run dev -- --help    # Run in development mode
bun run build            # Build to dist/rollbar.js
bun run test             # Run tests
bun run lint             # Run oxlint
bun run format           # Format with oxfmt

Project Structure

src/
  index.ts           Entry point, CLI setup
  client.ts          HTTP client (fetch-based, auth handling)
  config.ts          Config management (OS keychain + ~/.rollbar-cli/config.json)
  output.ts          Output formatting (JSON, table, plain)
  agent.ts           AI agent prompt generator
  commands/          One file per API category (20 files)
tests/
  config.test.ts     Config module unit tests
  client.test.ts     HTTP client unit tests
  output.test.ts     Output formatting unit tests
  cli.test.ts        CLI integration tests
  agent.test.ts      Agent command tests