2026-02-28 19:56:23 +00:00
|
|
|
# Grokkit
|
|
|
|
|
|
|
|
|
|
Grokkit is a fast Go CLI integrating Grok AI with git workflows and general chat/edit.
|
|
|
|
|
|
|
|
|
|
## 🚀 Quick Start
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
export XAI_API_KEY=sk-...
|
|
|
|
|
|
feat: add CI/CD workflows, persistent chat, shell completions, and testing
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
2026-03-01 12:17:22 +00:00
|
|
|
# Install from source
|
|
|
|
|
git clone https://github.com/yourusername/grokkit.git
|
|
|
|
|
cd grokkit
|
|
|
|
|
make install
|
|
|
|
|
|
|
|
|
|
# Or build locally
|
|
|
|
|
make build
|
2026-02-28 19:56:23 +00:00
|
|
|
|
|
|
|
|
grokkit --help
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 📁 Config (optional)
|
|
|
|
|
|
feat: add CI/CD workflows, persistent chat, shell completions, and testing
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
2026-03-01 12:17:22 +00:00
|
|
|
`~/.config/grokkit/config.toml`:
|
|
|
|
|
```toml
|
|
|
|
|
default_model = "grok-4"
|
|
|
|
|
temperature = 0.7
|
|
|
|
|
timeout = 60 # seconds
|
|
|
|
|
|
|
|
|
|
[aliases]
|
|
|
|
|
beta = "grok-beta-2"
|
|
|
|
|
|
|
|
|
|
[chat]
|
|
|
|
|
history_file = "~/.config/grokkit/chat_history.json"
|
2026-02-28 19:56:23 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
|
|
|
|
### 💬 `grokkit chat`
|
feat: add CI/CD workflows, persistent chat, shell completions, and testing
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
2026-03-01 12:17:22 +00:00
|
|
|
Interactive CLI chat with Grok. Features persistent history across sessions.
|
2026-02-28 19:56:23 +00:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
grokkit chat
|
feat: add CI/CD workflows, persistent chat, shell completions, and testing
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
2026-03-01 12:17:22 +00:00
|
|
|
grokkit chat -m grok-beta # Use specific model
|
2026-02-28 19:56:23 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 📝 `grokkit commitmsg`
|
|
|
|
|
Generate conventional commit from staged changes.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
git add .
|
|
|
|
|
grokkit commitmsg
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### ✅ `grokkit commit`
|
|
|
|
|
Generate & commit.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
grokkit commit
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 🔍 `grokkit review`
|
|
|
|
|
AI code review of staged changes.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
grokkit review
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 📋 `grokkit pr-describe`
|
|
|
|
|
PR description from branch vs main.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
grokkit pr-describe
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 📜 `grokkit history`
|
|
|
|
|
Summarize recent commits.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
grokkit history
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### ✏️ `grokkit edit FILE "instruction"`
|
|
|
|
|
AI edit file.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
grokkit edit main.go "add error handling"
|
|
|
|
|
```
|
|
|
|
|
|
feat: add CI/CD workflows, persistent chat, shell completions, and testing
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
2026-03-01 12:17:22 +00:00
|
|
|
## Shell Completions
|
|
|
|
|
|
|
|
|
|
Generate shell completions for your shell:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Bash
|
|
|
|
|
grokkit completion bash > /etc/bash_completion.d/grokkit
|
|
|
|
|
|
|
|
|
|
# Zsh
|
|
|
|
|
grokkit completion zsh > "${fpath[1]}/_grokkit"
|
|
|
|
|
|
|
|
|
|
# Fish
|
|
|
|
|
grokkit completion fish > ~/.config/fish/completions/grokkit.fish
|
|
|
|
|
|
|
|
|
|
# PowerShell
|
|
|
|
|
grokkit completion powershell > grokkit.ps1
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-28 19:56:23 +00:00
|
|
|
## Flags
|
|
|
|
|
|
feat: add CI/CD workflows, persistent chat, shell completions, and testing
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
2026-03-01 12:17:22 +00:00
|
|
|
- `--model, -m`: Specify model (e.g., grok-4, grok-beta)
|
|
|
|
|
- Global flag available on all commands
|
|
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
- ✅ Context-aware HTTP requests with timeouts
|
|
|
|
|
- ✅ Comprehensive error handling and logging
|
|
|
|
|
- ✅ Persistent chat history
|
|
|
|
|
- ✅ Configurable temperature and parameters
|
|
|
|
|
- ✅ Shell completions (bash, zsh, fish, powershell)
|
|
|
|
|
- ✅ Test coverage >70%
|
|
|
|
|
- ✅ CI/CD with GitHub Actions
|
|
|
|
|
- ✅ Interface-based design for testability
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Run tests
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
|
|
# Run tests with coverage
|
|
|
|
|
make test-cover
|
|
|
|
|
|
|
|
|
|
# Build
|
|
|
|
|
make build
|
|
|
|
|
|
|
|
|
|
# Install locally
|
|
|
|
|
make install
|
|
|
|
|
```
|
2026-02-28 19:56:23 +00:00
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
[Unlicense](https://unlicense.org/)
|