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

cli4api

v0.1.2

Published

OpenAI-compatible HTTP API for Google Antigravity CLI (agy) — wrap agy as a drop-in OpenAI endpoint

Readme

cli4api

Wrap Google Antigravity CLI (agy) as an OpenAI-compatible HTTP API.

Use any OpenAI SDK or tool (curl, OpenClaw, Cursor, etc.) to send prompts to agy's Gemini models — no API key needed, just agy's OAuth login.

Why

agy uses OAuth (not API keys), so you can't point standard OpenAI-compatible clients at it. cli4api bridges the gap:

[OpenAI client] → POST /v1/chat/completions → agy -p → Gemini

Requirements

Install

npm install -g cli4api

Or run directly:

npx cli4api

Usage

# Start server (default port 8080)
cli4api

# Custom port and host
PORT=9090 HOST=127.0.0.1 cli4api

Then send requests:

curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Gemini 3.5 Flash (Medium)",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Streaming

curl http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Gemini 3.5 Flash (Medium)",
    "messages": [{"role": "user", "content": "Say hello"}],
    "stream": true
  }'

List models

curl http://localhost:8080/v1/models

OpenAI Compatibility

| Endpoint | Method | Status | |----------|--------|--------| | /v1/chat/completions | POST | ✅ Streaming + non-streaming | | /v1/models | GET | ✅ |

API

POST /v1/chat/completions

{
  "model": "Gemini 3.5 Flash (Medium)",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "What is the capital of France?" }
  ],
  "stream": false
}
  • model — agy model name (default: Gemini 3.5 Flash (Medium))
  • messages — array of { role, content } objects (roles: system, user, assistant)
  • stream — boolean, SSE streaming (default: false)

Development

git clone <repo> && cd cli4api
bun install
bun run dev      # start server with hot reload
bun test         # run tests
bun run build    # bundle to dist/
bun run typecheck

How it works

cli4api spawns agy -p as a subprocess for each request, captures stdout, and wraps the response in OpenAI chat completion format. Session continuation uses agy's --conversation flag. Streaming is simulated by splitting the response into word-sized SSE chunks.

License

MIT