CodeWhale logo

CodeWhale

Free

Coding agent for open source, open weight models

FreeFree tier
Inputs: text, codeOutputs: code, text
Type
Open Source

About CodeWhale

CodeWhale is an open-source terminal coding agent (TUI and CLI) designed to work with any large language model, with first-class support for open-weight models like DeepSeek. It introduces a unique three-layer constitutional framework — a bundled base law, user-defined standing law, and repository-specific law — to systematically resolve conflicting instructions. This constitution is enforced in the harness and remains intact when switching models, ensuring consistent behavior across projects. The agent can be installed via npm (primary, Node 18+), Cargo, Homebrew, or direct mirrors, and is released under the MIT license. Maintained by Hmbown, it has garnered over 40,000 GitHub stars and is actively developed with a live stream of pull requests and issues. Version 0.9.1 supports 30 providers and includes features such as constitution-first setup, reasoning trace transparency, and a multi-layered rule hierarchy.

Key Features

Terminal-based TUI and CLI for coding
Supports any model, with DeepSeek and open weights first-class
Three-layer constitutional hierarchy: base law, standing law, repo law
Automatic conflict resolution by ranking instructions
Portable standing rules that carry across projects
Multiple installation methods (npm, Cargo, Homebrew, mirrors)
MIT open source license with over 40,000 GitHub stars
Active development with real-time PR and issue tracking
Reasoning trace transparency for agent decisions

Pros & Cons

Pros
  • Completely open source under MIT license
  • Model-agnostic, with strong support for open-weight models
  • Unique constitution-based conflict resolution to handle ambiguous instructions
  • Multiple installation options (npm, Cargo, Homebrew) increase accessibility
  • Active development community with frequent updates and transparency
  • Provides reasoning traces for decision-making, aiding trust and debugging
Cons
  • Requires Node.js 18+ for the primary install method
  • Terminal-only interface (no GUI available)
  • Relatively early in development (v0.9.1), so features may still be maturing
  • Learning curve associated with setting up and understanding the constitution layers

Best For

Coding assistance in the terminalManaging and resolving conflicting coding instructions from multiple sourcesEnforcing project-specific rules, invariants, and verification policiesExperimenting with open-weight models for code generation

FAQ

How does CodeWhale resolve conflicting instructions?
CodeWhale uses a three-layer constitution: a bundled base law fixed in every binary, a user-defined standing law stored in $CODEWHALE_HOME/constitution.json, and a repository-specific law in .codewhale/constitution.json. Conflicts are resolved by the ranked priority of these layers, and the system enforces them automatically, intact even when swapping models.