FAQ 常见问题
Answers sourced from real code, docs, release notes, and GitHub issues. Sources are cited below each answer. If your question isn't covered, open an issue on GitHub.
01What is Codewhale?+
codewhale command, streams reasoning blocks, edits local workspaces with approval gates, and can route each turn to a configured model and thinking level. DeepSeek is the bundled default route, while OpenRouter, Anthropic, OpenAI-compatible services, and self-hosted runtimes use the same runtime and tools.02How do I install Codewhale?+
Published channels differ in timing and platform support:
# npm (recommended — no Rust toolchain needed) npm install -g codewhale # Cargo (needs Rust 1.88+; installs the codewhale command) cargo install codewhale-cli --locked # Homebrew (macOS) brew tap Hmbown/deepseek-tui && brew install codewhale # Direct download # https://github.com/Hmbown/CodeWhale/releases
Run codewhale to start. First run creates ~/.codewhale/ automatically. Legacy ~/.deepseek/ is still read as a compatibility fallback. Android arm64 / Termux is preview support: npm works only when the selected package version has matching Android assets in its GitHub Release. See the full install guide for China mirrors, Docker, and troubleshooting.
03What's the difference between codewhale and codewhale-tui?+
codewhale command contains the terminal UI directly — there is no separate TUI executable to install. Release installers also expose codew as a byte-identical short name, and codewhale update refreshes any legacy codewhale-tui command path from the same verified bytes.codewhale-tui survives as the internal TUI crate compiled into the codewhale-cli Cargo package, so Cargo users install just codewhale-cli.04Is Codewhale the same as DeepSeek TUI? What about the rename?+
codewhale. Legacy deepseek and deepseek-tui commands remain as compatibility shims — they still work. Config lives at ~/.codewhale/. Legacy ~/.deepseek/ config is still read as a compatibility fallback, and DEEPSEEK_* env vars continue to work. DeepSeek is not deprecated. The rename reflects a mission idea put in this version: Codewhale as an agentic terminal for open models across providers, not a narrowing away from DeepSeek.05How do I set my API key?+
# Method 1: Environment variable export DEEPSEEK_API_KEY=sk-... # Method 2: Saved config (recommended — survives shell restarts) codewhale auth set --provider deepseek --api-key sk-... # Method 3: config.toml # Add to ~/.codewhale/config.toml: api_key = "sk-..." # Check what's active: codewhale auth status # shows config, keyring, and env-var state codewhale doctor # full connectivity check
Saved config keys take precedence over environment variables. Use codewhale auth clear --provider deepseek to remove a saved key.
06Which providers does Codewhale support?+
Codewhale ships with 45 built-in provider routes:
- DeepSeek — bundled default with a native API route, reasoning streaming, cache metrics, and thinking effort control.
- OpenRouter — unified API for DeepSeek models and other open-model routes.
- 43 more routes — including OpenAI-compatible, Anthropic, Mistral AI, OpenAI Codex, xAI, Moonshot/Kimi, Z.ai, MiniMax, StepFun, Volcengine Ark, Baidu Qianfan, Model Studio, NVIDIA NIM, Fireworks AI, Together AI, DeepInfra, SiliconFlow, Novita AI, Hugging Face, Arcee AI, AtlasCloud, and the keyless local endpoints SGLang, vLLM, and Ollama. The full list is generated from the provider registry.
Set the corresponding env var (e.g. OPENROUTER_API_KEY) and your provider in ~/.codewhale/config.toml. Self-hosted OpenAI-compatible endpoints are supported through the provider config.
07How do I use OpenRouter with Codewhale?+
# 1. Set your OpenRouter key export OPENROUTER_API_KEY=sk-or-v1-... # 2. In ~/.codewhale/config.toml: [providers.openrouter] api_key = "sk-or-v1-..." # 3. Run with the OpenRouter route: codewhale --provider openrouter --model deepseek/deepseek-v4-pro # Or make it the default route in config.toml: # provider = "openrouter" # default_text_model = "deepseek/deepseek-v4-pro"
OpenRouter uses the same reasoning/cache parser as the native DeepSeek provider. Model IDs are OpenRouter's own slugs (e.g. deepseek/deepseek-v4-flash); pick the route with --provider openrouter or top-level provider = "openrouter".
08Can I use self-hosted or local models (vLLM, Ollama, llama.cpp)?+
vllm, sglang, or ollama providers with your local endpoint. For OpenAI-compatible endpoints (llama.cpp server, text-generation-webui, Aphrodite, etc.), you can use the openai provider with a custom base_url. Codewhale also respects DEEPSEEK_ALLOW_INSECURE_HTTP=true for local HTTP endpoints. Hugging Face Inference Providers are also available through the huggingface provider. Broader Hub discovery, model cards, datasets, and Jobs belong to Model Lab.09What are Plan, Work, and Operate modes?+
- Plan — Read-only investigation. Can grep, read files, list directories, fetch URLs. Cannot write or execute shell.
- Work — Normal interactive coding. Tool availability and approval prompts follow the active configuration and permission posture.
- Operate — Direct tools follow the same permission, sandbox, shell, and safety rules as Work. Fleet workers are preferred for independent, parallel, background, or long-running work, but delegation is not mandatory. Workflow is optional for ordered phases and gates.
When the composer is idle, press Tab to cycle modes. Press Shift+Tab to cycle the independent Ask / Auto-Review / Full Access permission posture; Plan remains read-only.
10What is model auto-routing? What is Fin?+
Use codewhale --model auto or /model auto to let Codewhale decide how much model power each turn needs.
Fin is the fast non-thinking path (deepseek-v4-flash with thinking off) used for routing decisions, summaries, RLM children, context maintenance, and other coordination work. Before the real turn is sent, Fin makes a small routing call to pick the concrete model and thinking level.
Short/simple turns can stay on Flash with thinking off. Coding, debugging, release work, architecture, or security review can move up to Pro and/or higher thinking. Fin is local to Codewhale — the upstream API never receives model: "auto".
11What does /goal do?+
/goal sets a goal for the current TUI session. App-server clients can also persist a thread-scoped goal through thethread/goal/* methods. It does not add another app mode; the mode switcher remains Plan, Work, and Operate, while permission posture is selected independently. Track progress in #891.12Is my code safe? What sandboxing does Codewhale use?+
https://telemetry.codewhale.net/v1/telemetry, a Cloudflare Worker whose full source is in the repo under telemetry-ingest/. Its storage has no IP, country, or geo column — structurally, not as a setting — nothing is logged, and retention is a fixed three months. Set telemetry_endpoint = "" to stay enabled and contact nobody. It never carries conversations, code, prompts, files, file/repo/branch names, model content, credentials, or a per-turn or per-tool timeline (schema: docs/TELEMETRY.md; off with codewhale config set telemetry falseor CODEWHALE_TELEMETRY=0). There is no mandatory hosted relay. The hosted provider you select receives the prompt, project context, tool definitions, and tool results required for that turn. Use a loopback local-model route to keep model inference local. OS command sandboxing is platform-specific: Codewhale uses Seatbelt on macOS when available. On Linux it uses bubblewrap only when prefer_bwrap = true and /usr/bin/bwrap is executable; otherwise commands have no Codewhale OS wrapper. Windows currently reports no OS sandbox. Workspace boundaries default to --workspace. /trust lifts them. Permission posture is configurable per session.13How do MCP servers work?+
~/.codewhale/mcp.json. Tools appear as mcp_<server>_<tool>. You can also expose Codewhale as an MCP server with codewhale mcp. See the docs page for configuration examples.14How do I contribute?+
feat:, fix:, etc.), run the local checks, open a PR. The maintainer reads everything personally. Start with issues labeled good first issue. See the contribute page and CONTRIBUTING.md.15I'm in China — how do I install? Downloads are slow.+
# npm mirror npm config set registry https://registry.npmmirror.com npm install -g codewhale # Cargo mirror (Tsinghua TUNA) # Add to ~/.cargo/config.toml: [source.crates-io] replace-with = "tuna" [source.tuna] registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"
Prebuilt binaries are also available from GitHub Releases. A maintained CNB mirror covers its documented targets; no Gitee mirror is advertised until one exists.
16Is codewhale.net the official site? What about mirrors?+
codewhale.net and www.codewhale.net are the official Codewhale sites, deployed on Cloudflare. The website source is open and lives under web/ in the Hmbown/CodeWhale repository — anyone can self-deploy it as a mirror.
All official releases and SHA-256 checksums are distributed exclusively through GitHub Releases. The npm package downloads verified binaries from GitHub Releases.
A CNB mirror is maintained for users who cannot reliably reach GitHub (docs/CNB_MIRROR.md). Cargo users can use the TUNA mirror for faster downloads in China.
Self-deployed website copies, mirror sites, and third-party packages are not controlled by the Codewhale project. Verify download sources and checksums.
17My API key was rejected or I get auth errors on first run.+
Run codewhale doctor — it prints a diagnostic report to stdout: config paths, credential-store state (values are never read or printed), provider/local/MCP probes, and release checks.
Common causes:
- Stale
DEEPSEEK_API_KEYin shell startup file — open a fresh shell or usecodewhale auth set - Key from wrong provider — make sure the key matches the provider you're using
- Network connectivity — check
curl https://api.deepseek.com/v1/models
18What is Model Lab? What Hugging Face pieces are available?+
huggingface provider is the shipped OpenAI-compatible route for Hugging Face Inference Providers. Model Lab is the planned open-model infrastructure layer for Hub discovery, model cards, datasets, safetensors adapters, and Jobs. Track broader progress in #1977.19Why is token consumption so high? / Why is cache hit rate low?+
deepseek-v4-pro for simple queries better suited to Flash? Model auto-routing (Fin) can help pick the right model per turn. Cache hit rate depends on prompt stability — modifying the system prompt or switching models resets the cache.20How do I update Codewhale?+
# Release-binary updater (works for npm/release-binary installs) codewhale update # npm npm install -g codewhale@latest # Cargo cargo install codewhale-cli --locked --force # Homebrew brew update && brew upgrade codewhale
If you installed via npm, codewhale update downloads the latest release binaries. If a mirror is lagging, download directly from GitHub Releases.
Didn't find your question?
Open an issue →