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

@rainfaces/cli

v0.1.0

Published

AI-native CLI for Rainface

Readme

Rainface CLI (rainface)

AI-native command line interface for Rainface with two usage modes:

  • Chat mode (rainface chat) for natural-language workflows with tool calling.
  • Deterministic command mode for explicit operations (me, models, submit, etc.).

Quickstart

From repo root:

npm run cli:build
node sdk/cli/dist/bin.js help

To run locally as a command:

cd sdk/cli
npm run build
chmod +x dist/bin.js
./dist/bin.js help

Configuration

Precedence is:

  1. CLI flags
  2. Environment variables
  3. Config file (~/.config/rainface/config.json)

Run interactive setup:

node sdk/cli/dist/bin.js init

Environment variables:

  • RAINFACE_API_KEY
  • RAINFACE_MCP_BASE_URL
  • RAINFACE_AI_API_KEY
  • RAINFACE_AI_PROVIDER (openai or gemini)
  • RAINFACE_AI_BASE_URL
  • RAINFACE_AI_MODEL

Gemini quick setup:

node sdk/cli/dist/bin.js init --ai-provider gemini

Or with env vars:

export RAINFACE_AI_PROVIDER=gemini
export RAINFACE_AI_API_KEY="<your_gemini_key>"

Commands

rainface init
rainface chat
rainface chat "show my stats"
rainface chat --prompt "show my stats"
echo "show my stats" | rainface chat
rainface tools list
rainface tools call rainface_public_stats
echo '{"history":true,"limit":5}' | rainface tools call rainface_price --args -
rainface me
rainface models
rainface predictions --limit 20 --offset 0
rainface round
rainface stats
rainface price
rainface price --history --limit 30
rainface submit --model-id <uuid> --proof-file proof.json
cat proof.json | rainface submit --model-id <uuid> --proof-file -
rainface submit --model-id <uuid> --proof-file proof.json --confirm
rainface doctor
rainface help submit

Chat Modes

  • Interactive REPL: rainface chat
  • One-shot positional prompt: rainface chat "show my stats"
  • One-shot prompt: rainface chat --prompt "show my stats"
  • One-shot piped stdin: echo "show my stats" | rainface chat

rainface chat ... (positional or --prompt) cannot be combined with piped stdin in the same invocation.

JSON Events (rainface chat --json)

Chat JSON output is newline-delimited event objects:

{"type":"chat.start","mode":"oneshot_prompt","tool_count":8}
{"type":"chat.tool_result","tool":"rainface_public_stats","status":"ok","result":{"ok":true,"tool":"rainface_public_stats","status":200,"data":{"total_models":10},"error":null,"meta":{"request_id":"req_1","timestamp":"2026-02-21T00:00:00.000Z","upstream":"public-api/stats"}}}
{"type":"chat.assistant","content":"Here are your current stats ..."}
{"type":"chat.end","mode":"oneshot_prompt","reason":"completed","assistant_messages":1,"tool_calls":1}

Deterministic commands (me, models, submit, etc.) keep their existing --json response shape.

Validation

  • Unknown flags are rejected with usage errors.
  • Value flags require explicit values (for example, --limit <n>).

Submit Safety

  • Submit commands are dry-run by default.
  • Real writes require explicit --confirm in command mode.
  • Chat mode asks for confirmation before real writes when stdin is interactive.
  • If a real write is confirmed and idempotency_key is missing, the CLI generates one.