Codewhale README

项目的 README,来自 github.com/codewhale-hq/Codewhale。合并为一个 markdown 文件:README.md。

Codewhale

Open-source Rust coding agent for your terminal. Any model, multi-agent fleets, OS sandboxing, and verifiable receipts.

curl -fsSL https://codewhale.net/install.sh | sh

Latest release CI crates.io npm License: MIT Discord

Website · Documentation · Changelog · Contributing

简体中文 · 日本語 · Tiếng Việt · Bahasa Indonesia · 한국어 · Español · Português · Русский · Українська · Français · Deutsch · 繁體中文 · हिन्दी · Türkçe · Italiano · Polski · العربية · Català

Codewhale v0.10.4 in a terminal after a real task on local Ollama (qwen3:4b): it edited ls.py, waited for approval before running python3 -m unittest -v test_ls.py, ran 2 passing tests, and reported the result.

Real session on published Codewhale v0.10.4 (48669ad108fa) running local Ollama (qwen3:4b) in Accept Edits mode.

Install

The install script above puts checksum-verified codewhale and its short alias codew in ~/.local/bin on macOS and Linux. If your shell reports command not found, add ~/.local/bin to your PATH (details). Upgrade in place with codewhale update.

winget install --id HunterBown.CodeWhale --exact --source winget  # Windows x64
npm install -g codewhale                                          # wraps the same release binaries
cargo install codewhale-cli --locked                              # builds from source; can trail GitHub Releases

Prebuilt binaries ship for Linux, macOS, and Windows (x64 and arm64). Scoop, Nix, Homebrew on Linux, Android/Termux (preview), and manual downloads are in docs/INSTALL.md; container images are in docs/DOCKER.md. Use one install method per machine so two binaries do not shadow each other on PATH.

Quickstart

  1. Commit or stash your work, then run codewhale from a git repository root.
  2. Run /provider (or press F3) to select a provider, paste an API key, and pick a model. DeepSeek is the default; if no key is configured and a local Ollama server responds, Codewhale offers its models on your first message.
  3. Give it a task:
Fix the failing tests and explain what changed.

Read-only commands run immediately, except in Ask, which asks before every command. Mutating shell commands prompt for approval: y runs once, a allows matching commands for the rest of the session, and n denies. Run /undo to revert the last turn and its file edits, or /help for commands and keybindings.

Capabilities

Entry points

Command Purpose
codewhale Interactive terminal app
codewhale exec "…" Headless single-task runner for scripts and CI (guide; --auto uses Full Access unless sandboxed)
codewhale web Local web client on 127.0.0.1 (guide)
codewhale review --pr N Advisory GitHub PR review; GitHub bot setup runs it on your own key
codewhale app-server --http Local HTTP Runtime API for threads, events, approvals, and per-turn diffs
codewhale serve --acp Agent Client Protocol over stdio for editors such as Zed

All entry points share one Rust engine (architecture). A community-maintained VS Code extension (source) connects to the same engine. See the latest release notes and roadmap for current release and desktop/cloud status.

Permissions, sandboxing, and privacy

Shift+Tab cycles permission modes: Ask → Accept Edits → Plan → Auto-Review → Full Access (Tab only completes). Accept Edits (default) applies edits inside the git repository and asks before commands. Ask prompts on every edit and command. Plan is read-only. Auto-Review uses rules and a reviewer model to approve routine calls and block high-risk ones. Full Access skips prompts and disables the OS sandbox (repository rules and managed policy still apply). See Modes.

In Ask, Accept Edits, and Auto-Review, commands run inside an OS sandbox where available: Seatbelt on macOS and bubblewrap on Linux (Windows has no OS sandbox yet). Sandboxed commands and terminal sessions cannot read credential paths such as ~/.ssh, ~/.aws, or .env files. Run /preview-request to inspect a redacted outgoing request before sending it.

API keys added with /provider stay on your machine, and local models require no key. /cost and the footer track session spend when pricing is known (an unknown price is shown as unknown, never as free).

