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

grok-models

v0.1.2

Published

Add third-party OpenAI/Anthropic model support to Grok-Build: a keyboard-first TUI that picks models from the models.dev catalog and writes them safely into your Grok config

Downloads

308

Readme

Grok Model Selector

A standalone Rust TUI that picks a supported OpenAI or Anthropic model from the models.dev catalog and writes it safely into your Grok personal config (config.toml) — no manual TOML editing.

Features

  • Browse and search every models.dev provider served through @ai-sdk/openai, @ai-sdk/openai-compatible or @ai-sdk/anthropic
  • Three custom templates (OpenAI responses, OpenAI-compatible chat completions, Anthropic messages) for your own or self-hosted endpoints
  • API keys are entered once per provider (masked on screen), stored in the provider table and reused by every model of that provider
  • Review a masked diff before writing; cancel never writes anything
  • Atomic writes with owner-only (0600) permissions and conflict detection
  • models.dev catalog cached for 12 hours with ETag revalidation and offline fallback; press Ctrl+R in the provider list to force an update
  • Optional "set as default model" toggle
  • ChatGPT subscription OAuth implementation retained for a future release (not available in this version)

Install

macOS (universal binary) and Linux x64/arm64 (prebuilt binary):

npm install -g grok-models
grok-models

Or build from source (Rust 1.94.0, Unix):

cargo build --release
./target/release/grok-model-selector

The npm package supports macOS arm64/x64 and Linux arm64/x64. Windows is not supported by the prebuilt package.

Usage

  1. Pick a provider; press Ctrl+R to force-refresh the models.dev catalog
  2. Enter the API key (skipped when one is already configured for that provider)
  3. Pick a model
  4. Review the change preview (credentials are masked)
  5. In the preview, use Up/Down to scroll changes, d to toggle "set as default model", Enter to write, or Esc to cancel
  6. After writing, press Enter to add another model for the same provider, or Esc to exit

After writing, restart Grok and confirm the model appears via /model or grok models.

The config is written to $GROK_HOME/config.toml (falls back to ~/.grok/config.toml) using stable selector-* keys; all other entries, comments and formatting are preserved.

Supported Providers

The adapter registry is derived from the catalog itself — the npm field of each models.dev provider decides the wire protocol Grok uses:

| models.dev npm | Grok api_backend | Credential placement | |---|---|---| | @ai-sdk/openai | responses | provider api_key (Bearer) | | @ai-sdk/openai-compatible | chat_completions | provider api_key (Bearer) | | @ai-sdk/anthropic | messages | provider extra_headers x-api-key + anthropic-version |

Providers served through other SDKs (Azure, Google, Cohere, xAI, …) are filtered out and never shown.

Custom Providers

Three templates at the bottom of the provider list let you wire up any endpoint: Custom — OpenAI (responses), Custom — OpenAI-compatible (chat_completions) and Custom — Anthropic (messages).

After choosing a template you enter a name (becomes the provider key), a base URL, an optional API key (fine to skip for local servers like vLLM/Ollama) and a model id. Adding more models to the same custom provider reuses the stored URL and key.

The selector keeps long URLs, model names and configuration paths readable by wrapping long text and showing the visible end of long input values. API keys remain masked in input screens and previews.

Current Release Limitations

  • ChatGPT subscription models are not supported in this version and are hidden from the provider picker.
  • The OAuth implementation and CLI helpers remain in the source for a future release, but should not be used to create a ChatGPT subscription config with this version.
  • Use a supported API-key provider or a custom provider instead.