DeepSeek-native coding agent for the terminal.
Whale is a local CLI/TUI coding agent designed around DeepSeek's prefix cache(90% prefix-cache hit rate) behavior, append-only turns, and a terminal-first workflow.
Install the latest release:
curl -fsSL https://raw.githubusercontent.com/usewhale/whale/main/scripts/install.sh | sh
whale --versionThe installer downloads the matching release binary from GitHub Releases and verifies it against checksums.txt.
Install from source with Go:
go install github.com/usewhale/whale/cmd/whale@latest
whale --versionYou need Go 1.26.2 or newer.
Whale currently uses the DeepSeek API.
Before running Whale, create a DeepSeek API key in the DeepSeek Platform. See the DeepSeek API docs for API details.
Save a key for future sessions:
whale setupOr provide it per process:
DEEPSEEK_API_KEY=... whaleRun a health check:
whale doctorStart the interactive TUI:
whaleRun one prompt non-interactively:
whale exec "Explain what this repository does"
whale exec --json "Say exactly: whale exec ok"
printf 'Summarize the current directory\n' | whale execWhale is optimized for DeepSeek-specific behavior rather than a generic provider abstraction.
- Prefix caching matters more when the loop stays append-only and byte-stable.
- DeepSeek sometimes emits malformed or escaped tool-call payloads; Whale includes repair and scavenge paths for that.
- DeepSeek drops some deeply nested tool schemas; Whale flattens tool parameters to reduce that failure mode.
- Reasoning depth is exposed through
reasoning_effort, so Whale keeps that control in the runtime.
- Interactive terminal workflow with a local TUI and session resume.
setup,doctor, andexecentry points for first-run setup, diagnostics, and headless execution.- DeepSeek-aware tool loop with shell, file, patch, search, and web tools.
- Project memory loading from common repo instruction files such as
AGENTS.md. - Hook support for policy and workflow customization.
- Offline eval scaffolding and focused TUI test coverage in the repo.
whale— start the interactive TUIwhale setup— save a DeepSeek API keywhale doctor— run health checkswhale exec "prompt"— run one prompt non-interactivelywhale resume [id]— resume a saved session
Whale stores local state under ~/.whale/ and supports optional project and global hook files.
See docs/configuration.md for:
- API key and credential behavior
- project and global hook files
- hook event names
- runtime configuration notes
See CONTRIBUTING.md for cloning, local development, testing, issues, and pull requests.
For security-sensitive issues, see SECURITY.md.
