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

@kazuki-ookura/grok-cli

v1.2.0

Published

The community maintenance fork of Grok CLI. Fully updated for the latest xAI Responses API with native web/X search support.

Readme

🚀 Grok CLI (The Maintenance Fork)

"The original repo was broken. I needed it. So I fixed it." — Kazuki Okura

NPM Version License: MIT

This is the community-led, high-performance maintenance fork of the original Grok CLI. Since the upstream repository (superagent-ai/grok-cli) is no longer maintained and failed to work with the latest xAI API changes, I have completely overhauled it to support the modern xAI Responses API.

🌟 Why this fork?

  • ✅ Fixed & Alive: The original OpenAI SDK-based implementation is broken for latest models. This fork uses the latest /v1/responses API.
  • 🔍 Native Search: First-class support for web_search and x_search tools.
  • 🧠 Grok-3 & 4-1 Ready: Optimized for the latest grok-4-1-fast-reasoning and grok-3 models.
  • ⚡ Performance: Lightweight implementation with axios for maximum reliability.

🚀 Quick Start

Global Installation

Install the fixed version directly from my personal NPM scope:

# Using Bun (Recommended)
bun add -g @kazuki-ookura/grok-cli

# Using NPM
npm install -g @kazuki-ookura/grok-cli

Installation from Source (for Developers)

If you want to contribute or use the latest source code:

git clone https://github.com/kazuki-ookura/grok-cli.git
cd grok-cli
bun install
bun run build
bun link # To use 'grok' command globally from source

Usage

# Start interactive mode
grok

# Single prompt (Headless mode)
grok -p "Explain quantum computing in one sentence"

# AI-powered Git operations
grok git help

# Manage MCP servers
grok mcp list

✨ Features

  • 🤖 Conversational AI: Natural language interface powered by the latest Grok models.
  • 🔍 Intelligent Search: Native web and X (Twitter) search capabilities.
  • 📝 Smart File Operations: AI automatically views, creates, and edits files.
  • ⚡ Bash Integration: Execute shell commands through natural conversation.
  • 🔌 MCP Tools: Full Model Context Protocol support (Linear, GitHub, etc.).

🛠 Configuration

Environment Variables

Set these in your shell profile (e.g., .zshrc or .bashrc):

| Variable | Description | Default | |----------|-------------|---------| | GROK_API_KEY | (Required) Your x.ai API key | - | | GROK_BASE_URL | API base URL | https://api.x.ai/v1 | | GROK_MODEL | Default model to use | grok-4-1-fast-reasoning |

CLI Options

Options:
  -v, --version               Output the version number
  -d, --directory <dir>       Set working directory
  -k, --api-key <key>         Grok API key
  -u, --base-url <url>        Grok API base URL
  -m, --model <model>         AI model to use (e.g., grok-3, grok-4-latest)
  -p, --prompt <prompt>       Process a single prompt and exit
  --max-tool-rounds <n>       Max number of tool execution rounds (default: 400)

📈 Status & Future

The original project at superagent-ai/grok-cli appears to be abandoned. I've taken the initiative to keep this project alive because it's a fantastic tool for developers. Expect regular updates as the Grok API evolves.

Join the movement: If you find this useful, leave a star on GitHub!


📄 License

MIT License - Feel free to use, modify, and distribute.

Developed and maintained with ❤️ by Kazuki Okura.