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

@estebanforge/pi-ask-antigravity

v1.0.0

Published

Pi tool that delegates a self-contained sub-task to Google Antigravity's agy CLI (the CLI for Gemini). Friendly model aliases (flash/pro/gemini), configurable default model + thinking, and the AskAntigravity delegation tool.

Readme

@estebanforge/pi-ask-antigravity

A Pi extension that exposes the AskAntigravity tool: delegate a self-contained sub-task to Google Antigravity's agy CLI and stream its response back into the Pi session.

It is the AskClaude-style delegation pattern, pointed at Gemini via agy. The tool answers to three names the CLI is known by — gemini, antigravity, and agy — surfaced in its description so the model maps any of them to this single tool.

Install

pi install npm:@estebanforge/pi-ask-antigravity

Requires the agy CLI installed and authenticated. If you don't have it, follow Google's official install guide for your platform. Then run agy once to complete Google OAuth.

The extension resolves agy on $PATH, or via the AGY_BIN environment variable if you want to point at a specific binary.

Two modes: one-shot vs continued conversation

One tool, two ways to use it — you (or the agent) decide per call:

  • One-shot (isolated): omit conversationId. agy starts fresh with no memory of prior calls. Use for independent questions.
  • Continued conversation: pass the conversationId returned in a prior call's result (details.conversationId, also shown in the result footer). agy resumes that conversation with full context intact — use for follow-ups, multi-turn refinement, or "now do X based on what you just did".

How it works under the hood: agy -p does not print the conversation id, so on a fresh run the extension snapshots agy's conversations directory before spawn and discovers the single new .db file agy created (the one technique borrowed from antigravity-acp's scan.ts). On a continued call it passes --conversation <id> and agy reuses it natively. agy holds all conversation state in its own SQLite DB; this extension is otherwise stateless.

How it works

Pi (orchestrator)
  └─ AskAntigravity tool
       └─ spawn: agy --add-dir <cwd> --model <resolved> [--conversation <id>] -p <prompt>
            └─ agy runs its OWN tool loop (read / write / edit / exec) inside <cwd>
            └─ stdout streamed as partial tool output
       └─ returns agy's final answer text + conversationId (for follow-ups)

No ACP server, no SQLite reverse-engineering, no acpx, no third-party binary. agy -p (print mode) prints its response to stdout, so we capture it directly.

Model aliases

Verbose agy models strings (Gemini 3.5 Flash (Medium)) are hostile to natural requests. This extension resolves friendly aliases to the exact string:

| User says | Resolves to | | --- | --- | | flash | latest Flash, default tier (Medium) | | pro | latest Pro (Pro has no Medium → High) | | gemini | alias for flash | | flash high | latest Flash, High | | pro low | latest Pro, Low | | 3.5 flash | pinned version, default tier | | 3.1 pro | pinned Pro version (→ High) | | Gemini 3.5 Flash (Medium) | exact passthrough |

  • Latest = highest version number available for the family.
  • Default tier: Flash → Medium, Pro → High. Overridable per-config (below).
  • When a tier is unavailable for a family, the nearest is chosen with ties broken toward the higher tier (so "latest and greatest" wins).

Configuration

~/.pi/agent/ask-antigravity.json (global) merged over .pi/ask-antigravity.json (project):

{
  "defaultModel": "flash",
  "defaultThinking": "medium"
}

| Key | Default | Description | | --- | --- | --- | | defaultModel | flash | Alias or exact id used when the tool call omits model. | | defaultThinking | medium | Tier used when an alias doesn't name one. Applies only if the family offers it; otherwise the family default (Pro → High). |

/agy command

Interactive picker for the default model and default thinking. If the project config (.pi/ask-antigravity.json) already defines a key, the change is written there so it actually takes effect; otherwise it writes to the global config. Outside TUI (RPC/headless), prints a read-only status snapshot.

Tool parameters

| Param | Required | Description | | --- | --- | --- | | prompt | yes | Self-contained task. agy cannot see the Pi conversation. | | cwd | no | Workspace agy runs in. Defaults to the project root. | | model | no | Alias or exact id. Omit for the configured default. | | conversationId | no | Omit for a one-shot (agy starts fresh). Pass the id from a prior call's result (details.conversationId) to resume that agy conversation with full context. See Two modes. | | skipPermissions | no | Pass --dangerously-skip-permissions. Needed for mutating tasks. | | timeoutMinutes | no | Hard cap on the run. Default 10. |

Environment

| Env var | Purpose | | --- | --- | | AGY_BIN | Path to an agy binary; skips $PATH lookup | | AGY_EXTRA_ARGS | Extra args appended to every agy invocation (raw string) | | AGY_CONVERSATIONS_DIR | Directory where agy writes its conversation SQLite DBs. Defaults to ~/.gemini/antigravity-cli/conversations. Override only if agy uses a different path on your OS. |

When to use it

  • A second opinion from a different model family on the same problem.
  • Gemini-specific reasoning, long-context synthesis.
  • An isolated sub-task you want agy to complete end-to-end without driving each step.

agy mutates the workspace itself, so scope calls to sub-tasks where that is the desired contract, not where Pi is concurrently editing the same files.

Terms of Service notice

Google's Antigravity ToS states that using third-party software to access the Service (e.g. driving agy from a non-Google editor) is a breach of the Agreement and may be grounds for suspension or termination of your account. agy handles its own Google OAuth; this extension only spawns the official binary as a subprocess — but the effect is still a non-Google editor driving the Antigravity service through a third-party tool. By using this extension against an agy session logged into your personal Antigravity account, you accept that risk.

License

MIT