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

@gonkagate/pi-setup

v0.4.0

Published

Configure Pi Coding Agent to use GonkaGate as an OpenAI-compatible custom provider.

Readme

@gonkagate/pi-setup

Configure Pi Coding Agent to use GonkaGate as an OpenAI-compatible custom provider with one npx command.

npx -y @gonkagate/pi-setup@latest

Package Node Pi%20Coding%20Agent License

Website Docs API%20Key Telegram X LinkedIn

@gonkagate/pi-setup is the onboarding CLI for developers who use Pi Coding Agent and want to route models through the GonkaGate API without hand-editing Pi's provider, auth, or default-model config.

What It Does

  • Writes a providers.gonkagate entry to ~/.pi/agent/models.json.
  • Preserves unrelated Pi providers and top-level config.
  • Reads your API key from GONKAGATE_API_KEY, --api-key-stdin, or a hidden prompt.
  • Fetches the current GonkaGate model list from /v1/models using that API key.
  • Shows an arrow-key model picker in interactive terminals.
  • Writes a Pi-compatible gonkagate API-key entry to ~/.pi/agent/auth.json.
  • Sets defaultProvider and defaultModel in ~/.pi/agent/settings.json.
  • Creates sibling backups before replacing existing managed files.
  • Installs the fetched GonkaGate model list for Pi Coding Agent.
  • Does not accept a plain --api-key flag and never prints gp-... keys.

Setup success means configured: GonkaGate config and Pi auth/default settings were written or already matched. It does not mean verified; default setup only calls /v1/models for model metadata and does not verify a live Pi chat session.

Quick Start

npx -y @gonkagate/pi-setup@latest
pi

For automation, avoid shell history by using stdin:

printf '%s' "$GONKAGATE_API_KEY" | npx -y @gonkagate/pi-setup@latest --yes --api-key-stdin

Preview the generated config without writing:

npx -y @gonkagate/pi-setup@latest --dry-run

Dry runs still need an API-key source because model choices come from /v1/models.

Use a custom config path during testing:

npx -y @gonkagate/pi-setup@latest --config ./models.json

Restore from a backup by copying the generated models.json.backup-* file back over ~/.pi/agent/models.json. Auth and settings backups use the same sibling pattern beside auth.json and settings.json.

Limits

The setup only makes the /v1/models metadata request. It does not mutate shell profiles, generate .env files, accept --api-key, support arbitrary custom base URLs, support arbitrary custom model ids outside /v1/models, claim concurrent-writer safety, or run default live GonkaGate/Pi verification.

Deferred features require the evidence gates in docs/specs/pi-setup-prd/spec.md before implementation.

Platform Proof

CI is configured for Ubuntu and native Windows. WSL remains a manual smoke target; do not claim WSL-specific proof until the checklist in the PRD has been run inside WSL.

Development

npm install
npm run ci

Release Please opens release PRs only from Conventional Commits on main. Use feat: ... for user-facing setup behavior and fix: ... for user-facing bug fixes. When squash-merging, make the squash title conventional; [codex] ... and plain titles will not trigger an npm release.

Product requirements live in docs/specs/pi-setup-prd/spec.md.

The package is intentionally small. It configures Pi's documented custom provider, API-key auth, and default-model settings surfaces.