Skip to content

grok-cli

by SuperagentAgentWrite code

Hands coding tasks to a terminal agent that runs on xAI's Grok models

View on GitHub

About grok-cli

grok-cli is an open-source coding agent for the terminal that uses xAI's Grok models through your API key: you describe a change and it reads your project, edits files, runs commands and can search X and the web.

For DevelopersTechnical makersGrok API users

Made by Superagent

Superagent publishes open-source tools on GitHub and describes its work as security for developers building with AI. grok-cli is a community project, not made or endorsed by xAI.

Stars
★ 3.5k
License
MIT
Cost
Usage-based
Platforms
Mac · Win · Linux
Level
Intermediate

Overview

grok-cli is a community-built, open-source coding agent for the terminal that uses xAI's Grok API; it is not made by xAI. You describe a change and it reads your project, edits files and runs commands, with live X and web search, helper sub-agents and image or video generation built in. You can also pair it with a Telegram bot and send it tasks from your phone while it runs. It suits developers and technical makers who have a Grok API key.

It adds live X search and remote control from Telegram to a terminal coding agent, so you can check on a task from your phone.

Try these first

Start with the first one: it is a small task you can check easily.

  1. Explain how this project is organised and how to run it. Don't change any files.First try · read-only

  2. Search X for what people are saying about [library name] this week and summarise it.

  3. Fix the failing test in [file name] and run the test suite afterwards.edits files

  4. Generate a logo for my project called [name] and save it in the assets folder.writes a file

Example prompts written by Agent Flows Hub.

Features

From the creator's documentation.

FeatureWhat it doesRuns
Coding agentReads your project, edits files and runs shell commandsYour computer
X and web searchSearches live X posts and the web while it worksxAI API
Sub-agentsSplits work between helper agents for exploring and general tasksxAI API
Images and videoCreates or edits images and short videos and saves them locallyxAI API
Telegram remote controlPair a Telegram bot to send tasks from your phone while the CLI runsTelegram
Headless modeRun one prompt from a script or schedule and get text or JSON backYour computer

Good to know

You want a coding agent in your terminal that can also search live X posts and the web. grok-cli reads your project, makes edits and runs commands on Grok models billed to your own xAI key.

Limits

  • It is a community project, not an xAI product, and every request is billed to your own Grok API key.
  • The install script covers Apple Silicon Macs, 64-bit Linux and 64-bit Windows. Telegram remote control works only while the CLI keeps running on your computer.

Notes by (original project name: grok-cli (npm package grok-dev)), written from the creator's documentation, not from running it ourselves. grok-cli README: install, API key and features

Stuck setting it up?

Tell us what happened. We take a look first; if it needs paid work, you get an estimate before anything starts.

Get help

Other agents

  • HanaAgent A desktop AI assistant with memory that works on your files and runs scheduled tasks
  • Hermes Agent Gives you an AI assistant that remembers you and does tasks from Telegram or Slack
  • InkOS Helps you plan, write and revise novels, short stories and scripts with an AI agent
  • Kilo Code Hands your coding tasks to an agent in VS Code, JetBrains or the terminal
  • Kimi Hands a task to Moonshot AI's agent, which returns slides, documents, sheets or a website
  • Lindy Drafts email replies, books meetings and takes meeting notes from your connected accounts

See all 61 agents · Install your first AI agent

GitHub