grok-cli-self the lightweight, zero-dependency Grok CLI. Chat with xAI's Grok AI (Grok 4) in your terminal: one-shot prompts
# Add to your Claude Code skills
git clone https://github.com/PointAntStorm/grok-selfgrok-self is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by PointAntStorm. grok-cli-self the lightweight, zero-dependency Grok CLI. Chat with xAI's Grok AI (Grok 4) in your terminal: one-shot prompts. It has 120 GitHub stars.
grok-self's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/PointAntStorm/grok-self" and add it to your Claude Code skills directory (see the Installation section above).
grok-self is primarily written in JavaScript. It is open-source under PointAntStorm on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh grok-self against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
One-shot prompts · Interactive chat · Streaming replies · Pipe anything in · macOS, Linux & Windows
Installation · Quick Start · Usage · For Developers · FAQ · Contributing
grok-cli-self is a free, open-source command-line interface (CLI) for Grok, the AI assistant built by xAI. It brings the power of Grok's large language models — including the latest Grok 4 family — straight into your terminal, so you can ask questions, generate code, explain errors, draft text, and automate AI workflows without ever leaving your shell.
If you're searching for a Grok CLI, a Grok command-line tool, a way to use Grok in the terminal, or a self-hosted Grok chat client that you fully control — this is it. No Electron, no browser tab, no telemetry, no bloat: one small Node.js program, zero runtime dependencies, and your own xAI API key.
⚠️ Disclaimer: grok-cli-self is a community project and is not an official xAI product. "Grok" and "xAI" are trademarks of xAI Corp. This tool simply talks to the official, public xAI API using your own key.
grokself "your question" prints the answer and exits; perfect for scriptscat error.log | grokself "what's wrong here?" — the Unix waygrok-4-latest, grok-code-fast-1, or any model your key can access~/.grokself/config.json (chmod 600) and is sent only to api.x.ai--no-stream, exit codes, env vars (XAI_API_KEY, GROK_BASE_URL, GROK_MODEL)Open Terminal (press ⌘ + Space, type Terminal, hit Enter) and run these three lines, one at a time:
xcode-select --install
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash && source ~/.zshrc && nvm install --lts
mkdir -p 'grokself' && cd 'grokself' && npm install github:PointAntStorm/grok-self
Then run it:
npx grokself setup # paste your xAI API key once
npx grokself "hello Grok!" # 🎉 you're chatting with Grok in your terminal
# Install Node.js 18+ from https://nodejs.org/en/download (nvm / fnm / official installer)
mkdir -p 'grokself' && cd 'grokself' && npm install github:PointAntStorm/grok-self
npx grokself setup
npx grokself "hello Grok!"
If you want the grokself command available everywhere (not just inside the grokself folder):
npm install -g github:PointAntStorm/grok-self
grokself "hello Grok!" # works from any directory now
No worries — follow these steps exactly and you'll be chatting with Grok in ~5 minutes. No programming knowledge and no Homebrew needed.
Step 1 — Open the Terminal app.
On your Mac, press ⌘ (Command) + Space, type Terminal, and press Enter. A white or black window with text appears. This is where you "talk" to your computer by typing commands.
Step 2 — Install Apple's developer tools.
Copy this line, paste it into Terminal (with ⌘ + V), and press Enter:
xcode-select --install
A popup appears → click Install and wait for it to finish. If it says they're already installed, that's fine — move on.
Step 3 — Install Node.js (which includes npm).
npm is the tool that downloads grok-cli-self. The easiest way to get it without Homebrew is nvm (Node Version Manager):
Open https://nodejs.org/en/download in your browser.
Choose the nvm install method shown on that page — it gives you one command to copy.
Paste that command into Terminal and press Enter. It looks like this:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
Then copy-paste these two lines (they load nvm and install the long-term-support version of Node):
source ~/.zshrc
nvm install --lts
Check it worked — type node -v and press Enter. You should see something like v22.x.x. ✅
Step 4 — Install grok-cli-self. Copy-paste this whole line and press Enter:
mkdir -p 'grokself' && cd 'grokself' && npm install github:PointAntStorm/grok-self
This creates a folder called grokself in your home directory and downloads the tool into it.
Step 5 — Get your Grok API key. Grok's brain lives in xAI's cloud, and the key is your personal password to use it:
xai-. Keep it secret, like a password.Step 6 — Save the key and start chatting!
npx grokself setup
Paste your key when asked and press Enter. Then:
npx grokself "Explain quantum computing like I'm five"
🎉 Done! From now on, whenever you want to chat, open Terminal, type cd ~/grokself, then npx grokself for chat mode or npx grokself "your question" for a quick answer.
# One-shot question (streams the answer)
grokself "Write a haiku about terminals"
# Interactive chat with memory
grokself
# Pipe in context — logs, code, diffs, anything
cat server.log | grokself "Find the root cause of this crash"
git diff | grokself "Review this diff like a senior engineer"
# Pick a different model for one command
grokself --model grok-code-fast-1 "Refactor this function: ..."
# Non-interactive output for scripts & CI
grokself --no-stream "Summarize: ..." > summary.txt
$ grokself "Why is my zsh slow to start?"
grok › The most common cause is a heavy ~/.zshrc — usually a plugin
manager or nvm loading synchronously. Try timing it:
time zsh -i -c exit
If nvm is the culprit, lazy-load it or move to a faster manager…
| Command | Description |
|---|---|
grokself |
Start interactive chat (REPL) with conversation memory |
grokself "<prompt>" |
One-shot answer, streamed to stdout |
grokself setup |
Interactive wizard — saves your API key & default model |
grokself models |
List all models available to your API key |
grokself --help |
Full help text |
| Flag | Description | Default |
|---|---|---|
-m, --model <name> |
Model to use | grok-4-latest |
-s, --system <prompt> |
Custom system prompt | built-in helpful-assistant prompt |
-t, --temperature <n> |
Sampling temperature 0–2 |
0.7 |
--no-stream |
Wait for the full reply, print once (script-friendly) | off |
-v, --version |
Print version | — |
-h, --help |
Show help | — |
| Command | Description |
|---|---|
/help |
Show in-chat help |
/model <name> |
Switch model mid-conversation |
/system <prompt> |
Change the system prompt |
/clear |
Forget conversation history |
/save <file> |
Export the chat to a Markdown file |
/exit |
Quit (or Ctrl+C / Ctrl+D) |
| Variable | Description |
|---|---|
XAI_API_KEY |
Your xAI API key (overrides the saved config) |
GROK_BASE_URL |
Custom API endpoint — works with any OpenAI-compatible proxy/relay |
GROK_MODEL |
Default model override |
NO_COLOR |
Disable colored output |
Settings are stored at ~/.grokself/config.json (permissions 600 — only you can read it):
{
"apiKey": "xai-...",
"model": "grok-4-latest",
"baseUrl": "https://api.x.ai/v1",
"temperature": 0.7
}
| grok-cli-self | Official Grok Build CLI | Heavyweight AI TUIs | |
|---|---|---|---|
| Install size | ~30 KB, 0 deps | Large Rust binary | 100s of MB |
| Install | npm install github:… |
curl script | Installers / DMGs |
| Setup time | < 1 minute | Browser OAuth flow | Account + wizard |
| Bring your own API key | ✅ | ❌ (account login) | Varies |
| Pipe & script friendly | ✅ | Partial | ❌ |
| Hackable source | ✅ tiny, readable JS | Complex Rust workspace | ❌ |
| Offline-friendly config | ✅ single JSON file | Managed | Managed |
grok-cli-self doesn't try to be an autonomous coding agent — it's the **fastest way to talk to Grok from