| 1 | import Link from "next/link"; |
| 2 | import { AUTO_ROUTING_COPY } from "./faq-routing"; |
| 3 | import { GETTING_STARTED_STEPS } from "./getting-started"; |
| 4 | import { releaseView } from "../capabilities"; |
| 5 | import { FACTS } from "../facts.generated"; |
| 6 | |
| 7 | const RELEASED = releaseView(FACTS); |
| 8 | const ROUTES = RELEASED.counts?.providerRoutes ?? null; |
| 9 | const RELEASE_TAG = FACTS.latestPublishedRelease?.tag ?? ""; |
| 10 | import { pickText } from "../i18n/dictionaries"; |
| 11 | |
| 12 | interface FaqItem { |
| 13 | q: string; |
| 14 | a: React.ReactNode; |
| 15 | sources?: string[]; |
| 16 | } |
| 17 | |
| 18 | /** `p` prefixes a site path with the reader's locale. */ |
| 19 | type SitePath = (path: string) => string; |
| 20 | |
| 21 | export const faqEn = (p: SitePath): FaqItem[] => [ |
| 22 | { |
| 23 | q: "What is Codewhale?", |
| 24 | a: ( |
| 25 | <> |
| 26 | Codewhale is an open-source agent for building apps and tools, automating workflows, and working across files, terminal commands and connected apps. Add tools through plugins and MCP servers, or use APIs from your own scripts. Each service needs its own setup and authentication. Use the model APIs you already have or local and self-hosted inference. Start it with <code className="inline">codewhale</code> and choose the access and approvals for its work. DeepSeek is the bundled default route; the model and provider are yours to choose. |
| 27 | </> |
| 28 | ), |
| 29 | sources: ["README.md", "docs/GUIDE.md", "docs/PLUGINS.md", "docs/MCP.md", "docs/PROVIDERS.md"], |
| 30 | }, |
| 31 | { |
| 32 | q: "How do I install Codewhale?", |
| 33 | a: ( |
| 34 | <> |
| 35 | <p className="mb-2">Published channels differ in timing and platform support:</p> |
| 36 | <pre tabIndex={0} className="code-block mb-2"> |
| 37 | {`# GitHub release binaries (recommended on macOS / Linux) |
| 38 | ${GETTING_STARTED_STEPS[0].commands[0]} |
| 39 | |
| 40 | # npm alternative — no Rust toolchain needed |
| 41 | npm install -g codewhale |
| 42 | |
| 43 | # Cargo (needs Rust 1.89+; installs the codewhale command) |
| 44 | cargo install codewhale-cli --locked |
| 45 | |
| 46 | # Homebrew on Linux (tap; tested on Ubuntu) |
| 47 | brew install Hmbown/deepseek-tui/codewhale |
| 48 | |
| 49 | # Direct download |
| 50 | # https://github.com/codewhale-hq/CodeWhale/releases`} |
| 51 | </pre> |
| 52 | <p> |
| 53 | Run <code className="inline">codewhale</code> to start. First run creates <code className="inline">~/.codewhale/</code> automatically. Legacy <code className="inline">~/.deepseek/</code> is still read as a compatibility fallback. |
| 54 | Android arm64 / Termux is preview support: npm works only when the |
| 55 | selected package version has matching Android assets in its GitHub Release. |
| 56 | See the <Link href={p("/install")} className="body-link">full install guide</Link> for China mirrors, Docker, and troubleshooting. |
| 57 | </p> |
| 58 | </> |
| 59 | ), |
| 60 | sources: ["README.md", "docs/INSTALL.md", "#1860", "#1914"], |
| 61 | }, |
| 62 | { |
| 63 | q: "Is Codewhale free? Do I need an account?", |
| 64 | a: ( |
| 65 | <> |
| 66 | Codewhale is free and MIT licensed, and the terminal app needs no account. With your own API key you pay the provider directly; a model you run yourself needs no key. |
| 67 | Keys you add with <code className="inline">/provider</code> stay on your machine. The footer and <code className="inline">/cost</code> show what a session has cost when the price is known, and an unknown price is shown as unknown, never as free. |
| 68 | </> |
| 69 | ), |
| 70 | sources: ["README.md", "LICENSE"], |
| 71 | }, |
| 72 | { |
| 73 | q: "I use Claude Code, Cursor, or Copilot. What carries over?", |
| 74 | a: ( |
| 75 | <> |
| 76 | Codewhale reads <code className="inline">AGENTS.md</code> on its own. Instruction files written for other tools, such as <code className="inline">CLAUDE.md</code>, <code className="inline">.cursorrules</code> or <code className="inline">.github/copilot-instructions.md</code>, load only when you opt in with <code className="inline">project_instruction_imports = ["claude"]</code> (or <code className="inline">"cursor"</code>, <code className="inline">"cline"</code>, <code className="inline">"windsurf"</code>, <code className="inline">"copilot"</code>, <code className="inline">"all"</code>), and Codewhale warns when it finds one it did not load. |
| 77 | <code className="inline">/import-claude</code> prepares an import of your Claude Code settings and MCP servers for you to review. <code className="inline">/plugin install</code> accepts Claude Code plugins containing skills, commands, agent profiles and MCP servers, and refuses plugins that need hooks or LSP servers. |
| 78 | See <Link href={p("/docs/claude-code")} className="body-link">Move from Claude Code</Link>. |
| 79 | </> |
| 80 | ), |
| 81 | sources: ["README.md", "docs/CLAUDE_PLUGIN_COMPAT.md"], |
| 82 | }, |
| 83 | { |
| 84 | q: "Which operating systems does Codewhale run on?", |
| 85 | a: ( |
| 86 | <> |
| 87 | Release binaries cover Linux, macOS and Windows on x64 and arm64; the Linux binaries are static (musl). Android arm64 / Termux is preview support. |
| 88 | The OS command sandbox is Seatbelt on macOS and bubblewrap on Linux when it is installed. Windows has no OS sandbox yet, and Full Access turns the sandbox off on every platform. |
| 89 | See the <Link href={p("/install")} className="body-link">install guide</Link> for each platform. |
| 90 | </> |
| 91 | ), |
| 92 | sources: ["README.md", "docs/INSTALL.md", "docs/SANDBOX.md"], |
| 93 | }, |
| 94 | { |
| 95 | q: "Can I use Codewhale from VS Code?", |
| 96 | a: ( |
| 97 | <> |
| 98 | Yes. CodeWhale GUI (VS Code) is the community-maintained graphical frontend for the same engine: agent chat, threads, and file changes in a VS Code sidebar, over the local Runtime you already run. Install it from the <a href="https://marketplace.visualstudio.com/items?itemName=HengQuWorld.brotherwhale-vscode" className="body-link">VS Code Marketplace</a>; the source is on <a href="https://github.com/HengQuWorld/CodeWhale-VSCode" className="body-link">GitHub</a>. |
| 99 | </> |
| 100 | ), |
| 101 | sources: ["README.md"], |
| 102 | }, |
| 103 | { |
| 104 | q: "What's the difference between codewhale and codewhale-tui?", |
| 105 | a: ( |
| 106 | <> |
| 107 | Since v0.9.5 there is one compiled runtime: the <code className="inline">codewhale</code> command contains the terminal UI directly — there is no separate TUI executable to install. |
| 108 | Release installers also expose <code className="inline">codew</code> as a byte-identical short name, and <code className="inline">codewhale update</code> refreshes any legacy <code className="inline">codewhale-tui</code> command path from the same verified bytes. |
| 109 | <code className="inline">codewhale-tui</code> survives as the internal TUI crate compiled into the <code className="inline">codewhale-cli</code> Cargo package, so Cargo users install just <code className="inline">codewhale-cli</code>. |
| 110 | </> |
| 111 | ), |
| 112 | sources: ["README.md", "CHANGELOG.md"], |
| 113 | }, |
| 114 | { |
| 115 | q: "Is Codewhale the same as DeepSeek TUI? What about the rename?", |
| 116 | a: ( |
| 117 | <> |
| 118 | Yes. Codewhale is the new name for what was previously called DeepSeek TUI. |
| 119 | The canonical command is now <code className="inline">codewhale</code>. Legacy <code className="inline">deepseek</code> and <code className="inline">deepseek-tui</code> commands remain as compatibility shims — they still work. |
| 120 | Config lives at <code className="inline">~/.codewhale/</code>. Legacy <code className="inline">~/.deepseek/</code> config is still read as a compatibility fallback, and <code className="inline">DEEPSEEK_*</code> env vars continue to work. |
| 121 | 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. |
| 122 | </> |
| 123 | ), |
| 124 | sources: ["docs/REBRAND.md", "README.md"], |
| 125 | }, |
| 126 | { |
| 127 | q: "How do I set my API key?", |
| 128 | a: ( |
| 129 | <> |
| 130 | <pre tabIndex={0} className="code-block mb-2"> |
| 131 | {`# Method 1: Environment variable |
| 132 | export DEEPSEEK_API_KEY=sk-... |
| 133 | |
| 134 | # Method 2: Saved key (recommended — survives shell restarts) |
| 135 | codewhale auth set --provider deepseek # prompts for the key |
| 136 | # scripted: pipe it in with --api-key-stdin |
| 137 | |
| 138 | # Check what's active: |
| 139 | codewhale auth status # shows config, keyring, and env-var state |
| 140 | codewhale doctor # offline configuration checks`} |
| 141 | </pre> |
| 142 | <p> |
| 143 | Saved keys take precedence over environment variables. Avoid putting a key directly on the command line, where it lands in shell history. |
| 144 | Use <code className="inline">codewhale auth clear --provider deepseek</code> to remove a saved key. |
| 145 | </p> |
| 146 | <p> |
| 147 | To test a live connection, run <code className="inline">codewhale doctor --probe-api</code> for your hosted provider or <code className="inline">codewhale doctor --probe-local</code> for a local endpoint. The local probe may start a managed local service. |
| 148 | </p> |
| 149 | </> |
| 150 | ), |
| 151 | sources: ["#907", "#1545", "docs/CONFIGURATION.md"], |
| 152 | }, |
| 153 | { |
| 154 | q: "Which providers does Codewhale support?", |
| 155 | a: ( |
| 156 | <> |
| 157 | <p className="mb-2">{ROUTES !== null ? `Release ${RELEASE_TAG} declares ${ROUTES} built-in provider routes:` : "The built-in provider routes include:"}</p> |
| 158 | <ul className="list-disc pl-5 space-y-1 text-sm text-ink-soft mb-3"> |
| 159 | <li><strong>DeepSeek</strong> — bundled default with a native API route, reasoning streaming, cache metrics, and thinking effort control.</li> |
| 160 | <li><strong>Anthropic, OpenAI and Google</strong> — your own API account or plan for each, switchable per session.</li> |
| 161 | <li><strong>Any OpenAI-compatible endpoint</strong> — gateways and servers you host yourself, through the <code className="inline">openai</code> provider with a custom <code className="inline">base_url</code>.</li> |
| 162 | <li><strong>{ROUTES !== null ? `${ROUTES - 5} more routes` : "More routes"}</strong> — including xAI, Mistral AI, Moonshot/Kimi, Z.ai, MiniMax, StepFun, Volcengine Ark, Baidu Qianfan, Model Studio, NVIDIA NIM, Fireworks AI, Together AI, DeepInfra, SiliconFlow, Novita AI, Hugging Face, OpenRouter, and the keyless local endpoints SGLang, vLLM and Ollama. <Link href={p("/models")} className="body-link">The full list is generated from the provider registry</Link>.</li> |
| 163 | </ul> |
| 164 | <p> |
| 165 | Set the corresponding env var (e.g. <code className="inline">ANTHROPIC_API_KEY</code>) and your provider in <code className="inline">~/.codewhale/config.toml</code>. |
| 166 | Self-hosted OpenAI-compatible endpoints are supported through the provider config. |
| 167 | </p> |
| 168 | </> |
| 169 | ), |
| 170 | sources: ["docs/CONFIGURATION.md", "#1978", "#1710"], |
| 171 | }, |
| 172 | { |
| 173 | q: "How do I use a gateway or custom endpoint?", |
| 174 | a: ( |
| 175 | <> |
| 176 | <p className="mb-2"> |
| 177 | Use the <code className="inline">openai</code> provider with your endpoint. Put the provider and model before the provider table in <code className="inline">~/.codewhale/config.toml</code>: |
| 178 | </p> |
| 179 | <pre tabIndex={0} className="code-block mb-2"> |
| 180 | {`# ~/.codewhale/config.toml |
| 181 | provider = "openai" |
| 182 | default_text_model = "your-model-id" |
| 183 | |
| 184 | [providers.openai] |
| 185 | api_key = "YOUR_API_KEY" |
| 186 | base_url = "https://your-gateway.example/v1"`} |
| 187 | </pre> |
| 188 | <p> |
| 189 | The model ID is whatever the gateway expects. Pick the route with <code className="inline">--provider openai</code> or the top-level <code className="inline">provider</code> key. |
| 190 | </p> |
| 191 | </> |
| 192 | ), |
| 193 | sources: ["docs/CONFIGURATION.md"], |
| 194 | }, |
| 195 | { |
| 196 | q: "Can I use a self-hosted model or my own endpoint?", |
| 197 | a: ( |
| 198 | <> |
| 199 | Yes. Point the <code className="inline">openai</code> provider at any OpenAI-compatible server (llama.cpp, text-generation-webui, Aphrodite and others) with a custom <code className="inline">base_url</code>. |
| 200 | The <code className="inline">vllm</code> and <code className="inline">sglang</code> providers are built in, and <code className="inline">ollama</code> works too. |
| 201 | Codewhale also respects <code className="inline">DEEPSEEK_ALLOW_INSECURE_HTTP=true</code> for local HTTP endpoints. |
| 202 | Hugging Face Inference Providers are also available through the <code className="inline">huggingface</code> provider. Broader Hub discovery, model cards, datasets, and Jobs belong to Model Lab. |
| 203 | </> |
| 204 | ), |
| 205 | sources: ["#574", "#1303", "docs/CONFIGURATION.md"], |
| 206 | }, |
| 207 | { |
| 208 | q: "What are Plan and Work modes?", |
| 209 | a: ( |
| 210 | <> |
| 211 | <ul className="list-disc pl-5 space-y-2 text-sm text-ink-soft"> |
| 212 | <li><strong>Plan</strong>: Read-only investigation. Codewhale can grep, read files, list directories, and perform permitted research, but refuses file edits and shell commands.</li> |
| 213 | <li><strong>Work</strong>: Interactive work with files, commands, and connected tools. Tool availability and approval prompts follow your active configuration and permission posture.</li> |
| 214 | </ul> |
| 215 | <p className="mt-2"> |
| 216 | Press <kbd className="font-mono text-xs px-1.5 py-0.5 hairline-t hairline-b hairline-l hairline-r">Shift+Tab</kbd> to step the permission dial: Ask → Accept Edits → Plan → Auto-Review → Full Access. Plan selects Plan mode; every other stop runs Work with that permission posture. <kbd className="font-mono text-xs px-1.5 py-0.5 hairline-t hairline-b hairline-l hairline-r">Tab</kbd> completes commands, file mentions, and suggestions without changing modes. Operate was retired; <code className="inline">/mode operate</code> maps to Work. |
| 217 | </p> |
| 218 | </> |
| 219 | ), |
| 220 | sources: ["docs/MODES.md"], |
| 221 | }, |
| 222 | { |
| 223 | q: pickText(AUTO_ROUTING_COPY.question, "en"), |
| 224 | a: pickText(AUTO_ROUTING_COPY.answer, "en"), |
| 225 | sources: ["docs/CONFIGURATION.md"], |
| 226 | }, |
| 227 | { |
| 228 | q: "What does /goal do?", |
| 229 | a: ( |
| 230 | <> |
| 231 | <code className="inline">/goal</code> sets a goal for the current TUI session. |
| 232 | App-server clients can also persist a thread-scoped goal through the |
| 233 | <code className="inline">thread/goal/*</code> methods. It does not add another |
| 234 | app mode; the two modes remain Plan and Work, while the Shift+Tab permission dial selects Ask, Accept Edits, Plan, Auto-Review, or Full Access. |
| 235 | Track progress in <a href="https://github.com/codewhale-hq/CodeWhale/issues/891" className="body-link">#891</a>. |
| 236 | </> |
| 237 | ), |
| 238 | sources: ["#891"], |
| 239 | }, |
| 240 | { |
| 241 | q: "Is my code safe? What sandboxing does Codewhale use?", |
| 242 | a: ( |
| 243 | <> |
| 244 | The Codewhale runtime, workspace state, and audit log stay on your machine. |
| 245 | Codewhale counts anonymous usage by default and says so at first launch. |
| 246 | Turning it off is a saved choice that later versions keep; showing the notice |
| 247 | never records any acceptance on your behalf. While on, a |
| 248 | session posts aggregate session, feature, and error counts |
| 249 | and closed enums to a first-party endpoint at telemetry.codewhale.net, |
| 250 | a Cloudflare Worker whose full source is in the repository. Its storage has no IP, |
| 251 | country, or geo column, records no request logs, |
| 252 | and retains records for three months. Counts stay first-party only and are not |
| 253 | forwarded to third-party analytics processors. Set{" "} |
| 254 | <code className="inline">telemetry_endpoint = ""</code> to stay |
| 255 | enabled and contact nobody. It never carries conversations, code, prompts, |
| 256 | files, file/repo/branch names, model content, credentials, or a per-turn or |
| 257 | per-tool timeline (see the{" "} |
| 258 | <a href="https://github.com/codewhale-hq/CodeWhale/blob/main/docs/TELEMETRY.md" className="body-link">telemetry schema</a>; |
| 259 | off with <code className="inline">codewhale config set telemetry false</code> |
| 260 | or <code className="inline">CODEWHALE_TELEMETRY=0</code>). There is no |
| 261 | mandatory hosted relay. The hosted |
| 262 | provider you select receives the prompt, project context, tool definitions, |
| 263 | and tool results required for that turn. Use a loopback local-model route to |
| 264 | keep model inference local. |
| 265 | OS command sandboxing is platform-specific: Codewhale uses <strong>Seatbelt</strong> on macOS when available. On Linux it uses <strong>bubblewrap</strong> by default whenever <code className="inline">/usr/bin/bwrap</code> is installed and a probe shows it works; <code className="inline">prefer_bwrap = false</code> opts out. Otherwise commands have no Codewhale OS wrapper. Windows currently reports no OS sandbox. |
| 266 | Workspace boundaries default to <code className="inline">--workspace</code>. <code className="inline">/trust</code> lifts them. |
| 267 | Permission posture is configurable per session. |
| 268 | </> |
| 269 | ), |
| 270 | sources: [".github/SECURITY.md", "docs/PROVIDERS.md", "docs/RUNTIME_API.md"], |
| 271 | }, |
| 272 | { |
| 273 | q: "How do MCP servers work?", |
| 274 | a: ( |
| 275 | <> |
| 276 | Codewhale is a bidirectional MCP client and server. Define servers in <code className="inline">~/.codewhale/mcp.json</code>. |
| 277 | Tools appear as <code className="inline">mcp_<server>_<tool></code>. You can also expose Codewhale as an MCP server with <code className="inline">codewhale serve --mcp</code>. |
| 278 | See the <Link href={p("/docs/mcp")} className="body-link">docs page</Link> for configuration examples. |
| 279 | </> |
| 280 | ), |
| 281 | sources: ["docs/MCP.md"], |
| 282 | }, |
| 283 | { |
| 284 | q: "How do I contribute?", |
| 285 | a: ( |
| 286 | <> |
| 287 | No CLA required. Open a Contribution issue with a design, a failing test, or a link to your branch or patch; a maintainer brings it onto main, runs the checks, and credits you as author or co-author. |
| 288 | The maintainer reads everything personally. Start with issues labeled <code className="inline">good first issue</code>. |
| 289 | See the <Link href={p("/contribute")} className="body-link">contribute page</Link> and <a href="https://github.com/codewhale-hq/CodeWhale/blob/main/CONTRIBUTING.md" className="body-link">CONTRIBUTING.md</a>. |
| 290 | </> |
| 291 | ), |
| 292 | sources: ["CONTRIBUTING.md"], |
| 293 | }, |
| 294 | { |
| 295 | q: "I'm in China — how do I install? Downloads are slow.", |
| 296 | a: ( |
| 297 | <> |
| 298 | Use mirror registries: |
| 299 | <pre tabIndex={0} className="code-block my-2"> |
| 300 | {`# npm mirror |
| 301 | npm config set registry https://registry.npmmirror.com |
| 302 | npm install -g codewhale |
| 303 | |
| 304 | # Cargo mirror (Tsinghua TUNA) |
| 305 | # Add to ~/.cargo/config.toml: |
| 306 | [source.crates-io] |
| 307 | replace-with = "tuna" |
| 308 | [source.tuna] |
| 309 | registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"`} |
| 310 | </pre> |
| 311 | <p> |
| 312 | Prebuilt binaries are also available from <a href="https://github.com/codewhale-hq/CodeWhale/releases" className="body-link">GitHub Releases</a>. |
| 313 | A maintained CNB mirror covers its documented targets; no Gitee mirror is advertised until one exists. |
| 314 | </p> |
| 315 | </> |
| 316 | ), |
| 317 | sources: ["README.md", "#1914", "docs/CNB_MIRROR.md"], |
| 318 | }, |
| 319 | { |
| 320 | q: "Is codewhale.net the official site? What about mirrors?", |
| 321 | a: ( |
| 322 | <> |
| 323 | <p className="mb-2"> |
| 324 | <strong>codewhale.net</strong> and <strong>www.codewhale.net</strong> are the |
| 325 | official Codewhale sites, deployed on Cloudflare. The website source is open |
| 326 | and lives under <code className="inline">web/</code> in the{" "} |
| 327 | <code className="inline">codewhale-hq/CodeWhale</code> repository — anyone can |
| 328 | self-deploy it as a mirror. |
| 329 | </p> |
| 330 | <p className="mb-2"> |
| 331 | All official releases and SHA-256 checksums are distributed exclusively through{" "} |
| 332 | <a href="https://github.com/codewhale-hq/CodeWhale/releases" className="body-link">GitHub Releases</a>. |
| 333 | The npm package downloads verified binaries from GitHub Releases. |
| 334 | </p> |
| 335 | <p className="mb-2"> |
| 336 | A CNB mirror is maintained for users who cannot reliably reach GitHub |
| 337 | (<Link href={p("/install")} className="body-link">docs/CNB_MIRROR.md</Link>). |
| 338 | Cargo users can use the TUNA mirror for faster downloads in China. |
| 339 | </p> |
| 340 | <p> |
| 341 | Self-deployed website copies, mirror sites, and third-party packages are not |
| 342 | controlled by the Codewhale project. Verify download sources and checksums. |
| 343 | </p> |
| 344 | </> |
| 345 | ), |
| 346 | sources: ["#2624", "#3421", "docs/CNB_MIRROR.md"], |
| 347 | }, |
| 348 | { |
| 349 | q: "My API key was rejected or I get auth errors on first run.", |
| 350 | a: ( |
| 351 | <> |
| 352 | <p className="mb-2">Start with <code className="inline">codewhale doctor</code> for an offline report of configuration paths, declared credential sources and tool setup. It does not test live connectivity by default.</p> |
| 353 | <p className="mb-2">Use <code className="inline">codewhale doctor --probe-api</code> to explicitly test your hosted provider, or <code className="inline">codewhale doctor --probe-local</code> for a local endpoint. A local probe may start a managed local service.</p> |
| 354 | <p className="mb-2">Common causes:</p> |
| 355 | <ul className="list-disc pl-5 space-y-1 text-sm text-ink-soft"> |
| 356 | <li>Stale <code className="inline">DEEPSEEK_API_KEY</code> in shell startup file — open a fresh shell or use <code className="inline">codewhale auth set</code></li> |
| 357 | <li>Key from wrong provider — make sure the key matches the provider you're using</li> |
| 358 | <li>Network connectivity — check <code className="inline">curl https://api.deepseek.com/v1/models</code></li> |
| 359 | </ul> |
| 360 | </> |
| 361 | ), |
| 362 | sources: ["#907", "#1545", "docs/CONFIGURATION.md"], |
| 363 | }, |
| 364 | { |
| 365 | q: "What is Model Lab? What Hugging Face pieces are available?", |
| 366 | a: ( |
| 367 | <> |
| 368 | The <code className="inline">huggingface</code> provider is the shipped OpenAI-compatible route for Hugging Face Inference Providers. |
| 369 | Model Lab is the planned open-model infrastructure layer for Hub discovery, model cards, datasets, safetensors adapters, and Jobs. |
| 370 | Track broader progress in <a href="https://github.com/codewhale-hq/CodeWhale/issues/1977" className="body-link">#1977</a>. |
| 371 | </> |
| 372 | ), |
| 373 | sources: ["#1977", "docs/MODEL_LAB.md"], |
| 374 | }, |
| 375 | { |
| 376 | q: "Why is token consumption so high? / Why is cache hit rate low?", |
| 377 | a: pickText(AUTO_ROUTING_COPY.cache, "en"), |
| 378 | sources: ["docs/CONFIGURATION.md"], |
| 379 | }, |
| 380 | { |
| 381 | q: "How do I update Codewhale?", |
| 382 | a: ( |
| 383 | <> |
| 384 | <pre tabIndex={0} className="code-block mb-2"> |
| 385 | {`# Installer or release-binary installs |
| 386 | codewhale update |
| 387 | |
| 388 | # npm (codewhale update refuses npm installs) |
| 389 | npm install -g codewhale@latest |
| 390 | |
| 391 | # Cargo |
| 392 | cargo install codewhale-cli --locked --force |
| 393 | |
| 394 | # Homebrew tap |
| 395 | brew update && brew upgrade codewhale`} |
| 396 | </pre> |
| 397 | <p> |
| 398 | If you installed with npm or Homebrew, update through that package manager; <code className="inline">codewhale update</code> leaves package-managed installs unchanged. |
| 399 | If a mirror is lagging, download directly from <a href="https://github.com/codewhale-hq/CodeWhale/releases" className="body-link">GitHub Releases</a>. |
| 400 | </p> |
| 401 | </> |
| 402 | ), |
| 403 | sources: ["README.md", "#1869", "#1914"], |
| 404 | }, |
| 405 | ]; |
| 406 | |
| 407 | export const faqZh = (p: SitePath): FaqItem[] => [ |
| 408 | { |
| 409 | q: "Codewhale 是什么?", |
| 410 | a: ( |
| 411 | <> |
| 412 | Codewhale 是一个开源智能体,用于构建应用和工具、自动化工作流,并在文件、终端命令和已连接的应用之间完成任务。通过插件和 MCP 服务添加工具,或在自己的脚本中使用 API。每项服务都需要单独配置并完成身份验证。使用你已有的模型 API,或连接本地、自托管推理服务。运行 <code className="inline">codewhale</code> 启动,并设定访问范围和审批方式。DeepSeek 是内置默认路由,模型与提供商仍由你选择。 |
| 413 | </> |
| 414 | ), |
| 415 | sources: ["README.md", "docs/GUIDE.md", "docs/PLUGINS.md", "docs/MCP.md", "docs/PROVIDERS.md"], |
| 416 | }, |
| 417 | { |
| 418 | q: "如何安装 Codewhale?", |
| 419 | a: ( |
| 420 | <> |
| 421 | <p className="mb-2">已发布渠道的更新时间与平台覆盖各不相同:</p> |
| 422 | <pre tabIndex={0} className="code-block mb-2"> |
| 423 | {`# GitHub Releases 二进制(macOS / Linux 推荐方式) |
| 424 | ${GETTING_STARTED_STEPS[0].commands[0]} |
| 425 | |
| 426 | # npm 其他方式 — 无需 Rust 工具链 |
| 427 | npm install -g codewhale |
| 428 | |
| 429 | # Cargo(需要 Rust 1.89+;安装 codewhale 命令) |
| 430 | cargo install codewhale-cli --locked |
| 431 | |
| 432 | # Linux 上的 Homebrew(tap;已在 Ubuntu 上测试) |
| 433 | brew install Hmbown/deepseek-tui/codewhale |
| 434 | |
| 435 | # 直接下载 |
| 436 | # https://github.com/codewhale-hq/CodeWhale/releases`} |
| 437 | </pre> |
| 438 | <p> |
| 439 | 输入 <code className="inline">codewhale</code> 即可启动。首次运行会自动创建 <code className="inline">~/.codewhale/</code>。旧版 <code className="inline">~/.deepseek/</code> 仍会作为兼容回退读取。 |
| 440 | Android arm64 / Termux 仍是预览支持:只有当所选 npm 包版本对应的 GitHub Release 发布了匹配的 Android 资产时,npm 安装才可用。 |
| 441 | 查看 <Link href={p("/install")} className="body-link">完整安装指南</Link> 了解国内镜像、Docker 和故障排除。 |
| 442 | </p> |
| 443 | </> |
| 444 | ), |
| 445 | sources: ["README.md", "docs/INSTALL.md", "#1860", "#1914"], |
| 446 | }, |
| 447 | { |
| 448 | q: "Codewhale 免费吗?需要注册账号吗?", |
| 449 | a: ( |
| 450 | <> |
| 451 | Codewhale 免费,采用 MIT 许可证,终端应用无需账号。使用你自己的 API 密钥时,费用直接付给提供商;你自己运行的模型无需密钥。 |
| 452 | 通过 <code className="inline">/provider</code> 添加的密钥只保存在你的机器上。价格已知时,页脚和 <code className="inline">/cost</code> 会显示本次会话的花费;价格未知时显示为未知,绝不显示为免费。 |
| 453 | </> |
| 454 | ), |
| 455 | sources: ["README.md", "LICENSE"], |
| 456 | }, |
| 457 | { |
| 458 | q: "我在用 Claude Code、Cursor 或 Copilot,哪些设置可以沿用?", |
| 459 | a: ( |
| 460 | <> |
| 461 | Codewhale 会自动读取 <code className="inline">AGENTS.md</code>。为其他工具编写的指令文件,例如 <code className="inline">CLAUDE.md</code>、<code className="inline">.cursorrules</code> 或 <code className="inline">.github/copilot-instructions.md</code>,只有在你通过 <code className="inline">project_instruction_imports = ["claude"]</code>(或 <code className="inline">"cursor"</code>、<code className="inline">"cline"</code>、<code className="inline">"windsurf"</code>、<code className="inline">"copilot"</code>、<code className="inline">"all"</code>)选择启用时才会加载;发现未加载的文件时,Codewhale 会给出提示。 |
| 462 | <code className="inline">/import-claude</code> 会准备导入你的 Claude Code 设置和 MCP 服务器,供你审阅。<code className="inline">/plugin install</code> 接受包含技能、命令、智能体配置和 MCP 服务器的 Claude Code 插件,需要 hooks 或 LSP 服务器的插件会被拒绝。 |
| 463 | 详见<Link href={p("/docs/claude-code")} className="body-link">从 Claude Code 迁移</Link>。 |
| 464 | </> |
| 465 | ), |
| 466 | sources: ["README.md", "docs/CLAUDE_PLUGIN_COMPAT.md"], |
| 467 | }, |
| 468 | { |
| 469 | q: "Codewhale 支持哪些操作系统?", |
| 470 | a: ( |
| 471 | <> |
| 472 | 发布的二进制文件覆盖 x64 和 arm64 上的 Linux、macOS 和 Windows;Linux 二进制为静态链接(musl)。Android arm64 / Termux 为预览支持。 |
| 473 | 命令的系统沙箱在 macOS 上使用 Seatbelt,在 Linux 上安装了 bubblewrap 时使用 bubblewrap。Windows 目前没有系统沙箱,Full Access 在所有平台上都会关闭沙箱。 |
| 474 | 各平台的安装方式见<Link href={p("/install")} className="body-link">安装指南</Link>。 |
| 475 | </> |
| 476 | ), |
| 477 | sources: ["README.md", "docs/INSTALL.md", "docs/SANDBOX.md"], |
| 478 | }, |
| 479 | { |
| 480 | q: "可以在 VS Code 中使用 Codewhale 吗?", |
| 481 | a: ( |
| 482 | <> |
| 483 | 可以。CodeWhale GUI(VS Code)是社区维护的图形前端,运行同一个引擎:在 VS Code 侧边栏中对话、管理线程并查看文件变更,连接你本机已在运行的 Runtime。可从 <a href="https://marketplace.visualstudio.com/items?itemName=HengQuWorld.brotherwhale-vscode" className="body-link">VS Code Marketplace</a> 安装;源码见 <a href="https://github.com/HengQuWorld/CodeWhale-VSCode" className="body-link">GitHub</a>。 |
| 484 | </> |
| 485 | ), |
| 486 | sources: ["README.md"], |
| 487 | }, |
| 488 | { |
| 489 | q: "codewhale 和 codewhale-tui 有什么区别?", |
| 490 | a: ( |
| 491 | <> |
| 492 | 自 v0.9.5 起只有一个编译好的运行时:<code className="inline">codewhale</code> 命令直接内置终端 UI——不再有需要单独安装的 TUI 可执行文件。 |
| 493 | 发布安装器同时提供字节完全相同的 <code className="inline">codew</code> 短名称,<code className="inline">codewhale update</code> 会用同一份经过校验的字节刷新任何遗留的 <code className="inline">codewhale-tui</code> 命令路径。 |
| 494 | <code className="inline">codewhale-tui</code> 仅以内部 TUI crate 的形式存在,编译进 <code className="inline">codewhale-cli</code> Cargo 包,因此 Cargo 用户只需安装 <code className="inline">codewhale-cli</code>。 |
| 495 | </> |
| 496 | ), |
| 497 | sources: ["README.md", "CHANGELOG.md"], |
| 498 | }, |
| 499 | { |
| 500 | q: "Codewhale 和 DeepSeek TUI 是什么关系?改名是怎么回事?", |
| 501 | a: ( |
| 502 | <> |
| 503 | Codewhale 是 DeepSeek TUI 的新名称。当前的主命令是 <code className="inline">codewhale</code>。旧的 <code className="inline">deepseek</code> 和 <code className="inline">deepseek-tui</code> 命令作为兼容垫片继续有效。 |
| 504 | 配置存放在 <code className="inline">~/.codewhale/</code>。旧版 <code className="inline">~/.deepseek/</code> 配置仍会作为兼容回退读取,<code className="inline">DEEPSEEK_*</code> 环境变量继续有效。 |
| 505 | DeepSeek 并未被弃用。改名是为了体现 Codewhale 更广泛的使命——成为面向所有提供商的开放模型智能体终端,而非弱化 DeepSeek 的地位。 |
| 506 | </> |
| 507 | ), |
| 508 | sources: ["docs/REBRAND.md", "README.md"], |
| 509 | }, |
| 510 | { |
| 511 | q: "如何设置 API 密钥?", |
| 512 | a: ( |
| 513 | <> |
| 514 | <pre tabIndex={0} className="code-block mb-2"> |
| 515 | {`# 方法 1:环境变量 |
| 516 | export DEEPSEEK_API_KEY=sk-... |
| 517 | |
| 518 | # 方法 2:保存密钥(推荐 — 重启 Shell 后仍然有效) |
| 519 | codewhale auth set --provider deepseek # 会提示输入密钥 |
| 520 | # 脚本中:用 --api-key-stdin 通过管道传入 |
| 521 | |
| 522 | # 查看当前状态: |
| 523 | codewhale auth status # 显示配置、密钥环和环境变量状态 |
| 524 | codewhale doctor # 离线配置检查`} |
| 525 | </pre> |
| 526 | <p> |
| 527 | 已保存的密钥优先于环境变量。不要把密钥直接写在命令行里,否则会留在 Shell 历史中。 |
| 528 | 使用 <code className="inline">codewhale auth clear --provider deepseek</code> 移除已保存的密钥。 |
| 529 | </p> |
| 530 | <p> |
| 531 | 要实际测试连接,运行 <code className="inline">codewhale doctor --probe-api</code> 检查托管提供商,或用 <code className="inline">codewhale doctor --probe-local</code> 检查本地端点。本地探针可能启动由桌面应用管理的本地服务。 |
| 532 | </p> |
| 533 | </> |
| 534 | ), |
| 535 | sources: ["#907", "#1545", "docs/CONFIGURATION.md"], |
| 536 | }, |
| 537 | { |
| 538 | q: "Codewhale 支持哪些提供商?", |
| 539 | a: ( |
| 540 | <> |
| 541 | <p className="mb-2">{ROUTES !== null ? `${RELEASE_TAG} 版本声明了 ${ROUTES} 条内置提供商路由:` : "内置提供商路由包括:"}</p> |
| 542 | <ul className="list-disc pl-5 space-y-1 text-sm text-ink-soft mb-3"> |
| 543 | <li><strong>DeepSeek</strong> — 内置默认原生 API 路由,支持推理流、缓存指标和思考力度控制。</li> |
| 544 | <li><strong>Anthropic、OpenAI 和 Google</strong> — 使用你自己的 API 账户或套餐,可按会话切换。</li> |
| 545 | <li><strong>任何 OpenAI 兼容端点</strong> — 网关或你自己托管的服务,通过 <code className="inline">openai</code> 提供商并设置自定义 <code className="inline">base_url</code> 接入。</li> |
| 546 | <li><strong>{ROUTES !== null ? `另外 ${ROUTES - 5} 条路由` : "更多路由"}</strong>——包括 xAI、Mistral AI、Moonshot/Kimi、Z.ai、MiniMax、StepFun、Volcengine Ark、百度千帆、Model Studio、NVIDIA NIM、Fireworks、Together AI、DeepInfra、SiliconFlow、Novita、Hugging Face、OpenRouter,以及无需密钥的本地端点 SGLang、vLLM 和 Ollama。<Link href={p("/models")} className="body-link">完整列表由提供商注册表生成</Link>。</li> |
| 547 | </ul> |
| 548 | <p> |
| 549 | 设置对应的环境变量(如 <code className="inline">ANTHROPIC_API_KEY</code>)并在 <code className="inline">~/.codewhale/config.toml</code> 中配置你的提供商。 |
| 550 | 自托管 OpenAI 兼容端点可通过 provider 配置接入。 |
| 551 | </p> |
| 552 | </> |
| 553 | ), |
| 554 | sources: ["docs/CONFIGURATION.md", "#1978", "#1710"], |
| 555 | }, |
| 556 | { |
| 557 | q: "如何使用网关或自定义端点?", |
| 558 | a: ( |
| 559 | <> |
| 560 | <p className="mb-2"> |
| 561 | 使用 <code className="inline">openai</code> 提供商并指向你的端点。请在 <code className="inline">~/.codewhale/config.toml</code> 中把提供商和模型设置放在提供商配置表之前: |
| 562 | </p> |
| 563 | <pre tabIndex={0} className="code-block mb-2"> |
| 564 | {`# ~/.codewhale/config.toml |
| 565 | provider = "openai" |
| 566 | default_text_model = "your-model-id" |
| 567 | |
| 568 | [providers.openai] |
| 569 | api_key = "YOUR_API_KEY" |
| 570 | base_url = "https://your-gateway.example/v1"`} |
| 571 | </pre> |
| 572 | <p> |
| 573 | 模型 ID 以网关要求的为准。通过 <code className="inline">--provider openai</code> 或顶层 <code className="inline">provider</code> 选择路由。 |
| 574 | </p> |
| 575 | </> |
| 576 | ), |
| 577 | sources: ["docs/CONFIGURATION.md"], |
| 578 | }, |
| 579 | { |
| 580 | q: "可以使用自托管模型或我自己的端点吗?", |
| 581 | a: ( |
| 582 | <> |
| 583 | 可以。把 <code className="inline">openai</code> 提供商指向任何 OpenAI 兼容服务(llama.cpp、text-generation-webui、Aphrodite 等),并设置自定义 <code className="inline">base_url</code>。 |
| 584 | <code className="inline">vllm</code> 和 <code className="inline">sglang</code> 提供商已内置,<code className="inline">ollama</code> 同样可用。 |
| 585 | Codewhale 也支持 <code className="inline">DEEPSEEK_ALLOW_INSECURE_HTTP=true</code> 用于本地 HTTP 端点。 |
| 586 | Hugging Face Inference Providers 也可以通过 <code className="inline">huggingface</code> provider 使用。更完整的 Hub 发现、模型卡片、数据集和 Jobs 属于 Model Lab。 |
| 587 | </> |
| 588 | ), |
| 589 | sources: ["#574", "#1303", "docs/CONFIGURATION.md"], |
| 590 | }, |
| 591 | { |
| 592 | q: "Plan 和 Work 两种模式有什么区别?", |
| 593 | a: ( |
| 594 | <> |
| 595 | <ul className="list-disc pl-5 space-y-2 text-sm text-ink-soft"> |
| 596 | <li><strong>Plan(计划)</strong>:只读调查。Codewhale 可以 grep、读文件、列目录并进行策略允许的研究,但会拒绝文件修改与 Shell 命令。</li> |
| 597 | <li><strong>Work(执行)</strong>:交互式执行任务,可处理文件、运行命令并使用已连接的工具。工具是否可用以及何时请求批准,取决于当前配置和权限姿态。</li> |
| 598 | </ul> |
| 599 | <p className="mt-2"> |
| 600 | 按 <kbd className="font-mono text-xs px-1.5 py-0.5 hairline-t hairline-b hairline-l hairline-r">Shift+Tab</kbd> 切换权限拨盘:Ask → Accept Edits → Plan → Auto-Review → Full Access。Plan 档使用 Plan 模式,其余各档以对应权限姿态运行 Work。<kbd className="font-mono text-xs px-1.5 py-0.5 hairline-t hairline-b hairline-l hairline-r">Tab</kbd> 只补全命令、文件提及和建议,不会切换模式。Operate 已退役,<code className="inline">/mode operate</code> 会映射到 Work。 |
| 601 | </p> |
| 602 | </> |
| 603 | ), |
| 604 | sources: ["docs/MODES.md"], |
| 605 | }, |
| 606 | { |
| 607 | q: pickText(AUTO_ROUTING_COPY.question, "zh"), |
| 608 | a: pickText(AUTO_ROUTING_COPY.answer, "zh"), |
| 609 | sources: ["docs/CONFIGURATION.md"], |
| 610 | }, |
| 611 | { |
| 612 | q: "什么是 Goal 模式?现在可用吗?", |
| 613 | a: ( |
| 614 | <> |
| 615 | <code className="inline">/goal</code> 为当前 TUI 会话设置目标,支持 <code className="inline">pause</code>、<code className="inline">resume</code>、<code className="inline">complete</code>、<code className="inline">blocked</code> 和 <code className="inline">clear</code> 控制。 |
| 616 | App-server 客户端也可以通过 <code className="inline">thread/goal/*</code> 方法持久化线程范围的目标,支持 <code className="inline">set</code>、<code className="inline">get</code> 和 <code className="inline">clear</code>。 |
| 617 | 它不会新增一个应用模式;模式仍然是 Plan 和 Work,权限拨盘(Shift+Tab)在 Ask、Accept Edits、Plan、Auto-Review 和 Full Access 之间切换。 |
| 618 | 跟踪进展:<a href="https://github.com/codewhale-hq/CodeWhale/issues/891" className="body-link">#891</a>。 |
| 619 | </> |
| 620 | ), |
| 621 | sources: ["#891"], |
| 622 | }, |
| 623 | { |
| 624 | q: "我的代码安全吗?Codewhale 使用什么沙箱机制?", |
| 625 | a: ( |
| 626 | <> |
| 627 | Codewhale 运行时、工作区状态与审计日志保留在你的机器上。Codewhale 默认统计匿名使用量,并在首次启动时告知你。 |
| 628 | 关闭是会被后续版本保留的选择;显示告知绝不会代你记录任何同意。开启时,会话只会把聚合的会话、功能与错误计数以及封闭枚举 POST 到 telemetry.codewhale.net 上的第一方端点, |
| 629 | 那是一个 Cloudflare Worker,完整源码就在仓库里。 |
| 630 | 它的存储中没有 IP、国家或地理位置列,不记录请求日志,保留期固定为三个月。 |
| 631 | 计数仅保留在第一方,不转发给任何第三方分析处理方。 |
| 632 | 若想保持启用但不联系任何服务器,设置 <code className="inline">telemetry_endpoint = ""</code>。 |
| 633 | 它永远不会携带对话、代码、prompt、文件、文件/仓库/分支名、模型内容、凭据,也不发送逐轮或逐工具时间线(见<a href="https://github.com/codewhale-hq/CodeWhale/blob/main/docs/TELEMETRY.md" className="body-link">遥测 schema</a>; |
| 634 | 可用 <code className="inline">codewhale config set telemetry false</code> 或 |
| 635 | <code className="inline">CODEWHALE_TELEMETRY=0</code> 关闭)。也不要求经过托管中继。你选择的托管 provider 会收到本轮所需的 |
| 636 | prompt、项目上下文、工具定义与工具结果。若要让模型推理也保持本地,请使用回环地址上的本地模型路由。 |
| 637 | OS 命令沙箱因平台而异:macOS 在可用时使用 <strong>Seatbelt</strong>。Linux 默认在 <code className="inline">/usr/bin/bwrap</code> 已安装且探测可用时使用 <strong>bubblewrap</strong>;<code className="inline">prefer_bwrap = false</code> 退出。否则命令没有 Codewhale OS 包装器。Windows 当前报告无 OS 沙箱。 |
| 638 | 工作区边界默认为 <code className="inline">--workspace</code>。<code className="inline">/trust</code> 可解除边界。 |
| 639 | 权限姿态可按会话配置。 |
| 640 | </> |
| 641 | ), |
| 642 | sources: [".github/SECURITY.md", "docs/PROVIDERS.md", "docs/RUNTIME_API.md"], |
| 643 | }, |
| 644 | { |
| 645 | q: "MCP 服务器如何工作?", |
| 646 | a: ( |
| 647 | <> |
| 648 | Codewhale 是双向 MCP 客户端和服务器。在 <code className="inline">~/.codewhale/mcp.json</code> 中定义服务器。 |
| 649 | 工具以 <code className="inline">mcp_<server>_<tool></code> 形式呈现。你也可以通过 <code className="inline">codewhale serve --mcp</code> 将 Codewhale 暴露为 MCP 服务器。 |
| 650 | 查看 <Link href={p("/docs/mcp")} className="body-link">文档页面</Link> 了解配置示例。 |
| 651 | </> |
| 652 | ), |
| 653 | sources: ["docs/MCP.md"], |
| 654 | }, |
| 655 | { |
| 656 | q: "如何参与贡献?", |
| 657 | a: ( |
| 658 | <> |
| 659 | 无需签署 CLA。提交贡献 issue,附上设计、失败的测试,或你的分支、补丁的链接;维护者会把它合入 main、运行检查,并把你署为作者或共同作者。 |
| 660 | 维护者亲自阅读每一条内容。从标记为 <code className="inline">good first issue</code> 的议题开始。 |
| 661 | 查看 <Link href={p("/contribute")} className="body-link">贡献页面</Link> 和 <a href="https://github.com/codewhale-hq/CodeWhale/blob/main/CONTRIBUTING.md" className="body-link">CONTRIBUTING.md</a>。 |
| 662 | </> |
| 663 | ), |
| 664 | sources: ["CONTRIBUTING.md"], |
| 665 | }, |
| 666 | { |
| 667 | q: "我在国内,安装很慢怎么办?", |
| 668 | a: ( |
| 669 | <> |
| 670 | 使用镜像源: |
| 671 | <pre tabIndex={0} className="code-block my-2"> |
| 672 | {`# npm 镜像 |
| 673 | npm config set registry https://registry.npmmirror.com |
| 674 | npm install -g codewhale |
| 675 | |
| 676 | # Cargo 镜像(清华 TUNA) |
| 677 | # 在 ~/.cargo/config.toml 中添加: |
| 678 | [source.crates-io] |
| 679 | replace-with = "tuna" |
| 680 | [source.tuna] |
| 681 | registry = "sparse+https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"`} |
| 682 | </pre> |
| 683 | <p> |
| 684 | 也可以从 <a href="https://github.com/codewhale-hq/CodeWhale/releases" className="body-link">GitHub Releases</a> 直接下载预编译二进制。 |
| 685 | 维护中的 CNB 镜像覆盖其文档列出的目标;Gitee 镜像只有实际存在后才会对外展示。 |
| 686 | </p> |
| 687 | </> |
| 688 | ), |
| 689 | sources: ["README.md", "#1914", "docs/CNB_MIRROR.md"], |
| 690 | }, |
| 691 | { |
| 692 | q: "codewhale.net 是官方网站吗?镜像站点呢?", |
| 693 | a: ( |
| 694 | <> |
| 695 | <p className="mb-2"> |
| 696 | <strong>codewhale.net</strong> 和 <strong>www.codewhale.net</strong> 是 |
| 697 | Codewhale 的官方站点,部署在 Cloudflare 上。网站源码存放于{" "} |
| 698 | <code className="inline">codewhale-hq/CodeWhale</code> 仓库的{" "} |
| 699 | <code className="inline">web/</code> 目录下,任何人都可自行部署为镜像。 |
| 700 | </p> |
| 701 | <p className="mb-2"> |
| 702 | 所有正式发布和 SHA-256 校验文件仅通过{" "} |
| 703 | <a href="https://github.com/codewhale-hq/CodeWhale/releases" className="body-link">GitHub Releases</a> 分发。 |
| 704 | npm 包从 GitHub Releases 下载经校验的二进制。 |
| 705 | </p> |
| 706 | <p className="mb-2"> |
| 707 | 面向无法稳定访问 GitHub 的用户,提供 CNB 镜像( |
| 708 | <Link href={p("/install")} className="body-link">docs/CNB_MIRROR.md</Link>)。 |
| 709 | Cargo 用户可使用 TUNA 镜像在国内加速下载。 |
| 710 | </p> |
| 711 | <p> |
| 712 | 自行部署的网站副本、镜像站和第三方包不受 Codewhale 项目控制。 |
| 713 | 请验证下载来源和校验和。 |
| 714 | </p> |
| 715 | </> |
| 716 | ), |
| 717 | sources: ["#2624", "#3421", "docs/CNB_MIRROR.md"], |
| 718 | }, |
| 719 | { |
| 720 | q: "首次运行时提示 API 密钥被拒绝或认证错误?", |
| 721 | a: ( |
| 722 | <> |
| 723 | <p className="mb-2">先运行 <code className="inline">codewhale doctor</code>,查看配置路径、已声明的凭据来源和工具设置的离线报告。默认情况下,它不测试实际连接。</p> |
| 724 | <p className="mb-2">用 <code className="inline">codewhale doctor --probe-api</code> 明确测试托管提供商,或用 <code className="inline">codewhale doctor --probe-local</code> 检查本地端点。本地探针可能启动由桌面应用管理的本地服务。</p> |
| 725 | <p className="mb-2">常见原因:</p> |
| 726 | <ul className="list-disc pl-5 space-y-1 text-sm text-ink-soft"> |
| 727 | <li>Shell 启动文件中的 <code className="inline">DEEPSEEK_API_KEY</code> 已过期——打开新 Shell 或使用 <code className="inline">codewhale auth set</code></li> |
| 728 | <li>密钥来自错误的提供商——确保密钥与你使用的提供商匹配</li> |
| 729 | <li>网络连接问题——检查 <code className="inline">curl https://api.deepseek.com/v1/models</code></li> |
| 730 | </ul> |
| 731 | </> |
| 732 | ), |
| 733 | sources: ["#907", "#1545", "docs/CONFIGURATION.md"], |
| 734 | }, |
| 735 | { |
| 736 | q: "Model Lab 是什么?Hugging Face 哪些部分可用?", |
| 737 | a: ( |
| 738 | <> |
| 739 | <code className="inline">huggingface</code> provider 是已经接入的 OpenAI 兼容 Hugging Face Inference Providers 路由。 |
| 740 | Model Lab 是规划中的开放模型基础设施层:Hub 发现、模型卡片、数据集、safetensors 适配器和 Jobs。 |
| 741 | 更完整的进展见 <a href="https://github.com/codewhale-hq/CodeWhale/issues/1977" className="body-link">#1977</a>。 |
| 742 | </> |
| 743 | ), |
| 744 | sources: ["#1977", "docs/MODEL_LAB.md"], |
| 745 | }, |
| 746 | { |
| 747 | q: "为什么 token 消耗这么大?/ 缓存命中率为什么低?", |
| 748 | a: pickText(AUTO_ROUTING_COPY.cache, "zh"), |
| 749 | sources: ["docs/CONFIGURATION.md"], |
| 750 | }, |
| 751 | { |
| 752 | q: "如何更新 Codewhale?", |
| 753 | a: ( |
| 754 | <> |
| 755 | <pre tabIndex={0} className="code-block mb-2"> |
| 756 | {`# 安装器或发布二进制安装 |
| 757 | codewhale update |
| 758 | |
| 759 | # npm(codewhale update 不会更新 npm 安装) |
| 760 | npm install -g codewhale@latest |
| 761 | |
| 762 | # Cargo |
| 763 | cargo install codewhale-cli --locked --force |
| 764 | |
| 765 | # Homebrew tap |
| 766 | brew update && brew upgrade codewhale`} |
| 767 | </pre> |
| 768 | <p> |
| 769 | 如果通过 npm 或 Homebrew 安装,请用对应的包管理器更新;<code className="inline">codewhale update</code> 不会改动包管理器安装的版本。 |
| 770 | 如果镜像延迟,请从 <a href="https://github.com/codewhale-hq/CodeWhale/releases" className="body-link">GitHub Releases</a> 直接下载。 |
| 771 | </p> |
| 772 | </> |
| 773 | ), |
| 774 | sources: ["README.md", "#1869", "#1914"], |
| 775 | }, |
| 776 | ]; |
| 777 | |
| 778 |