feat: complete architecture rewrite with Bun, OpenTUI, bash-only tools, and X Search API

Major rewrite of the Grok CLI agent:

- Runtime: Bun-first (removed Node.js/tsx fallbacks)
- UI: Replaced Ink with OpenTUI (@opentui/react) terminal framework
- Tools: Simplified to bash-only (removed text-editor, search, morph, todo, confirmation tools)
- Search: Integrated X Search API and Web Search via xAI Responses API
- Models: Updated to all latest Grok models (grok-4, grok-4.20-beta, grok-4-1-fast, grok-4-fast, grok-3-mini)
- Agent: Streamlined agent loop with async generator streaming
- Client: Dual API support (Chat Completions for tool calling, Responses API for search)
- Removed MCP integration, confirmation service, token counter, Morph editor
- Updated tsconfig for OpenTUI React JSX
- Clean 10-file architecture in src/

Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
This commit is contained in:
Cursor AgentandIsmail Pelaseyed committed 2026-03-17 23:06:55 +00:00
1 parent e763e2f472
commit ccfd3bb6fc
52 files changed
+1349 -8815

No files matched your search

+8 -2
View File
@@ -1,5 +1,11 @@
# Grok API Configuration
GROK_API_KEY=your_grok_api_key_here
# Optional: Custom Grok API Base URL
# GROK_BASE_URL=https://api.x.ai/v1
# Optional: Custom API base URL (default: https://api.x.ai/v1)
# GROK_BASE_URL=https://api.x.ai/v1
# Optional: Default model (default: grok-4-1-fast)
# GROK_MODEL=grok-4-1-fast
# Optional: Max tokens per response (default: 16384)
# GROK_MAX_TOKENS=16384