explaingit

barkleesanders/grok-via-web

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 4/5Setup · hard

TLDR

A tool that lets you use xAI's Grok coding CLI through your existing grok.com web subscription instead of paying for API access.

Mindmap

mindmap
  root((grok-via-web))
    What it does
      Drives web Grok
      Exposes chat endpoint
    Tech stack
      Python
      Chrome DevTools
      LiteLLM
    Use cases
      Use Grok CLI cheaply
      Route to other providers
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Use the Grok CLI coding agent without an API key, billed only through your grok.com subscription.

USE CASE 2

Route the same CLI to other providers like OpenRouter, OpenAI, or Anthropic through LiteLLM.

USE CASE 3

Automate a signed-in Chrome tab to expose an OpenAI-compatible chat endpoint locally.

What is it built with?

PythonChrome DevTools ProtocolLiteLLM

How does it compare?

barkleesanders/grok-via-web0xhassaan/nn-from-scratch3ks/embedoc
Stars00
LanguagePythonPythonPython
Last pushed2023-06-08
MaintenanceDormant
Setup difficultyhardmoderatehard
Complexity4/54/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a signed-in Chrome browser session and careful setup of the CDP proxy and router.

In plain English

This project lets you use a command-line AI coding tool powered by xAI's Grok model using a regular grok.com web subscription, rather than needing an API key or paying for an expensive subscription tier. The approach works by connecting to a Chrome browser that is already signed into grok.com, then automating the web interface to send and receive messages, avoiding the need to call the API directly. Technically, the tool uses the Chrome DevTools Protocol (CDP), a way for programs to talk to and control a running Chrome browser, to attach to an open grok.com tab. When you send a prompt, the tool types it into the real chat input box, clicks Submit, then reads the response from the network traffic flowing through your browser. This works because the browser itself handles all the authentication, no session tokens are copied or replayed. The project also integrates with LiteLLM, a router that lets you switch between different AI providers using one consistent interface. Beyond Grok, you can also route requests to free models from OpenRouter, or to other providers like OpenAI or Anthropic, all through the same command. A one-line launcher starts both the Chrome-driving proxy and the LiteLLM router, then opens the Grok CLI pointing at your local setup. This is useful for developers and AI power users who already pay for a grok.com subscription and want to use Grok from the command line without an additional API cost. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Help me launch the Chrome proxy and LiteLLM router together using the one-line launcher in this repo.
Prompt 2
Explain how this project extracts tool calls from Grok's web responses in three different formats.
Prompt 3
Show me how to point the Grok CLI at my local OpenAI-compatible endpoint instead of the real API.
Prompt 4
Walk me through switching this setup from Grok to a free OpenRouter model.

Frequently asked questions

What is grok-via-web?

A tool that lets you use xAI's Grok coding CLI through your existing grok.com web subscription instead of paying for API access.

What language is grok-via-web written in?

Mainly Python. The stack also includes Python, Chrome DevTools Protocol, LiteLLM.

How hard is grok-via-web to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is grok-via-web for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.