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

pi-grok-cli

v0.1.6

Published

Use Grok CLI's API endpoint in pi.

Readme

pi-grok-cli

CI Version License: MIT

A pi extension that connects to Grok CLI's API endpoint. The Grok CLI has access to models not available on the public api.x.ai API yet:

| Model | Public API (api.x.ai) | Grok CLI | |---|---|---| | grok-composer-2.5-fast | ❌ | ✅ | | grok-build | ✅ | ✅ | | grok-4.3 | ✅ | ✅ |

grok-composer-2.5-fast is Cursor's Composer 2.5 model, a purpose-built agentic coding model optimized for long-horizon coding tasks.

Cursor Tool Compatibility

Grok CLI models are trained to use Cursor-style coding tools. This extension includes compatibility shims so those models can keep using familiar tool calls inside pi:

  • File tools: Read, Write, StrReplace, Edit, Delete, and LS
  • Search tools: Grep and Glob
  • Web search: WebSearch only when pi-web-access is installed (pi install npm:pi-web-access); it delegates to that extension’s web_search
  • Terminal tool: Shell

When the active model is grok-cli and pi-web-access is installed, web_search is removed from the active tool set and blocked if invoked; use WebSearch instead. If pi-web-access is not installed, WebSearch is not registered and nothing changes for web search. Other providers keep using web_search from pi-web-access when that extension is installed.

The shims also normalize common Cursor/Grok argument shapes, such as contents for writes, glob_pattern for file search, glob_filter for grep filters, and old_string/new_string or oldText/newText for exact replacements. This keeps agentic coding workflows moving instead of failing on tool schema mismatches.

Requirements

You need an active Grok subscription or an X Premium subscription with Grok access to use this extension.

Installation

pi install npm:pi-grok-cli

For local development from this checkout:

pi install ./pi-grok-cli
# or run once without installing
pi -e ./pi-grok-cli

Usage

Login

/login

Select "Grok CLI" from the provider list. This opens the xAI OAuth page in your browser.

Select a model

/model grok-cli/grok-composer-2.5-fast

Check usage

/grok-cli-usage

Environment Variables

| Variable | Default | Description | |---|---|---| | PI_GROK_CLI_BASE_URL | https://cli-chat-proxy.grok.com/v1 | Override API base URL | | PI_GROK_CLI_MODELS | (all models) | Comma-separated model IDs to expose | | PI_GROK_CLI_OAUTH_CLIENT_ID | b1a00492-... | Override OAuth client ID | | PI_GROK_CLI_OAUTH_SCOPE | openid profile email offline_access grok-cli:access api:access | Override OAuth scopes | | GROK_CLI_OAUTH_TOKEN | — | Direct token bypass that skips OAuth entirely. No automatic refresh or renewal is performed; provide a valid external access token and replace or rotate it when it expires. |