This release includes latest updates and automated publishing via GitHub Actions.
- Fixes all Read/Update tool reliability issues
- Ensures consistent FS imports (
node:namespace) - Adds proper Node shebang for global installs
- Temporarily removes experimental features (e.g. compress)
A conversational AI CLI tool powered by Grok with Claude Code-level intelligence and advanced tool capabilities.
- π¦ NPM Package - Install globally with
npm install -g grok-cli-hurry-mode - π GitHub Repository - Source code, issues, and contributions
- π― Competitive Parity Analysis - Strategic analysis vs Claude Code, Cursor IDE, and OpenAI Codex
- π¬ xAI Community Discord - Official xAI API community support
- π Releases - Version history and changelogs
- π― Shift+Tab Twice Activation: Exact Claude Code Plan Mode with read-only exploration
- π Comprehensive Codebase Analysis: Project structure, dependencies, complexity metrics, and architecture patterns
- π§ AI-Powered Implementation Planning: Strategic plan generation using Grok models with risk assessment
- π‘οΈ Read-Only Tool Execution: Safe exploration with destructive operation blocking and simulation
- π Progress Visualization: Real-time exploration and planning progress with phase-specific guidance
- π User Approval Workflow: Complete plan review and confirmation before execution
- β‘ Performance Optimized: Fast exploration (1-15 seconds) with intelligent caching and filtering
- π Enhanced Welcome Banner: Professional ASCII art with context-aware status display
- π Unified Color System: Consistent Claude Code-inspired visual hierarchy across all interfaces
- π Contextual Spinners: 8 operation-specific animated indicators (π§ thinking, π search, π indexing, π write, etc.)
- π Progress Indicators: Advanced progress bars with ETA calculations and breathing pulse effects
- ποΈ Background Activity: Non-intrusive workspace awareness with file change monitoring
- π― UI State Management: Centralized coordination for all visual feedback and notifications
- β‘ Motion Design: 120ms smooth animations with 1.5s breathing rhythm for calm, responsive feel
- π§ Context Tooltip: Press
Ctrl+Ifor instant workspace insights (project name, git branch, file count, session state) - π Dynamic Status: Real-time memory pressure, background activity, and workspace intelligence
- π¨ Context Awareness Surface: Professional bordered layouts with organized information sections
- π AST Parser: Language-specific syntax tree analysis for TypeScript, JavaScript, Python
- π Symbol Search: Fuzzy search across codebases with cross-references and usage analysis
- π Dependency Analyzer: Circular dependency detection and dependency graph generation
- π― Code Context: Semantic analysis with quality metrics and design pattern detection
- π§ Refactoring Assistant: Safe rename, extract, inline operations with preview and rollback
- β‘ Multi-File Editor: Atomic operations with transaction support and rollback
- π Advanced Search Tool: Regex patterns with bulk replace and context-aware results
- π³ File Tree Operations: Visual trees, bulk operations, and intelligent file organization
- π§ Code-Aware Editor: Syntax-aware editing with smart refactoring capabilities
- π Operation History: Comprehensive undo/redo system with persistent history
π― Result: Claude Code-level capabilities with Claude Code feel in your terminal!
- π€ .agent System: AI-powered task management and documentation system for efficient workflows
- π§ Healer Script: Automated issue detection and resolution for tool reliability
- β‘ FsPort Abstraction: Improved file system operations with Node built-ins externalization
- π¦ Automated Installer: Enhanced installation UX with one-click setup options
- π‘οΈ Tool Reliability Fixes: Standardized imports, syntax error resolution, and fallback mechanisms
- π Paste Text Summary: Claude Code-style paste detection with smart summarization (
[Pasted text #1 +12 lines])
- π― Shift+Tab Twice: Activate read-only exploration mode (exact Claude Code parity)
- π Codebase Analysis: Comprehensive project structure, dependencies, and complexity analysis
- π§ AI-Powered Planning: Strategic implementation plans generated by Grok models
- π‘οΈ Read-Only Safety: Zero file modifications during exploration with tool simulation
- π Progress Tracking: Real-time exploration progress with phase-specific guidance
- π Plan Approval: Review and approve implementation plans before execution
- π AST Code Analysis: Parse TypeScript, JavaScript, Python files to extract symbols, imports, and structure
- π Symbol Search: Fuzzy search for functions, classes, variables across entire codebases
- π Dependency Analysis: Detect circular dependencies and generate dependency graphs
- π― Code Context: Intelligent relationship mapping with semantic analysis and quality metrics
- π§ Safe Refactoring: Rename, extract, inline operations with preview and rollback support
- β‘ MultiEdit: Atomic operations across multiple files with transaction support
- π Grep/Glob: Advanced search with regex patterns and file discovery
- π WebFetch/WebSearch: Real-time web content retrieval and search capabilities
- π Task/TodoWrite: Specialized agent delegation and comprehensive task management
- π Read/Write/Edit: Claude Code-standard file operations at high speed
π Visit grokcli.dev for complete documentation and guides.
- π¬ Conversational Interface: Natural language powered by Grok models
- π§ Intelligent Tool Selection: AI automatically chooses the right tools for your requests
- β‘ Bash Integration: Execute shell commands through natural conversation
- π MCP Extension: Extend capabilities with Model Context Protocol servers (Linear, GitHub, etc.)
- π» Beautiful Terminal UI: Interactive interface with Claude Code-style animations and feedback
- π Smart Paste Detection: Large pasted content automatically summarizes as
[Pasted text #1 +12 lines]for clean chat history
- π Professional Welcome Banner: ASCII art with dynamic context status (
Context: Dynamic β Files: indexed β Session: Restored) - π Contextual Visual Feedback: 8 operation-specific spinners with smooth 120ms animations
- π Progress Transparency: Real-time progress bars with ETA calculations for long operations
- ποΈ Background Awareness: Subtle workspace indexing and file watching indicators
- π Consistent Color Language: Claude Code-inspired visual hierarchy (info=blue, success=green, warn=orange, error=red)
- β‘ Motion Design: Breathing pulse effects and smooth transitions for calm, responsive interface
- ποΈ Agent Documentation: Complete
.agent/system for AI context optimization - π Interactive Commands:
/docsmenu,/readmegeneration,/api-docs,/changelog - π Smart Updates:
/update-agent-docswith configurable auto-triggers - π€ Subagent Framework: Token-optimized processing with specialized agents
- π‘οΈ Self-Healing:
/healcommand captures incidents and generates guardrails - π Code Comments:
/commentscommand for automatic code documentation
- π¦ Global Installation: Install anywhere with
npm install -g grok-cli-hurry-mode - βοΈ Flexible Configuration: Environment variables, user settings, or project-specific configs
- π CI/CD Ready: Headless mode perfect for automation and scripting
- Node.js 18+ (Node.js 20+ recommended)
Option 1: Run without installing (Recommended)
npx -y grok-cli-hurry-mode@latestAlways gets the latest version, no local installation needed
Option 2: Global installation
npm install -g grok-cli-hurry-mode@latestOption 3: Alternative package managers
# Using Yarn
yarn global add grok-cli-hurry-mode@latest
# Using pnpm
pnpm add -g grok-cli-hurry-mode@latest
# Using bun
bun add -g grok-cli-hurry-mode@latestAfter installation, if you get "command not found", add npm's global bin to your PATH:
macOS/Linux:
# Add to ~/.zshrc (macOS) or ~/.bashrc (Linux)
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Or for bash users:
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcWindows:
# PowerShell
$npmPath = npm config get prefix
$env:PATH += ";$npmPath"Verify installation:
grok --version # Should show current version
which grok # Should show installation pathTry without installing:
GROK_API_KEY=your_api_key_here npx -y grok-cli-hurry-mode@latest --helpOr install globally:
npm install -g grok-cli-hurry-mode@latest && \
echo 'export GROK_API_KEY=your_api_key_here' >> ~/.zshrc && \
source ~/.zshrc && \
grok --helpgit clone <repository>
cd grok-cli
npm install
npm run build
npm link-
Get your Grok API key from X.AI
-
Set up your API key (choose one method):
Method 1: Environment Variable
export GROK_API_KEY=your_api_key_hereMethod 2: .env File
cp .env.example .env
# Edit .env and add your API keyMethod 3: Command Line Flag
grok --api-key your_api_key_hereMethod 4: User Settings File
Create ~/.grok/user-settings.json:
{
"apiKey": "your_api_key_here"
}-
(Optional, Recommended) Get your Morph API key from Morph Dashboard
-
Set up your Morph API key for Fast Apply editing (choose one method):
Method 1: Environment Variable
export MORPH_API_KEY=your_morph_api_key_hereMethod 2: .env File
# Add to your .env file
MORPH_API_KEY=your_morph_api_key_hereBy default, the CLI uses https://api.x.ai/v1 as the Grok API endpoint. You can configure a custom endpoint if needed (choose one method):
Method 1: Environment Variable
export GROK_BASE_URL=https://your-custom-endpoint.com/v1Method 2: Command Line Flag
grok --api-key your_api_key_here --base-url https://your-custom-endpoint.com/v1Method 3: User Settings File
Add to ~/.grok/user-settings.json:
{
"apiKey": "your_api_key_here",
"baseURL": "https://your-custom-endpoint.com/v1"
}Grok CLI uses two types of configuration files to manage settings:
This file stores global settings that apply across all projects. These settings rarely change and include:
- API Key: Your Grok API key
- Base URL: Custom API endpoint (if needed)
- Default Model: Your preferred model (e.g.,
grok-code-fast-1) - Available Models: List of models you can use
Example:
{
"apiKey": "your_api_key_here",
"baseURL": "https://api.x.ai/v1",
"defaultModel": "grok-code-fast-1",
"models": [
"grok-code-fast-1",
"grok-4-latest",
"grok-3-latest",
"grok-3-fast",
"grok-3-mini-fast"
]
}This file stores project-specific settings in your current working directory. It includes:
- Current Model: The model currently in use for this project
- MCP Servers: Model Context Protocol server configurations
Example:
{
"model": "grok-3-fast",
"mcpServers": {
"linear": {
"name": "linear",
"transport": "stdio",
"command": "npx",
"args": ["@linear/mcp-server"]
}
}
}- Global Defaults: User-level settings provide your default preferences
- Project Override: Project-level settings override defaults for specific projects
- Directory-Specific: When you change directories, project settings are loaded automatically
- Fallback Logic: Project model β User default model β System default (
grok-code-fast-1)
This means you can have different models for different projects while maintaining consistent global settings like your API key.
Important: Grok CLI uses OpenAI-compatible APIs. You can use any provider that implements the OpenAI chat completions standard.
Popular Providers:
- X.AI (Grok):
https://api.x.ai/v1(default) - OpenAI:
https://api.openai.com/v1 - OpenRouter:
https://openrouter.ai/api/v1 - Groq:
https://api.groq.com/openai/v1
Example with OpenRouter:
{
"apiKey": "your_openrouter_key",
"baseURL": "https://openrouter.ai/api/v1",
"defaultModel": "anthropic/claude-3.5-sonnet",
"models": [
"anthropic/claude-3.5-sonnet",
"openai/gpt-4o",
"meta-llama/llama-3.1-70b-instruct"
]
}Start the conversational AI assistant:
grokOr specify a working directory:
grok -d /path/to/projectCtrl+I- Toggle context tooltip (workspace insights, git branch, project stats)Shift+Tab- Toggle auto-edit mode (hands-free file editing)Ctrl+C- Clear current inputEsc- Interrupt current operationexit- Quit the application
Process a single prompt and exit (useful for scripting and automation):
grok --prompt "show me the package.json file"
grok -p "create a new file called example.js with a hello world function"
grok --prompt "run bun test and show me the results" --directory /path/to/project
grok --prompt "complex task" --max-tool-rounds 50 # Limit tool usage for faster executionThis mode is particularly useful for:
- CI/CD pipelines: Automate code analysis and file operations
- Scripting: Integrate AI assistance into shell scripts
- Terminal benchmarks: Perfect for tools like Terminal Bench that need non-interactive execution
- Batch processing: Process multiple prompts programmatically
By default, Grok CLI allows up to 400 tool execution rounds to handle complex multi-step tasks. You can control this behavior:
# Limit tool rounds for faster execution on simple tasks
grok --max-tool-rounds 10 --prompt "show me the current directory"
# Increase limit for very complex tasks (use with caution)
grok --max-tool-rounds 1000 --prompt "comprehensive code refactoring"
# Works with all modes
grok --max-tool-rounds 20 # Interactive mode
grok git commit-and-push --max-tool-rounds 30 # Git commandsUse Cases:
- Fast responses: Lower limits (10-50) for simple queries
- Complex automation: Higher limits (500+) for comprehensive tasks
- Resource control: Prevent runaway executions in automated environments
You can specify which AI model to use with the --model parameter or GROK_MODEL environment variable:
Method 1: Command Line Flag
# Use Grok models
grok --model grok-code-fast-1
grok --model grok-4-latest
grok --model grok-3-latest
grok --model grok-3-fast
# Use other models (with appropriate API endpoint)
grok --model gemini-2.5-pro --base-url https://api-endpoint.com/v1
grok --model claude-sonnet-4-20250514 --base-url https://api-endpoint.com/v1Method 2: Environment Variable
export GROK_MODEL=grok-code-fast-1
grokMethod 3: User Settings File
Add to ~/.grok/user-settings.json:
{
"apiKey": "your_api_key_here",
"defaultModel": "grok-code-fast-1"
}Model Priority: --model flag > GROK_MODEL environment variable > user default model > system default (grok-code-fast-1)
grok [options]
Options:
-V, --version output the version number
-d, --directory <dir> set working directory
-k, --api-key <key> Grok API key (or set GROK_API_KEY env var)
-u, --base-url <url> Grok API base URL (or set GROK_BASE_URL env var)
-m, --model <model> AI model to use (e.g., grok-code-fast-1, grok-4-latest) (or set GROK_MODEL env var)
-p, --prompt <prompt> process a single prompt and exit (headless mode)
--max-tool-rounds <rounds> maximum number of tool execution rounds (default: 400)
-h, --help display help for commandYou can provide custom instructions to tailor Grok's behavior to your project by creating a .grok/GROK.md file in your project directory:
mkdir .grokCreate .grok/GROK.md with your custom instructions:
# Custom Instructions for Grok CLI
Always use TypeScript for any new code files.
When creating React components, use functional components with hooks.
Prefer const assertions and explicit typing over inference where it improves clarity.
Always add JSDoc comments for public functions and interfaces.
Follow the existing code style and patterns in this project.Grok will automatically load and follow these instructions when working in your project directory. The custom instructions are added to Grok's system prompt and take priority over default behavior.
Grok CLI supports Morph's Fast Apply model for high-speed code editing at 4,500+ tokens/sec with 98% accuracy. This is an optional feature that provides lightning-fast file editing capabilities.
Setup: Configure your Morph API key following the setup instructions above.
When MORPH_API_KEY is configured:
edit_filetool becomes available alongside the standardstr_replace_editor- Optimized for complex edits: Use for multi-line changes, refactoring, and large modifications
- Intelligent editing: Uses abbreviated edit format with
// ... existing code ...comments - Fallback support: Standard tools remain available if Morph is unavailable
When to use each tool:
edit_file(Morph): Complex edits, refactoring, multi-line changesstr_replace_editor: Simple text replacements, single-line edits
With Morph Fast Apply configured, you can request complex code changes:
grok --prompt "refactor this function to use async/await and add error handling"
grok -p "convert this class to TypeScript and add proper type annotations"The AI will automatically choose between edit_file (Morph) for complex changes or str_replace_editor for simple replacements.
Grok CLI supports MCP (Model Context Protocol) servers, allowing you to extend the AI assistant with additional tools and capabilities.
# Add an stdio-based MCP server
grok mcp add my-server --transport stdio --command "bun" --args server.js
# Add an HTTP-based MCP server
grok mcp add my-server --transport http --url "http://localhost:3000"
# Add with environment variables
grok mcp add my-server --transport stdio --command "python" --args "-m" "my_mcp_server" --env "API_KEY=your_key"grok mcp add-json my-server '{"command": "bun", "args": ["server.js"], "env": {"API_KEY": "your_key"}}'To add Linear MCP tools for project management:
# Add Linear MCP server
grok mcp add linear --transport sse --url "https://mcp.linear.app/sse"This enables Linear tools like:
- Create and manage Linear issues
- Search and filter issues
- Update issue status and assignees
- Access team and project information
# List all configured servers
grok mcp list
# Test server connection
grok mcp test server-name
# Remove a server
grok mcp remove server-name- stdio: Run MCP server as a subprocess (most common)
- http: Connect to HTTP-based MCP server
- sse: Connect via Server-Sent Events
# Install dependencies
npm install
# Development mode
bun run dev
# Build project
npm run build
# Run linter
bun run lint
# Type check
bun run typecheckThis project uses Husky and lint-staged to run automated checks before commits:
- ESLint: Automatically fixes linting issues and checks for errors
- TypeScript: Runs type checking to prevent compilation errors
- Staged files only: Only checks files that are staged for commit
The pre-commit hook runs npx lint-staged, which processes *.{ts,tsx} files with:
eslint --fix- Auto-fix linting issues where possibletsc --noEmit- Type check without emitting files
If checks fail, the commit is blocked until issues are resolved.
Status: β FULLY AUTOMATED (as of 2025-10-17)
Every push to the main branch automatically:
- π Bumps version (patch increment: 1.0.X β 1.0.X+1)
- π Updates README with new version number
- ποΈ Builds the project with fresh dependencies
- π¦ Publishes to NPM at https://www.npmjs.com/package/grok-cli-hurry-mode
- π·οΈ Creates git tag (e.g.,
v1.0.87)
β±οΈ Timeline: ~3-5 minutes from push to NPM availability
Nothing! Just push your changes to main:
git add .
git commit -m "your feature/fix"
git push origin main
# β¨ Automation handles the rest!PAT_TOKEN: Personal Access Token with repo permissions (for git operations)NPM_TOKEN: NPM Automation token fromgrok_cliaccount (for publishing)
{
"name": "grok-cli-hurry-mode", // β οΈ NEVER change - breaks publishing
"publishConfig": {
"access": "public" // β οΈ Must NOT include registry override
}
}If automation fails and you need to publish immediately:
# 1. Bump version locally
npm version patch # or minor/major
# 2. Test build
npm run build
npm run local # Test CLI locally
# 3. Manual publish
npm publish --access public
# 4. Push changes
git push origin main --follow-tags
# 5. Fix automation before next release!- GitHub Actions: https://github.com/hinetapora/grok-cli-hurry-mode/actions
- NPM Package: https://www.npmjs.com/package/grok-cli-hurry-mode
- Release History: Check git tags or NPM version history
If automation fails:
- Check GitHub Actions logs for specific errors
- Verify secrets (
PAT_TOKEN,NPM_TOKEN) haven't expired - Confirm package.json name hasn't been modified
- See documentation:
.agent/sop/npm-publishing-troubleshooting.md
Common Issues:
- Build fails: Usually Rollup dependency cache (auto-fixed with clean install)
- Publish fails: Check NPM token is valid and from correct account
- Git push fails: Verify PAT_TOKEN has repo permissions
- π Release Management:
.agent/sop/release-management.md - π¨ Incident History:
.agent/incidents/incident-npm-publish-failure.md - π§ Troubleshooting:
.agent/sop/npm-publishing-troubleshooting.md
- Agent: Core command processing and execution logic
- Tools: Text editor and bash tool implementations
- UI: Ink-based terminal interface components
- Types: TypeScript definitions for the entire system
MIT
This project is based on grok-cli by @pelaseyed.
π¨ "Command not found: grok"
# Check if grok is installed
npm list -g grok-cli-hurry-mode
# If installed but not in PATH, add npm global bin to PATH:
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Verify it works
grok --versionπ¨ "Permission denied" during installation
# Option 1: Use npx (no installation needed)
npx grok-cli-hurry-mode@latest
# Option 2: Fix npm permissions (macOS/Linux)
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
# Option 3: Configure npm to use different directory
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrcπ¨ "Cannot find module" errors
# Clear npm cache and reinstall
npm cache clean --force
npm uninstall -g grok-cli-hurry-mode
npm install -g grok-cli-hurry-mode@latestπ¨ Outdated version
# Check current version
grok --version
npm view grok-cli-hurry-mode version
# Update to latest
npm update -g grok-cli-hurry-mode@latestIf you encounter errors like fs.readFile is not a function or fs.stat is not a function when using file operations:
- This is a known issue with the tool infrastructure
- Automatic fallback: The CLI will automatically fall back to bash commands for file operations
- Warning messages: You may see console warnings like "str_replace_editor tool failed, falling back to bash"
- Functionality: Despite the warnings, operations should still work via bash fallbacks
This issue is being tracked and the fallbacks ensure the CLI remains functional.
π¨ API Key errors
# Set your API key (replace with your actual key)
export GROK_API_KEY=your_actual_api_key_here
# Or add to your shell profile permanently
echo 'export GROK_API_KEY=your_actual_api_key_here' >> ~/.zshrc
source ~/.zshrc
# Verify it's set
echo $GROK_API_KEYπ¨ Network/connectivity issues
# Test with verbose output
grok --verbose "test message"
# Check API endpoint connectivity
curl -I https://api.x.ai/v1/models- File operations fail: Check that the file path exists and is accessible
- Bash commands fail: Ensure you have the necessary permissions
- Tool timeouts: Complex operations may take time; the spinner indicates progress
- Slow responses: Try a different model with
grok --model grok-code-fast-1
This project is built upon the excellent foundation of the original Grok CLI created by Ismail Pelaseyed at Superagent.ai.
Original Project: superagent-ai/grok-cli
Founder: Ismail Pelaseyed
Organization: Superagent.ai
This "Hurry Mode" fork extends the original with advanced file operations, enhanced tool systems, and comprehensive automation while maintaining the core vision of bringing AI-powered terminal intelligence to developers.
We welcome contributions from the community! Add your details below when you contribute to the project.
- @hinetapora β Fork maintainer, advanced tool systems, UX enhancements, auto-upgrade system
- @homanp β Original Grok CLI creator and foundation
- @unblock-everything β x.ai β Cold-ass honkey π
- @Bucko89 β GMA β Grinding daily
- @base-buzz β Meta
Want to see your name here? Check out our Contributing Guide and submit a pull request!
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/grok-cli-hurry-mode.git - Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and commit them:
git commit -m "feat: add awesome feature" - Push to your fork:
git push origin feature/your-feature-name - Submit a pull request with a clear description of your changes
- π Bug fixes - Help us squash those pesky bugs
- β‘ Performance improvements - Make it faster and more efficient
- π Documentation - Improve our docs and examples
- π¨ UX/UI enhancements - Better terminal experience
- π§ New tools - Add new capabilities to the tool system
- π§ͺ Tests - Help us improve our test coverage
- π‘ Feature requests - Suggest new functionality
Join our growing community of AI-powered terminal enthusiasts!