Aggregate telemetry is enabled by default (version, OS, session length/outcome, built-in provider IDs, bundled public-catalog model IDs (custom, private, or local models map to other), aggregate token totals, built-in tool call/error counts, and feature/error counters; rotating 90-day random install ID; never code, prompts, conversations, custom/private model names, file/repo/branch names, credentials, or IP addresses). Disable it with:

codewhale config set telemetry false

At startup Codewhale also checks GitHub for a new release (CODEWHALE_NO_UPDATE_CHECK=1 to skip) and refreshes the public models.dev model catalog every 24 hours (CODEWHALE_DISABLE_MODELS_DEV_FETCH=1 or [catalog] auto_refresh = false to skip; suppressed automatically in CI and under DO_NOT_TRACK). Details: authorization order, sandboxing, and telemetry.

Documentation

Guides follow main and may describe changes not yet in the latest release.

Start here Reference
User guide Configuration
Installation Architecture
Providers and local models Runtime API
Modes and permissions Plugin authoring
Keybindings Receipts
GitHub pull request review All documentation

Contributing and license

Codewhale contributor wall

The contributor wall (scripts/contributor-wall.py) tracks code, co-authored commits, carried-forward PRs, and credited reports. Bug reports and feature proposals go to Issues, questions to Discussions, and contribution guidelines plus layout are in CONTRIBUTING.md (project structure). Join us on Discord or add hunterbown on WeChat for the Whale Brothers group.

Codewhale started as deepseek-tui and remains backward-compatible with its config and sessions. It is independently maintained and not affiliated with DeepSeek or any other model provider.

MIT. Third-party notices: vendored sources and adapted designs.

Codewhale (codewhale-hq/Codewhale)

正在搜索数据库…

这是什么?Codewhale 是一个开源的编码智能体,在终端里运行:它会读取你的项目、编辑文件、执行 shell 命令,并检查自己的工作成果。你可以选择任何托管或本地模型来使用。
它只是个终端工具,还是也有图形界面?它主要是通过 codewhale 启动的终端 TUI 界面,另外还可以运行 codewhale web 打开内置的本地网页客户端。桌面端和网页应用仍在开发中;社区维护的 VS Code 扩展则连接到同一个 Runtime。
我该怎么安装并开始使用?在 macOS/Linux 上安装 GitHub 官方发布版,或在 Windows 上安装对应的安装程序。你也可以通过 npm、Cargo、Docker、Nix、Scoop 或 Android/Termux 获取。然后在项目文件夹中打开终端,运行 codewhale。
我需要自己准备模型或 API 密钥吗?需要。首次运行时,你要连接一个托管服务商,或者设置本地模型;在连接其中之一之前,模型无法回复。本地模型可以通过 Ollama、vLLM 或 SGLang 运行。
更新日志里的每一条,我现在都能下载到吗?不能。更新日志可能描述的是下一版本尚未发布的候选版本,这些改动在该版本真正发布之前,不会出现在任何已发布的版本中。
我能控制智能体被允许做哪些事吗?审批模式(Ask、Auto-Review、Full Access)和仓库规则会限制智能体能做什么。即使是 Full Access,也要遵守硬性策略边界。在支持的系统上,可选的操作系统沙箱提供更强的执行边界。
我能把一个大任务拆给多个智能体一起做吗?可以。Codewhale 支持智能体团队:你可以把大型任务的各个部分交给使用不同模型、承担不同角色的智能体,并协调它们工作,同时不让它们的内部指令泄露到你的对话记录中。
这个项目为什么会和 Claude Code、Codex 等工具并存?Codewhale 最初是 deepseek-tui,仍保留该项目的配置和会话兼容性。但现在它与模型服务商无关,由独立团队维护,也不隶属于任何模型服务商。
我能接入自己的 MCP 服务器和技能吗?可以。你可以连接 MCP 服务器和技能,配置钩子(hooks),并把智能体角色保存为项目或个人设置中可读的文件。
如果智能体做了我不想要的改动怎么办?/undo 和 /restore 命令可以让你撤销智能体对工作区所做的更改。
大小
363.1 MB
星标
41.2K
时长
10个月
提交 · 90 天