A collection of useful command-line tools and utilities.
A comprehensive suite of command-line tools for interacting with Grok AI (via xAI API). These tools provide a powerful interface for code analysis, file processing, image understanding, and interactive AI assistance.
- 🚀 Multiple interfaces: Basic CLI, advanced features, interactive chat, and more
- 📁 Multi-file analysis: Analyze entire codebases or multiple files at once
- 🖼️ Image support: Analyze screenshots and images with AI
- 💬 Conversation memory: Continue conversations across sessions
- 🔧 Shell integration: Execute suggested commands with confirmation
- 🎯 Specialized contexts: Pre-configured for code review, debugging, controls engineering, and more
- 🔄 Streaming responses: Real-time output for long responses
-
Get an API Key: Sign up at x.ai to get your Grok API key
-
Install:
cd grok ./install.sh -
Set your API key:
export GROK_API_KEY="your-api-key-here"
-
Start using Grok:
grok "Hello, what can you do?"
grok- Main interface with file/image/execution supportgrok-advanced- Streaming, conversations, output formatsgrok-chat- Interactive terminal chatgrok-codebase- Whole project analysisgrok-shell- Command execution helpergrok-help- Complete documentation
# Basic query
grok "Explain the theory of relativity"
# Analyze code
grok -f main.py "Review this code for bugs"
# Multi-file analysis
grok -f server.py -f client.py "How do these interact?"
# Image analysis
grok -i screenshot.png "What improvements would you suggest?"
# Use specialized context
grok -c code-review -f api.js "Security audit this file"
# Execute shell commands
grok -x "Find all Python files modified this week"
# Interactive chat
grok-chat
# Analyze entire project
grok-codebase . "Explain the architecture"Pre-configured expert contexts in contexts/:
code-review- Security, performance, and best practicescontrols- Control systems and PID tuningdesigner- UI/UX analysis and implementationanalyst- Document and data analysisdebug- Error diagnosis and troubleshooting
See the Grok README for detailed documentation, advanced usage, and configuration options.
Contributions are welcome! Please feel free to submit pull requests or open issues.
MIT License - see LICENSE file for details.