CodeWhale is an open-source terminal-based AI coding agent developed in Rust by Hunter Bown. It provides an autonomous and semi-autonomous coding environment built directly into the developer's local terminal. Operating through a terminal user interface (TUI) and CLI, CodeWhale executes file inspections, automated code edits, and subagent orchestration directly within a target repository. The runtime supports multi-agent fleets and modular subagents that execute specialized engineering workflows while tracking context metrics in real time. CodeWhale distinguishes itself through a deterministic constitutional governance framework located in `.codewhale/constitution.json`. This architecture enforces strict precedence across base prompts, operational postures, memory compaction, and subagent execution rules, actively mitigating prompt drift and context exhaustion during long development loops. The project is fully open source on GitHub, built with standard Rust tooling, and supports local execution as well as containerized environments via Dev Containers.
Terminal User Interface (TUI) — Interactive terminal interface featuring context pressure monitoring and live execution metrics. - Multi-Agent Fleet Coordination — Orchestrates specialized subagent roles through a fleet roster system and task delegation. - Constitutional Governance Engine — Manages prompt precedence and behavioral doctrine deterministically via .codewhale/constitution.json. - Context Compaction and Memory Hygiene — Optimizes token consumption through lean turn metadata, structured memory guidance, and opt-in project context packing. - Dev Container & Cross-Platform Support — Offers pre-configured Docker dev containers and named storage volume support for clean builds across Linux, macOS, and Windows. - Rust-Native Core — High-performance agent core with cargo-managed test and build configurations.
Use cases
Use Case: Multi-Agent Feature Implementation Developers can delegate complex, multi-step engineering tasks to a fleet of specialized subagents, letting CodeWhale coordinate workspace modifications, unit test validation, and tool execution without manual handoffs.
Use Case: Controlled Large-Codebase Refactoring Engineering teams can configure project rules and rank policies inside the repository's constitution file, ensuring the agent adheres strictly to architectural patterns and safe edit boundaries during broad refactoring sessions.
Use Case: Terminal-Driven Debugging and Testing Developers working entirely in terminal or remote SSH environments can leverage the TUI to monitor context consumption and resolve failing test suites using automated repair cycles.
Who it is for
CodeWhale is designed for software engineers and systems developers who prioritize keyboard-driven CLI/TUI workflows and require structured multi-agent coordination. It is particularly well-suited for developers who want granular governance over system prompts and context usage, but may not fit users seeking simple point-and-click GUI or IDE-integrated chat extensions.
Install guide
Installation Build and install CodeWhale directly from the source repository using Cargo (standard Rust installation method): bash git clone https://github.com/Hmbown/CodeWhale.git cd CodeWhale cargo build --release --locked cp target/release/codewhale /usr/local/bin/
First Run Ensure required provider credentials (such as API keys) are exported to your shell environment, then initialize repository-level configurations: bash export OPENAI_API_KEY="your-api-key-here" # or set your custom model provider variables cd /path/to/your/project codewhale init
Example Session Launch CodeWhale inside a target repository to start the interactive TUI: bash codewhale Inside the prompt, invoke fleet and audit tasks: text /fleet roster view Fix failing tests in tests/unit/ and keep turn metadata lean
Qwen Code — Qwen Code is an open-source terminal-based AI coding assistant maintained by the Qwen team (Alibaba Cloud / QwenLM). Built on…
Nanocoder — Nanocoder is an open-source terminal-based AI coding assistant developed by the Nano-Collective community. Designed for software developers who prefer working…
coro-code — coro-code is an open-source, terminal-based AI coding assistant developed in Rust by Blushyes. Built around a compiled native architecture, it…
Groq Code CLI — Groq Code CLI is an open-source command-line coding assistant developed by the build-with-groq team. It integrates directly with Groq's high-speed…
ob-1 — ob-1 is an open-source terminal-based AI coding agent created by Overbrilliant. Designed for developer workflows in the shell, it orchestrates…
VTCode — VTCode is an open-source terminal-based AI coding agent built in Rust by Vinh Nguyen (vinhnx). Engineered as a high-performance CLI…