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

oh-my-pi-plugin-grok-build

v0.2.2

Published

oh-my-pi extension: xAI Grok Build subscription provider (OAuth login, model discovery, Chat Completions streaming)

Readme

oh-my-pi-plugin-grok-build

Standalone oh-my-pi extension for the xAI Grok Build subscription provider. It adds OAuth login, curated and live model discovery, and OpenAI Chat Completions streaming with the request identity expected by Grok Build.

Install

Install the npm package:

omp plugin install oh-my-pi-plugin-grok-build

Install with github:

omp plugin install https://github.com/metaphorics/oh-my-pi-plugin-grok-build

Link a local checkout:

omp plugin link /path/to/oh-my-pi-plugin-grok-build

Load the extension source for one invocation:

omp -e /path/to/oh-my-pi-plugin-grok-build/src/index.ts

Login

  1. Start omp with the extension installed or loaded.
  2. Run /login.
  3. Select xAI Grok Build.
  4. Complete the browser PKCE flow using the opened browser or copyable authorization URL.
  5. If the local browser callback cannot complete (for example, on a remote or headless host), paste the full redirect URL or the authorization code from xAI; it is exchanged as an authorization code over the same PKCE flow, never as a refresh token.

Credentials are stored and refreshed through omp's normal OAuth credential store.

Multiple accounts

Run /login again and complete the flow with a different xAI account to add another. Accounts are keyed by the OAuth subject (sub): logging into the same account replaces its tokens; a different account is stored alongside.

Account selection and quota ranking are host-owned; this extension deliberately adds no plugin-side balancer. Each omp session sticks to one account via a consistent hash of the session id; without a session, selection round-robins. On 401 or usage-limit 429, the host retries by re-minting the same account's token, then switches the session to a sibling account automatically. Token refresh preserves account identity.

Models

The offline seed contains:

  • grok-4.6: text and image input, 500k context, low through xhigh reasoning effort.
  • grok-4.5: text and image input, 500k context, reasoning effort support.
  • grok-composer-2.5-fast: text input, 200k context, non-reasoning.

After login, the provider augments the curated list with additional chat models discovered from Grok Build. Image, speech-to-text, and voice-only model IDs are excluded from the chat picker.

Grok 4.6 uses Grok Build's Responses backend; existing models continue through Chat Completions.

Select a model explicitly with:

omp --model xai-grok-build/grok-4.6

Limitations

  • Manual callback input accepts the redirect URL or authorization code, not a refresh token. Keep the terminal private while entering the code.
  • A stock host cannot enforce OAuth-only credentials at the same core boundary as a built-in provider. A runtime --api-key override is therefore not blocked by this extension.
  • Remote auth-broker callback-port forwarding is unavailable because CALLBACK_PORTS is core-owned. Browser login uses local callback port 8086.
  • The extension becomes inert when the host already provides xai-grok-build, avoiding duplicate provider registration.
  • Marketplace installations do not load extension modules declared only through package.json#omp.extensions. Install from npm or use omp plugin link instead.

Development

bun install
bun run typecheck
bun test ./test

All automated tests use mocked network responses. A live xAI authorization attempt is an optional publication smoke check because account authorization may be unavailable.

License

MIT