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

aigetwey

v1.4.2

Published

Personal AI gateway — route, translate and track requests across Anthropic and OpenAI-compatible providers, with a built-in dashboard.

Readme


Point Claude Code, opencode, Cursor, Cline, or Codex at localhost:18080 and get:

  • Format translation — clients speak OpenAI or Anthropic; the gateway translates on the fly, streaming included
  • Fallback routing — one model alias resolves to a priority chain of providers; on 429/5xx/timeout it rotates keys and falls through
  • Token savers — RTK compresses tool_result, caveman trims prose, ponytail nudges minimal code, headroom compresses context — all toggleable per-endpoint
  • Access keys — hand a gateway key to anyone; set model allowlist, rate limit, spend cap, and expiry per key
  • Budgets — rolling spend caps (global/provider/model/key) with live countdown, SQLite cost tracking per token type
  • Dashboard — providers, combos, usage, budgets, CLI tools, live console, settings, drag-to-reorder
npm install -g aigetwey && aigetwey

First run bootstraps everything. Subsequent runs start instantly.

Language: English · Bahasa Indonesia

See CHANGELOG.md for release history.


Getting started

Quick start

npm install -g aigetwey
aigetwey

The CLI seeds config.yaml, builds the dashboard, opens your browser. One URL serves everything — dashboard, API, and admin: http://127.0.0.1:18080.

A terminal menu offers: Web UI / Terminal (logs) / Hide to Tray (macOS + Linux) / Exit. Flags: -p/--port, -n/--no-browser, -y/--yes, -t/--tray.

From source

git clone https://github.com/xk1ko/aigetwey.git
cd aigetwey && npm install
cp config.example.yaml config.yaml   # add providers + a server key
npm install --prefix dashboard
./run.sh                              # Ctrl-C stops both

Connect your tools

# Claude Code (Anthropic format)
export ANTHROPIC_BASE_URL=http://127.0.0.1:18080
export ANTHROPIC_API_KEY=my-key

# opencode / Cursor / Cline / Codex (OpenAI format)
export OPENAI_BASE_URL=http://127.0.0.1:18080/v1
export OPENAI_API_KEY=my-key

The dashboard's CLI Tools page detects installed tools and writes configs for you.

Model resolution (in order): combo alias → provider/model → bare model id (auto-detected from catalogs).


Configuration

config.yaml is the source of truth and hot-reloads — edits via dashboard or API apply instantly.

server:
  host: 127.0.0.1
  port: 18080
  api_keys: [my-key]        # empty = auth OFF (localhost only)

endpoint:
  rtk: true                 # compress tool_result blocks
  caveman: full             # off | lite | full | ultra
  ponytail: lite            # off | lite | full | ultra

providers:
  - id: anthropic
    format: anthropic
    base_url: https://api.anthropic.com/v1
    api_keys: [sk-ant-xxx]
  - id: opencode-free
    format: openai
    base_url: https://opencode.ai/zen/v1
    free: true
    auto_models: true

models:
  - alias: claude-sonnet-4-6
    target: [anthropic, opencode-free]   # fallback order
    model: [claude-sonnet-4-6, claude-sonnet-4-5]
    price_in: 3             # USD per 1M tokens
    price_out: 15

budgets:
  - scope: { type: global }
    unit: usd
    limit: 50
    window: 30day

A combo is a models entry — an alias routed to a provider chain. Strategies: fallback (default, sequential) or round-robin (spread load).


Token savers

| Saver | What it does | Source | Install | |-------|-------------|--------|---------| | RTK | Compresses bulky tool_result blocks (git/grep/ls) | rtk-ai/rtk | built-in | | Caveman | Terse system prompt — cuts output prose | JuliusBrussee/caveman | built-in | | Ponytail | Nudges minimal code (YAGNI, deletion) | DietrichGebert/ponytail | built-in | | Headroom | Pipes context through /v1/compress | chopratejas/headroom | external |

Headroom is the only external dependency — install from chopratejas/headroom (Python ≥ 3.10), run headroom proxy. Without it the toggle stays off; everything else works.


Environment variables

| Variable | Purpose | |----------|---------| | AIGETWEY_CONFIG | Config file path | | AIGETWEY_DATA_DIR | Usage DB directory | | AIGETWEY_ADMIN_PASSWORD | Admin + dashboard auth | | AIGETWEY_PORT | Listen port |

Dashboard (dashboard/.env.local): GATEWAY_URL, ADMIN_PASSWORD, SESSION_SECRET.

Admin password and provider keys never reach the browser — the dashboard proxies /admin/* server-side.


Development

npm run typecheck       # tsc, no emit
npm test                # vitest (unit + synthetic E2E)
npm run build           # compile to dist/

Memulai

Mulai cepat

npm install -g aigetwey
aigetwey

Run pertama bootstrap otomatis — buat config.yaml, build dashboard, buka browser. Satu URL untuk semuanya: http://127.0.0.1:18080.

Hubungkan tool

# Claude Code (format Anthropic)
export ANTHROPIC_BASE_URL=http://127.0.0.1:18080
export ANTHROPIC_API_KEY=my-key

# opencode / Cursor / Cline / Codex (format OpenAI)
export OPENAI_BASE_URL=http://127.0.0.1:18080/v1
export OPENAI_API_KEY=my-key

Halaman CLI Tools di dashboard mendeteksi tool dan menulis config otomatis.

Fitur utama

  • Satu endpoint, semua format — translate OpenAI ↔ Anthropic otomatis, termasuk streaming
  • Routing + fallback — alias model → rantai provider berprioritas; rotasi key saat 429/5xx/timeout
  • Penghemat token — RTK, Caveman, Ponytail (built-in) + Headroom (eksternal)
  • Access keys — bagi key ke teman dengan allowlist model, rate limit, batas spend, dan kedaluwarsa
  • Budget — spend cap rolling (5h/24h/7day/30day) dengan countdown dan tracking per jenis token
  • Dashboard — providers, combos, usage, budgets, CLI tools, console live, settings, drag-to-reorder

Penghemat token

RTK, Caveman, Ponytail = built-in. Hanya Headroom yang eksternal (Python, headroom proxy). Tanpa Headroom toggle-nya mati, sisanya tetap jalan.

Konfigurasi

config.yaml hot-reload — edit lewat dashboard/API langsung berlaku tanpa restart. Lihat config.example.yaml untuk semua bentuk provider.

Combo = entry models: alias → rantai provider. Strategy: fallback (default) atau round-robin.

Resolusi model: alias combo → provider/model → id model polos (deteksi otomatis).

Environment

Gateway: AIGETWEY_CONFIG, AIGETWEY_DATA_DIR, AIGETWEY_ADMIN_PASSWORD, AIGETWEY_PORT.

Dashboard: GATEWAY_URL, ADMIN_PASSWORD, SESSION_SECRET.

Password admin dan key provider tidak pernah sampai ke browser.


Acknowledgements

Inspired by 9router — its feature set and dashboard shaped much of this project's direction.

License

MIT © xk1ko

Contributing

Issues and ideas welcome: https://github.com/xk1ko/aigetwey/issues