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

aigateway-cli

v0.1.3

Published

Command-line tool for AIgateway — one API, every model. Installs the `aig` binary.

Downloads

524

Readme

aigateway-cli — aig

Official command-line tool for AIgateway — one API key, every model, every modality. Installs the aig binary.

npm i -g aigateway-cli     # or: npx aigateway-cli init
aig init                   # prompts for key, writes .env, scaffolds a starter file

Node 18+. Zero runtime dependencies. ESM-only.

Commands

aig init                          Sign in, save a key, drop it in .env, scaffold starter code
aig call <model> <prompt>         One-shot chat call (streams to stdout)
aig models [--modality <m>]       Print the live model catalog (--json for JSON output)
aig jobs video|music|3d …         Submit async generation jobs; get / cancel by id
aig mcp tools|call <name> [args]  Inspect the MCP server or invoke a tool from the shell
aig usage [--by tag|sub]          Month-to-date cost attribution
aig replay <request-id> <model>   Re-run a past request on a new model
aig eval run <dataset> <models>   Run an eval across candidate models
aig eval winner <eval-id>         Print winning model + metrics
aig sub-account create <name>     Mint a scoped key + spend cap
aig sub-account list
aig tail                          Tail live traffic (last 100 requests, then watch)

Examples

# First call after `aig init`
aig call moonshot/kimi-k2.6 "explain edge inference in 50 words"

# List the catalog
aig models --modality text
aig models --json > catalog.json

# Mint a per-customer key
aig sub-account create acme-corp --cap 50000 --rpm 300 --tag acme

# Run an eval
aig eval run prompts.jsonl anthropic/claude-opus-4.7,openai/gpt-5.4,moonshot/kimi-k2.6

# Tail live traffic, filter to errors
aig tail --filter status=error

# Inspect MCP without booting an agent
aig mcp tools
aig mcp call list_models

Configuration

Config lives at ~/.config/aigateway/config.json (mode 0600).

| Source | Wins | |---|---| | AIGATEWAY_API_KEY env var | highest | | ~/.config/aigateway/config.json | fallback |

# Override per call
AIGATEWAY_API_KEY=sk-aig-other aig models

# Override base URL (for self-hosted deploys)
AIGATEWAY_BASE_URL=https://aig.internal aig models

aig init is idempotent. Re-running it asks before overwriting. Pass --key sk-aig-... for non-interactive setup (CI):

AIGATEWAY_API_KEY=sk-aig-... aig init --no-scaffold

Related packages

  • Python SDKaigateway-py
  • Node SDKaigateway-js
  • MCP serverhttps://api.aigateway.sh/mcp · inspector at /mcp/inspect

Source, issues, examples

License

MIT © AIgateway