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

@rulemetric/cli

v0.2.1

Published

The RuleMetric CLI. Manages instructions, sessions, evals, and (as of the user-management release) organizations.

Readme

@rulemetric/cli

The RuleMetric CLI. Manages instructions, sessions, evals, and (as of the user-management release) organizations.

Auth

rulemetric auth login            # interactive — writes ~/.config/rulemetric/env
rulemetric auth create-key       # generate a long-lived API key
rulemetric auth whoami           # print the current user

Credentials are read from (first match wins):

  1. RULEMETRIC_API_URL + RULEMETRIC_API_KEY (or RULEMETRIC_ACCESS_TOKEN)
  2. ~/.config/rulemetric/env
  3. ~/.config/rulemetric/auth.json (JSON fallback, requires jq)
  4. .env.local in the project root (development)

Org commands

The org commands let you list and switch the "active org" used by every subsequent CLI invocation. Sessions captured by hooks/proxy/MCP while an active org is set will stamp sessions.org_id to that org.

rulemetric org list              # list orgs you belong to; star marks the active one
rulemetric org current           # print the active org's slug, name, and role
rulemetric org switch <slug>     # set the active org (cached locally)
rulemetric org switch --clear    # clear the active org (back to personal mode)

Active-org resolution order:

  1. RULEMETRIC_ORG_ID environment variable (process-scoped override)
  2. Local cache at ~/.config/rulemetric/active-org.json (written by rulemetric org switch)
  3. None (sessions captured without an org_id)

A background prefetch refreshes the cache on a TTL so a slug change in the web UI is picked up by the next CLI run without an explicit org switch.

Creating an org: Currently web-only — visit /orgs/new in the dashboard. The CLI will adopt the org once you org switch <slug> (or set the active org in the web UI, which the CLI cache picks up).

Other top-level commands

  • rulemetric instructions ... — list, get, create, edit, push, pull
  • rulemetric convert ... — format conversion (25+ formats)
  • rulemetric import ... — bulk import from a project tree
  • rulemetric sessions ... — list/get/import sessions
  • rulemetric evals ... — eval target/case/run/optimize commands
  • rulemetric insights sync|generate — push local session-meta + facets up
  • rulemetric hooks install|uninstall|run <name> — manage tool hook scripts
  • rulemetric proxy ... — start/stop the mitmproxy capture layer
  • rulemetric service install|uninstall — launchd services for API + worker

Tests

pnpm --filter @rulemetric/cli test:unit   # unit tests (no creds needed)
pnpm --filter @rulemetric/cli test:e2e    # e2e (needs Supabase creds)

E2E tests start a real Hono API on port 3001 and create a temp Supabase user; see apps/cli/e2e/global-setup.ts.