ysnock404

OpenCode plugin that signs in to xAI Grok through the SuperGrok OAuth/PKCE flow instead of using an XAI_API_KEY.

10
0
85% credibility
Found May 20, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

This project is an authentication plugin that lets OpenCode users sign in to xAI's Grok AI service using their xAI account instead of an API key. It works like a 'Sign in with Google' button - you log in through your browser, and the plugin handles the secure connection behind the scenes. Once connected, you can choose from different Grok models to help write, review, or debug your code. The plugin automatically keeps you signed in by handling token refreshes, and includes security checks to ensure your login credentials only go to xAI's official servers.

How It Works

1
πŸ’‘ You want to use Grok in your coding assistant

You've been using OpenCode and hear that Grok is available, but you don't want to deal with API keys.

2
πŸ”Œ You install the Grok authentication plugin

The plugin connects your coding assistant to xAI's login system, just like signing into a website.

3
πŸ” You sign in through your browser

Your browser opens to xAI's login page where you enter your credentials, the same way you log into any app.

4
βœ… Your coding assistant receives the confirmation

Once you approve the login, xAI sends a secure confirmation back to your computer automatically.

5
You choose which Grok model to use
🧠
Grok 4.3 for everyday coding

A reliable all-purpose model for general programming tasks.

🧩
Grok 4.20 Reasoning for complex problems

Takes more time but works through tricky logic step by step.

⚑
Grok 4.20 Non-Reasoning for quick answers

Faster responses when you just need a quick result.

πŸ‘₯
Grok 4.20 Multi-Agent for collaborative work

Coordinates multiple AI helpers working together on your project.

πŸŽ‰ Grok is ready to help with your code

Your coding assistant is now connected to xAI's Grok models, and it stays signed in automatically.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is opencode-grok-auth?

This is an OpenCode plugin that lets you authenticate with xAI Grok using OAuth instead of managing API keys. Built in TypeScript, it implements the SuperGrok OAuth/PKCE flow with automatic token refresh. You run `opencode auth login`, pick xAI Grok OAuth, complete browser sign-in, and you're connected to models like grok-4.3 or grok-4.20.

Why is it gaining traction?

The appeal is clear: no API key management. OAuth handles authentication with real browser login, and tokens refresh automatically in the background. It mirrors the Hermes Agent xAI flow but plugs directly into OpenCode's plugin system. Security guards block bearer tokens from leaving api.x.ai, and discovered endpoints are pinned to HTTPS xAI origins.

Who should use this?

Developers using OpenCode who want Grok access without handling API keys. If your team prefers OAuth's familiar login patterns over copying API keys into environment variables, this plugin handles the flow for you. It is particularly useful for accessing Grok's reasoning models through OpenCode without credential sprawl.

Verdict

This is a functional, security-conscious plugin at a very early stageβ€”only 10 stars and the credibility score sits at 0.85%, indicating limited community validation so far. The documentation is solid and the security considerations are thorough, but test coverage is unknown and npm publication is still pending. Worth trying if you use OpenCode with Grok, but treat it as an early-stage project and verify it works for your use case before relying on it in production workflows.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.