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

@nusagate-gateway/helper

v0.3.1

Published

Arahkan coding agent dan IDE ke NusaGate — Claude Code, Codex, OpenCode, Cline, OpenClaw, Hermes.

Readme

@nusagate-gateway/helper

Arahkan coding agent dan IDE ke NusaGate dengan satu perintah.

Kamu cukup memasukkan API key NusaGate. Helper memvalidasinya ke GET https://api.nusagate.rafiakem.tech/v1/models, lalu menulis file config yang benar untuk tiap agent.

Jalan di Windows, macOS, dan Linux (Node.js ≥ 18).

Install

# sekali jalan
npx @nusagate-gateway/helper
# atau global
npm install -g @nusagate-gateway/helper

Tersedia juga sebagai ng-helper.

Mulai cepat

nusagate-helper

Wizard interaktif (default):

  1. API key — input tersembunyi, divalidasi ke GET /v1/models (diulang bila gagal)
  2. Agent / IDE — checklist multi-pilih (spasi untuk memilih, enter untuk lanjut)
  3. Model — picker ketik-untuk-cari, lengkap dengan harga per 1M token
  4. Konfirmasi — ringkasan, lalu config ditulis

Non-interaktif:

nusagate-helper apply --key nsk_xxx --model gpt-5.6-terra --agents claude,opencode --yes

Perintah

| Perintah | Keterangan | |---|---| | nusagate-helper / setup | Wizard interaktif (default) | | apply | Terapkan tanpa prompt (--key + --model) | | status | Agent mana yang terpasang / sudah dikonfigurasi | | reset | Hapus setelan NusaGate saja | | validate --key … | Panggil /v1/models dan tampilkan daftar model | | list | Agent yang didukung |

Opsi

| Opsi | Arti | |---|---| | --key, -k | API key NusaGate (env NUSAGATE_API_KEY juga dibaca) | | --base-url | Default https://api.nusagate.rafiakem.tech/v1 | | --model, -m | Model utama | | --subagent-model | Model subagent / small-fast | | --models | Model tambahan (OpenCode, OpenClaw) | | --agents | installed (default), all, atau claude,codex,… | | --dry-run | Tidak menulis file | | --yes, -y | Lewati konfirmasi | | --json | Output JSON |

Agent yang didukung

| Id | Tool | Config yang ditulis | |---|---|---| | claude | Claude Code | ~/.claude/settings.json → env.ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN | | codex | OpenAI Codex CLI | ~/.codex/config.toml provider nusagate (wire_api = "chat") + auth.json | | opencode | OpenCode | ~/.config/opencode/opencode.json provider nusagate; key dibaca dari {env:NUSAGATE_API_KEY} | | cline | Cline | ~/.cline/data/globalState.json + secrets.json (OpenAI-compatible) | | openclaw | OpenClaw | ~/.openclaw/openclaw.json models.providers.nusagate | | hermes | Hermes Agent | ~/.hermes/config.yaml model.provider: custom + .env OPENAI_API_KEY | | omp | OMP / Oh My Pi (omp.sh) | ~/.omp/agent/models.yml provider nusagate + config.yml modelRoles | | pi | Pi Agent (pi.dev) | ~/.pi/agent/extensions/nusagate.ts + settings.json defaultModel |

Setelan yang sudah ada di-merge, bukan ditimpa. Salinan .nusagate-backup ditulis di sebelah tiap file yang diubah.

Dua catatan khusus endpoint NusaGate:

  • Claude Code memakai /v1/messages (Anthropic-compatible), dan menambahkan sendiri /v1/messages ke ANTHROPIC_BASE_URL — jadi yang ditulis adalah root tanpa /v1.
  • Codex memakai wire_api = "chat", bukan "responses": NusaGate hanya menyediakan /v1/chat/completions.
  • OMP dan Pi butuh metadata model (panjang konteks, biaya per 1M token). Helper mengisinya dari GET /v1/models; harga rupiah dikonversi ke USD pada kurs Rp16.300/USD — sama seperti yang dipakai katalog NusaGate — hanya untuk tampilan di agent, karena tagihan sebenarnya dihitung di sisi gateway.
  • Pi mendaftarkan provider lewat extension, bukan file config statis, jadi helper menulis satu file TypeScript yang dimuat Pi saat start.

API programatik

import {
  validateApiKey,
  applyToAgents,
  statusAll,
  DEFAULT_BASE_URL,
} from "@nusagate-gateway/helper";

const result = await validateApiKey({ apiKey: process.env.NUSAGATE_API_KEY! });
if (!result.ok) throw new Error(result.error);

await applyToAgents("installed", {
  apiKey: process.env.NUSAGATE_API_KEY!,
  model: result.models[0]!.id,
  baseUrl: DEFAULT_BASE_URL,
});

console.log(await statusAll());

applyToAgents menerima "installed", "all", atau daftar id agent. Semua opsi menerima homeDir untuk mengarahkan penulisan ke direktori lain (dipakai di tes).

Endpoint

API publik NusaGate:

  • OpenAI-compatible: https://api.nusagate.rafiakem.tech/v1/chat/completions, /v1/models
  • Anthropic-compatible: https://api.nusagate.rafiakem.tech/v1/messages

Buat API key di nusagate.rafiakem.tech → Dashboard → API Keys.

Lisensi

MIT