Modes模式
Three operating modes — orthogonal to the approval system. Cycle with Tab.
Read-only investigation. The agent can grep, read files, list dirs, fetch URLs — never write or shell out.
Default. Multi-step tool use. Shell and side-effectful tools require approval per `approval_mode`.
Auto-approve everything + enable trust mode. Workspace boundary lifts. Use carefully.
Tools工具
Curated surface — see docs/TOOL_SURFACE.md for design rationale.
Approval & Sandbox审批
Mode and approval are independent axes. Set via /config.
Default — uses per-mode rules. Asks before risky ops.
Auto-approve all tool calls. Equivalent to YOLO without trust.
Block anything not safe / read-only. Investigation only.
Sandbox: bwrap, landlock (Linux), process_hardening, seatbelt (macOS), seccomp. Workspace boundary defaults to --workspace. /trust lifts the boundary.
Configuration配置
# ~/.codewhale/config.toml api_key = "sk-..." base_url = "https://api.deepseek.com" default_text_model = "deepseek-v4-pro" [ui] default_mode = "agent" # plan | agent | yolo approval_mode = "suggest" # suggest | auto | never reasoning_effort = "high" # off | high | max [hooks] enabled = true default_timeout_secs = 30 [[hooks.hooks]] event = "session_start" # tool_call_before / tool_call_after / message_submit / mode_change / on_error / shell_env command = "~/.codewhale/hooks/pre.sh"
Full reference: config.example.toml.
MCP ServersMCP
codewhale speaks the Model Context Protocol both ways: as a client (loads servers from ~/.codewhale/mcp.json) and as a server (codewhale mcp). Tools surface as mcp_<server>_<tool>.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me"]
},
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "./data.db"]
}
}
}Skills技能
A skill is a folder under ~/.codewhale/skills/<name>/ with a SKILL.md at the root. The agent loads skill names + descriptions on startup and can pull in the full body via the Skill tool when relevant.
Finauto-routing
Fin is CodeWhale's model auto-routing layer. It analyses each task — complexity, context size, tool needs — and dispatches to the best model backend automatically.
Lightweight turns (file ops, fetch, simple shell) auto-route to a flash-tier model for lower latency and cost.
Complex reasoning, large refactors, multi-step plans escalate to a full-size reasoning model.
Providers提供商
Switch with codewhale auth set --provider <id>. The table below is a live projection of the ApiProvider enum in crates/tui/src/config.rs — currently 12 providers.
Open-model direction: support is expanding for OpenRouter, Hugging Face, and self-hosted endpoints — from cloud APIs to local deployments.