Analysis updated 2026-06-24
Add Grok 4.3 as your default pi CLI model with one npx install command
Log into xAI with OAuth and PKCE instead of managing an API key file
Call xai_multi_agent or xai_web_search as tools from a pi session
Reuse existing Grok CLI credentials at ~/.grok/auth.json to skip a fresh login
| blockedpath/pi-xai-oauth | anousss007/ng-blatui | dzmprt/csharppainkiller | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs the pi CLI installed plus an active SuperGrok account, tool calls count against your xAI rate limits.
pi-xai-oauth is a plug-in for a CLI tool called pi that adds xAI's Grok model as a provider you can talk to from the command line. The point of the package is that you log into xAI with its real OAuth flow, the same one the official Grok CLI uses, instead of having to copy and paste an API key. Once installed it makes Grok 4.3 (and a couple of older Grok 4.2 variants) available as the default model, with a 1 million token context window and three reasoning depth levels: low, medium, and high. The one-line install is npx pi-xai-oauth, which runs a setup script that installs the package into pi, sets xai-auth as the default provider, sets grok-4.3 as the default model, and turns on high thinking by default. There is also a manual route: pi install npm:pi-xai-oauth followed by editing ~/.pi/agent/settings.json to set the defaults yourself. The How It Works section describes the OAuth dance. Running pi /login xai-auth starts a local HTTP server on 127.0.0.1, builds an xAI authorize URL with a PKCE challenge, opens your default browser to xAI's login page, catches the redirect after you approve, and exchanges the code for access and refresh tokens. Refresh tokens are stored and rotated automatically before they expire. The plug-in also detects existing Grok CLI credentials at ~/.grok/auth.json and offers to reuse them. If localhost callbacks are blocked (for example on a VPN, inside Docker, or over SSH), the terminal UI shows a text field where you paste the redirect URL by hand. On top of the OAuth provider, the package registers five custom tools that call the xAI API directly: xai_generate_text for plain text generation with reasoning, xai_multi_agent for deep multi-agent research with a configurable number of agents, xai_web_search for web search, xai_x_search for X (Twitter) search, and xai_code_execution for asking Grok to analyse or simulate Python code. The README is clear that these count against your SuperGrok rate limits. Usage is straightforward once authenticated: pi "some prompt", or pi --model grok-4.3 "prompt", and you can pick reasoning depth inline with a syntax like grok-4.3:high. A quick reference table summarises commands for install, update, remove, login, and listing packages.
A plug-in for the pi CLI that adds xAI Grok as a provider using xAI's real OAuth flow, so you log in via browser instead of pasting an API key.
Mainly TypeScript. The stack also includes TypeScript, Node, OAuth.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.