Installation ยท Features ยท Providers ยท Documentation ยท Changelog
Hawk is a powerful, extensible CLI coding agent that brings the intelligence of modern LLMs directly to your terminal. Unlike locked-in alternatives, Hawk is provider-agnostic โ use your own API keys, run local models, or switch between 8+ providers including access to 200+ models via OpenRouter.
Built for developers who want control without compromise.
# One command to start coding with AI
hawk|
Connect to any OpenAI-compatible API. From GPT-4o to local Ollama models โ you choose the brain. 25+ built-in tools for real-world development:
|
Real-time token streaming for instant feedback. No waiting, just coding. Built-in failover and health monitoring. Automatically switch providers when one is down. Track costs, tokens, and performance per session. Know exactly what you're spending. Run entirely local with Ollama. Your code never leaves your machine. |
npm install -g hawkbrew install hawkgit clone https://github.com/GrayCodeAI/hawk.git
cd hawk
bun install
bun run build
npm link# OpenAI
bun run profile:init -- --provider openai --api-key sk-xxx --model gpt-4o
# Anthropic Claude
bun run profile:anthropic -- --api-key sk-ant-xxx --model claude-3-5-sonnet-latest
# Local Ollama (Free, Private)
bun run profile:init -- --provider ollama --model llama3.2 --base-url http://localhost:11434
# Grok / xAI
bun run profile:grok -- --api-key xai-xxx --model grok-2hawkAsk Hawk to help with any task:
- "Create a React component for a login form"
- "Refactor this function to use async/await"
- "Debug why my API calls are failing"
- "Write tests for this module"
Hawk supports 8 official provider profiles plus any OpenAI-compatible endpoint.
| Provider | Best For | Setup |
|---|---|---|
| OpenAI | General purpose, fast | profile:init --provider openai |
| Anthropic | Complex reasoning, code | profile:anthropic |
| Gemini | Long context, free tier | Built-in support |
| Grok/xAI | X integration, real-time | profile:grok |
| OpenRouter | Access 200+ models | profile:init --provider openrouter |
| Ollama | Local, free, private | profile:init --provider ollama |
| CanopyWave | Open-source models | OpenAI-compatible endpoint |
| OpenCodeGO | Kimi thinking models | OpenAI-compatible endpoint |
Hawk's universal adapter works with any API that follows the OpenAI format:
- DeepSeek โ Cost-effective coding
- Groq โ Fast inference, free tier
- Together AI โ Open-source models
- Azure OpenAI โ Enterprise deployments
- LM Studio โ Local GUI inference
- Custom endpoints โ Your own API
Configure any compatible provider using the /config command inside Hawk, or edit ~/.hawk/provider.json directly:
{
"openai_api_key": "your-key",
"openai_base_url": "https://your-endpoint.com/v1",
"active_model": "model-name"
}See full provider list for more.
| Command | Description |
|---|---|
hawk |
Start interactive session |
hawk --version |
Show version |
hawk --help |
Show help |
/provider-status |
View provider health & metrics |
/refresh-model-catalog |
Update available models |
/debug-model-catalog |
Debug model configuration |
Hawk is built with a modular architecture:
- CLI Interface โ Ink-based React terminal UI
- Tool System โ 25+ extensible tools for code operations
- Provider Layer โ Universal adapter for any LLM API
- Session Manager โ Cost tracking, history, state management
See ARCHITECTURE.md for detailed diagrams and system design.
# Install dependencies
bun install
# Build project
bun run build
# Run in development mode
bun run dev
# Run tests
bun run smoke
# Validate environment
bun run doctor:runtime
# Quick local setup with Ollama
bun run dev:fastThis is the 1.x branch of Hawk with:
- โ Provider-agnostic architecture
- โ 25+ production-ready tools
- โ Smart provider routing with failover
- โ Real-time cost tracking
- โ MCP (Model Context Protocol) support
- โ LSP integration
Check releases for the latest updates.
Support Hawk's development:
Your sponsorship helps us maintain and improve Hawk.
We welcome contributions! Please read our Contributing Guide before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- ๐ฌ Discord โ Get help, share ideas
- ๐ฆ X/Twitter โ Updates and announcements
- ๐ GitHub Issues โ Bug reports and feature requests
See SECURITY.md for our security policy and vulnerability disclosure process.
MIT License โ see LICENSE for details.
Made with โก by GrayCodeAI
