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

@opengrant/cli

v1.1.0

Published

OpenGrant CLI - Manage API monetization, USDC payments, and OSS funding from the terminal

Downloads

268

Readme

@opengrant/cli

The official CLI for OpenGrant — manage API monetization, USDC payments, and OSS funding directly from your terminal.

Installation

npm install -g @opengrant/cli
# or
pnpm add -g @opengrant/cli

Requirements: Node.js >= 18

Quick Start

# Log in to your OpenGrant account
opengrant login

# Check your USDC balance
opengrant balance

# View usage statistics
opengrant stats

Commands

Authentication

opengrant login              # Browser-based login (opens wallet popup)
opengrant login --headless   # Terminal-only login (private key)
opengrant logout             # Log out
opengrant whoami             # Show current wallet address

API Keys

opengrant keys create --name "my-app"   # Create a new API key
opengrant keys list                      # List all API keys
opengrant keys revoke <keyId>            # Revoke an API key

Wallet

opengrant balance            # Check USDC balance
opengrant fund 50            # Fund wallet with $50 via browser onramp
opengrant fund 50 --headless # Fund via direct USDC transfer

Usage & Stats

opengrant stats                          # View 30-day usage summary
opengrant stats --period 7d              # Last 7 days
opengrant stats --api <slug>             # Stats for a specific API

OSS Donations

# Donate 10 USDC to a GitHub repo
opengrant donate facebook/react 10

# Donate with auto-redistribution if unclaimed after 1 year
opengrant donate vercel/next.js 5 --redistribute

# Claim funds for repos you own
opengrant claim --github-token ghp_xxx

Publisher Commands

Register and manage your APIs on OpenGrant:

# Verify your GitHub identity
opengrant publish verify-github --token ghp_xxx

# Register a new API
opengrant publish create-api \
  --name "My AI API" \
  --slug "my-ai-api" \
  --url "https://api.example.com" \
  --description "AI-powered API" \
  --github-repo owner/repo

# Activate an API (make it public)
opengrant publish activate <slug>

Project Config

opengrant init                         # Initialize OpenGrant in current project
opengrant config list                  # Show all config values
opengrant config get apiKey            # Get a specific value
opengrant config set tipPercentage 5   # Donate 5% of payments to linked OSS

Project Config File

opengrant init creates .opengrantrc.json in your project root:

{
  "apiKey": "og_live_xxx",
  "baseUrl": "https://api.opengrant.dev",
  "chainId": 84532,
  "tipPercentage": 5
}

tipPercentage automatically donates a percentage of every paid API call to the linked open source project.

Environment Variables

| Variable | Description | |----------|-------------| | OPENGRANT_API_KEY | API key (overrides config file) | | OPENGRANT_PRIVATE_KEY | Wallet private key for signing | | OPENGRANT_API_URL | API base URL (default: https://api.opengrant.dev) | | GITHUB_TOKEN | GitHub PAT for repo verification and claiming |

License

MIT — see LICENSE