Install 安装
npm install -g codewhale
codewhale
The npm wrapper downloads the prebuilt binary for your platform from GitHub Releases and installs codewhale and codewhale-tui. Needs Node 18+. No Node? See Other ways to install for Cargo, Homebrew, prebuilt binaries, or mainland-China mirrors.
codewhale --version codewhale doctor
codewhale doctor checks your API key, network, sandbox availability, and MCP servers. Full report is written to ~/.codewhale/doctor.log.
codewhale update
Checks GitHub Releases for a newer version and replaces the binary in place. If you installed via Homebrew or npm, prefer the package manager instead: brew upgrade deepseek-tui or npm update -g codewhale. Cargo users can re-run cargo install codewhale-cli --locked --force.
- ① Get an API key
Sign up at platform.deepseek.com and create a key (format:
sk-...). - ② Set the key
export DEEPSEEK_API_KEY=sk-...
Or persist it to ~/.codewhale/config.toml:
codewhale auth set --provider deepseek --api-key sk-...
- ③ Run it in a project
cd path/to/project codewhale
Plan mode (read-only) is the default. Press Tab to switch to Agent mode (tool execution, per-action approval). Press again for YOLO (auto-approve).
Other ways to install
If the Cargo path above doesn't fit your setup, pick the row that matches your situation. Every path installs the same codewhale binary.
cargo install codewhale-cli --locked
Compiles from source and installs codewhale to ~/.cargo/bin. Get Rust at rustup.rs if needed.
Cargo via Tsinghua Tuna mirror — add to ~/.cargo/config.toml:
# ~/.cargo/config.toml [source.crates-io] replace-with = "tuna" [source.tuna] registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
cargo install codewhale-cli --locked
npm via npmmirror:
npm config set registry https://registry.npmmirror.com npm install -g codewhale
The npm wrapper still downloads the binary from github.com/Hmbown/CodeWhale/releases, which can be slow over GFW. Cargo + Tuna routes around GitHub entirely. The DeepSeek API at api.deepseek.com is reachable from mainland China without a proxy.
brew tap Hmbown/deepseek-tui brew install deepseek-tui
curl -fsSL -o codewhale \ https://github.com/Hmbown/CodeWhale/releases/latest/download/codewhale-macos-arm64 curl -fsSL -o codewhale-tui \ https://github.com/Hmbown/CodeWhale/releases/latest/download/codewhale-tui-macos-arm64 chmod +x codewhale codewhale-tui xattr -d com.apple.quarantine codewhale codewhale-tui 2>/dev/null || true sudo mv codewhale codewhale-tui /usr/local/bin/
curl -fsSL -O https://github.com/Hmbown/CodeWhale/releases/latest/download/codewhale-artifacts-sha256.txt shasum -a 256 -c codewhale-artifacts-sha256.txt --ignore-missing
git clone https://github.com/Hmbown/CodeWhale cd codewhale docker build -t codewhale . docker run --rm -it \ -e DEEPSEEK_API_KEY=$DEEPSEEK_API_KEY \ -v ~/.codewhale:/home/codewhale/.codewhale \ -v "$PWD:/work" -w /work \ codewhale
Multi-arch buildx is supported. No image is published to a registry yet, so you build locally.
git clone https://github.com/Hmbown/CodeWhale cd codewhale cargo build --release --locked # Install both binaries from the local checkout cargo install --path crates/cli --locked # codewhale cargo install --path crates/tui --locked # codewhale-tui
Useful for hacking on the workspace itself or contributing patches.
~/.codewhale/ ├── config.toml api keys, model, hooks, profiles ├── mcp.json MCP server definitions ├── skills/ user skills (each with SKILL.md) ├── sessions/ checkpoints + offline queue ├── tasks/ background task store └── audit.log credential / approval / elevation audit trail ./.codewhale/ project-scoped config (optional, per-repo)
The project-scoped ./.codewhale/ directory is optional — each repo can carry its own MCP servers, hooks, skills, and config overrides (e.g. provider keys). On first run the app asks whether to interactively create a config file if one is missing.