grok-cli is a command-line tool that brings Grok (xAI's AI assistant) directly into terminal workflows. Instead of opening a browser, users sign in once through OAuth and then interact with Grok using simple commands like 'grok-cli chat "your question"'. The tool supports text chat with web search, X (Twitter) search, image generation, video creation, and speech features. It stores login information locally so you stay signed in, tracks your usage locally, and can output results as readable text for humans or structured data for automation. It's designed to work with AI coding assistants and automation tools, making Grok accessible in script-first and agent-driven workflows.
How It Works
A friend tells you about grok-cli - a tool that brings Grok right into your terminal, no browser needed.
You download the ready-made version for your computer or install it through your AI assistant's skill system.
You type 'grok-cli login' and a browser window opens. You sign in with your SuperGrok or X Premium+ account just like you normally would.
You type a question like 'grok-cli chat "What's the latest in AI news?"' and Grok starts responding right there in your terminal.
Search what people are saying on X about any topic.
Create images with AI by describing what you want to see.
Generate short AI videos from text descriptions.
Grok's response streams directly to your terminal. You can save images to files, track your usage, or pipe results into other tools.
Star Growth
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 RepurposeSimilar repos coming soon.