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

@urugus/redash-cli

v0.3.1

Published

A small command-line client for Redash.

Readme

redash-cli

A small command-line client for Redash.

This tool manages local Redash profiles, stores API keys in macOS Keychain, and runs ad-hoc SQL through the Redash API.

Requirements

  • Node.js 20 or newer
  • pnpm 10.33.0 or newer for local development
  • macOS Keychain access for storing Redash API keys
  • A Redash API key

Installation

Install the published npm package globally:

npm install --global @urugus/redash-cli
redash --help

Or install it globally with pnpm:

pnpm add --global @urugus/redash-cli
redash --help

For local development, install dependencies and build the CLI:

pnpm install
pnpm build

Run the built CLI directly:

node dist/index.js --help

Optionally link it as a global redash command:

pnpm link --global
redash --help

Configuration

Create or update a Redash profile:

redash config set --profile default --url https://redash.example.com

The command prompts for a Redash API key. Profile metadata is saved to:

~/.config/redash-cli/config.json

API keys are stored separately in macOS Keychain under the redash-cli service.

List configured profiles:

redash config list

Set the default profile:

redash config use default

Commands

Test authentication for the default profile:

redash auth test

Test authentication for a specific profile:

redash auth test --profile staging

List Redash data sources:

redash data-sources list

List Redash dashboards:

redash dashboards list

List Redash dashboards with explicit paging and sort order:

redash dashboards list --page 1 --page-size 20 --order=-created_at

Get a Redash dashboard by slug:

redash dashboards get sales-overview

Invite a Redash user:

redash users invite --name "Taro Yamada" --email [email protected]

Create a pending invitation without sending email:

redash users invite --name "Taro Yamada" --email [email protected] --no-send-email

Show Redash query queue and worker status:

redash admin queue-status

Admin commands require a super admin API key.

Run SQL and print JSON:

redash query run --data-source-id 1 --sql "select 1 as value"

Run SQL and print CSV:

redash query run --data-source-id 1 --sql "select 1 as value" --format csv

Use a non-default profile:

redash query run --profile staging --data-source-id 1 --sql "select current_date"

Preview a PostgreSQL query plan without running the query:

redash query explain --data-source-id 1 --sql "select * from invoices"

query explain currently supports PostgreSQL data sources only. It runs EXPLAIN (FORMAT JSON) without ANALYZE, accepts only single SELECT or WITH queries, and prints a JSON object containing a small summary plus the raw plan.

Development

pnpm test
pnpm lint
pnpm check
pnpm format

Build output is written to dist/.

Agent Plugins

This repository includes shareable plugins for Codex and Claude Code. Both plugins package the same redash-cli skills:

  • redash-cli-dev: repository development, tests, package metadata, and release preparation.
  • redash-cli-setup: first-time setup from source or from the published npm package.
  • redash-cli-usage: day-to-day use of the installed redash command.

The skills live under:

plugins/redash-cli/skills/

They are packaged as plugins instead of standalone project skills so other users can install only these redash-cli workflows from a marketplace.

Codex

Codex uses:

  • Plugin manifest: plugins/redash-cli/.codex-plugin/plugin.json
  • Marketplace manifest: .agents/plugins/marketplace.json

Install the marketplace and plugin:

codex plugin marketplace add urugus/redash-cli
codex plugin add redash-cli@redash-cli

Start a new Codex thread after installing so Codex can discover the plugin skills.

Claude Code

Claude Code uses:

  • Plugin manifest: plugins/redash-cli/.claude-plugin/plugin.json
  • Marketplace manifest: .claude-plugin/marketplace.json

Install the marketplace and plugin:

claude plugin marketplace add urugus/redash-cli
claude plugin install redash-cli@redash-cli

Plugin skills are namespaced in Claude Code:

/redash-cli:redash-cli-usage
/redash-cli:redash-cli-setup
/redash-cli:redash-cli-dev

For local Claude Code plugin development, load the plugin directly:

claude --plugin-dir ./plugins/redash-cli

Validate the Claude Code marketplace and plugin:

claude plugin validate .
claude plugin validate ./plugins/redash-cli --strict

Release

This package uses npm versions and Git tags as a pair:

package.json version 0.1.2 <=> Git tag v0.1.2 <=> npm package @urugus/[email protected]

Before creating a release, verify the package:

pnpm release:check

Pushing a vX.Y.Z tag runs the release workflow and publishes the package to npm automatically. Normal versions publish with the latest dist-tag, and prerelease versions publish with the beta dist-tag.

For a normal release:

pnpm release:patch
git push origin main --tags

Use release:minor for compatible feature releases and release:major for breaking CLI changes.

For a beta release:

pnpm release:beta
git push origin main --tags

The scoped package is configured for public npm publishing through publishConfig.access. The release workflow requires an NPM_TOKEN repository secret.

Notes

  • Supported output formats are json and csv.
  • User invitation requires an admin API key.
  • Dashboard listing uses Redash's /api/dashboards endpoint. When passing a descending order value, use --order=-created_at so the shell and CLI parser do not treat it as another flag.
  • Dashboard slugs can change when a dashboard is renamed in Redash.
  • Query execution uses Redash's /api/query_results endpoint and polls asynchronous jobs until completion.
  • Query explain uses PostgreSQL EXPLAIN (FORMAT JSON) and does not execute EXPLAIN ANALYZE.
  • Redash URLs must start with http:// or https://.