@wsl8297: 平时拿 DeepSeek 写代码的人,可以看看 DeepSeek-Code-Whale。 GitHub:https://github.com/usewhale/DeepSeek-Code-Whale… 开源终端 AI 编程 Agent,专…

X AI KOLs Timeline 工具

摘要

DeepSeek-Code-Whale 是一个开源的终端 AI 编程代理,专门为 DeepSeek 模型优化,支持 MCP 工具、Skills 扩展、前缀缓存优化(90% 缓存命中率)和 1M 上下文窗口,旨在降低 AI 编程成本并提供高效的命令行工作流。

平时拿 DeepSeek 写代码的人,可以看看 DeepSeek-Code-Whale。 GitHub:https://github.com/usewhale/DeepSeek-Code-Whale… 开源终端 AI 编程 Agent,专为 DeepSeek 模型优化,支持 MCP 工具、Skills 扩展、代码任务执行、前缀缓存优化(90% 缓存命中率)、1M 上下文窗口、git worktree 隔离、read-only /ask 模式、/plan 规划模式。 适用场景: • 想降低 AI 编程成本、需要高缓存命中率的长时间开发会话 • 习惯命令行工作流、希望把 DeepSeek 接进完整 coding workflow 的开发者 • 需要 MCP 工具集成、Skills 复用、git worktree 隔离的项目 • 希望 read-only 分析与实际执行分离、降低误操作风险的谨慎型用户 如果你想搭一套偏本地、偏命令行的开发助手,这个可以收进候选。
查看原文
查看缓存全文

缓存时间: 2026/05/23 12:10

平时拿 DeepSeek 写代码的人,可以看看 DeepSeek-Code-Whale。

GitHub:https://github.com/usewhale/DeepSeek-Code-Whale…

开源终端 AI 编程 Agent,专为 DeepSeek 模型优化,支持 MCP 工具、Skills 扩展、代码任务执行、前缀缓存优化(90% 缓存命中率)、1M 上下文窗口、git worktree 隔离、read-only /ask 模式、/plan 规划模式。

适用场景: • 想降低 AI 编程成本、需要高缓存命中率的长时间开发会话 • 习惯命令行工作流、希望把 DeepSeek 接进完整 coding workflow 的开发者 • 需要 MCP 工具集成、Skills 复用、git worktree 隔离的项目 • 希望 read-only 分析与实际执行分离、降低误操作风险的谨慎型用户

如果你想搭一套偏本地、偏命令行的开发助手,这个可以收进候选。


usewhale/DeepSeek-Code-Whale

Source: https://github.com/usewhale/DeepSeek-Code-Whale

Whale

Whale — DeepSeek-native coding agent for the terminal

简体中文 · English

release CI license GitHub stars

Whale is an unofficial DeepSeek CLI / DeepSeek coding agent for the terminal.
It can read code, edit files, run commands, and extend the agent with MCP and Skills.

90% live prefix-cache hit · ~30x cheaper per task vs Claude Code · terminal-first · open source

📋 Roadmap · View current direction and available tasks


Quick Start

Install with the script:

curl -fsSL https://raw.githubusercontent.com/usewhale/DeepSeek-Code-Whale/main/scripts/install.sh | sh

Install with Homebrew:

brew install usewhale/tap/whale

Windows PowerShell:

irm https://raw.githubusercontent.com/usewhale/DeepSeek-Code-Whale/main/scripts/install.ps1 | iex

Windows CMD (Command Prompt):

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/usewhale/DeepSeek-Code-Whale/main/scripts/install.ps1 | iex"

The installer prefers the Windows x64 or ARM64 package for your system and adds whale.exe to the current user’s PATH. If an older release does not include an ARM64 package, it falls back to x64 emulation. You can also download the matching Windows zip manually from GitHub Releases.

First run:

whale setup
whale doctor
whale

Upgrade:

brew upgrade usewhale/tap/whale
# or rerun the install script

Whale currently uses the DeepSeek API. Before running Whale, create an API key in the DeepSeek Platform. See the DeepSeek API docs for API details.

Platform support: Whale currently supports macOS, Linux, and Windows.

You can also run a one-shot prompt:

whale exec "Explain what this repository does"
printf 'Summarize the current directory\n' | whale exec

How It Compares

WhaleClaude CodeCodex CLICursorAider
Primary interfaceTerminal TUI/CLITerminal agentTerminal agentIDECLI
Default backendDeepSeekAnthropicOpenAIMulti-modelMulti-model
DeepSeek optimizedyesnononolimited
Prefix-cache friendlyyesn/an/amodel-dependentlimited
Local code read/writeyesyesyesyesyes
Shell / test executionyesyesyespartialyes
/ask read-only modeyespartialpartialn/apartial
/plan planning modeyesyesyesn/apartial
MCPyesyesversion-dependentpartialpartial
Skills / reusable workflowsyesyesyespartiallimited
Open sourceyesnoyesnoyes

Whale is not trying to support every model. Its focus is turning the DeepSeek API into a stable, low-cost local coding agent that can stay open for long development sessions.

Why DeepSeek-only?

DeepSeek’s low token price is only part of the story. The real advantage for long-running coding agents is prefix caching.

DeepSeek’s prefix cache is sensitive to byte stability. Whale’s loop is designed around that constraint: append-only turns, stable context ordering, and recoverable session records help long tasks keep benefiting from cached prefixes.

That is why Whale is not rushing toward a generic provider abstraction. Claude, OpenAI, and DeepSeek differ in cache mechanics, tool-call behavior, and reasoning controls. A generic wrapper usually hides the DeepSeek-specific parts that matter most.

Whale includes DeepSeek-specific handling for:

Generic agent assumptionWhat DeepSeek can doWhale’s handling
Tool-call JSON is stablePayloads can be malformed, escaped, or mixed into reasoningschema-guided repair / scavenge paths
Deep tool schemas survive intactSome nested parameters may be droppedflatter tool parameters
Failed tools should always trigger replanSome failures should pass through to the modelfiner failure classification and recovery
User cancellation is just another tool failureCancellation should not continue recovery or replanningdedicated interrupt path
Reasoning depth is prompt-onlyDeepSeek exposes reasoning_effortruntime effort control

Whale validates tool inputs against the schema first, then repairs common recoverable shape errors only on failing paths: null optional fields, stringified arrays, bare strings for array fields, markdown-autolink paths, and read_file calls that provide only offset or limit. Repair and invalid-input counts are visible in /stats.

Whale’s goal is to make DeepSeek’s pricing, cache behavior, and coding capability usable in a real terminal workflow.


What Whale Can Do

  • Understand codebases: read files, search code, and summarize project structure.
  • Modify code: generate patches, edit files, add tests, fix bugs, and handle local refactors.
  • Run commands: execute shell commands, tests, builds, and diagnostic scripts, then bring results back into the conversation.
  • Work interactively: use the local TUI, persist sessions, and resume with whale resume.
  • Ask read-only questions: use /ask when you want analysis without file edits.
  • Plan before execution: use /plan to review a plan before letting the agent implement it.
  • Extend tools: connect external tools with MCP and reuse workflows with Skills.
  • Run headlessly: use whale exec from scripts, CI, or one-shot tasks.
  • 1M context window: DeepSeek V4 models automatically use 1M token context with no manual config.

Common Commands

CommandPurpose
whaleStart the interactive TUI
whale setupSave a DeepSeek API key
whale doctorRun health checks
whale exec "prompt"Run one prompt non-interactively
whale --worktree [name]Create or reuse an isolated git worktree for this interactive session
whale exec --worktree [name] "prompt"Run one prompt inside an isolated git worktree
whale --dangerously-skip-permissionsSkip tool approval prompts for this run; suitable for external sandboxes or fully trusted repos
whale migrate-configMigrate Whale v0.1.8-or-earlier config files to config.toml
whale resumeOpen the session picker
whale resume --lastResume the most recent session
whale resume <id>Resume a specific session
/modelChange model, reasoning effort, and thinking
/permissionsAdjust tool approval mode
/focusToggle focused view to hide thinking and tool details
/ask [prompt]Read-only question mode
/plan [prompt]Plan first, then decide whether to execute
/review [target]Build a code-review prompt for local changes, branches, PRs, or commits
/statusShow current session, mode, model, and config status
/compactCompact the current conversation context
/initGenerate AGENTS.md for the current repository
/skillsOpen the Skills menu to list, insert, or enable/disable local skills
/pluginsOpen the built-in plugin manager to enable or disable official plugins
/memoryView or manage long-term memory saved by the official memory plugin
/mcpShow MCP server status

MCP

Whale can load external tools from MCP servers.

See docs/mcp.md for setup and supported features.

Skills

Whale supports local Agent Skills for reusable workflows, team conventions, or tool-specific guidance.

In the TUI, type $ to search and insert a $skill-name. You can also run /skills: List skills opens the same $ picker and inserts the selected skill into the composer, while Enable/Disable Skills opens a searchable toggle manager.

See docs/skills.md for details.

Plugins / Memory

Whale currently ships with the official memory plugin for saving and recalling long-term memory. Use /memory to view or manage memories, and /plugins to open the plugin manager and press Space to enable or disable plugins.

See docs/plugins.md for details.

Configuration

Whale uses ~/.whale/config.toml for global settings, ./.whale/config.toml for shared project settings, and ./.whale/config.local.toml for private project-local overrides. Config loads in this order:

defaults < global < project shared < project local < CLI flags/env

Run this only if you used Whale v0.1.8 or earlier and have local preferences.json or settings.json files:

whale migrate-config

If you started with Whale v0.1.9 or newer, you do not need this command.

See docs/configuration.md for details.

Worktrees

In a git repository, use --worktree to create or reuse an isolated worktree for the current run:

whale --worktree feature-x
whale exec --worktree feature-x "implement and test this change"

Whale stores managed worktrees under ./.whale/worktrees/<name> and uses branches named worktree-<name>. If you omit the name, Whale generates a session-* name. On creation, Whale best-effort copies only ./.whale/config.local.toml; it does not copy session logs, API keys, private MCP config, or the whole ./.whale directory.

When you exit an interactive worktree session, Whale removes a clean worktree automatically. If the worktree has uncommitted files or commits after the original checkout head, Whale prompts you to keep or remove it. Removing a worktree discards that checkout and its uncommitted changes, but it does not delete the conversation — whale resume <id> resumes from the original workspace.

whale exec --worktree runs non-interactively and leaves its worktree on disk. To review and clean it up, re-enter it interactively with whale --worktree <name> and exit, which runs the same cleanup prompt. This version does not yet include tmux or stale sweeping.

Coding Plan Support

Yes. Whale connects to Coding Plan / third-party DeepSeek-compatible endpoints via a custom API endpoint that supports /chat/completions.

For Alibaba Cloud Bailian, configure ~/.whale/config.toml:

model = "deepseek-v4-flash"
reasoning_effort = "high"
thinking_enabled = true

[api]
base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"

Then set the corresponding API key:

DEEPSEEK_API_KEY=sk-... whale

Or run:

whale setup

Notes:

  • base_url should be the root endpoint — do not include /chat/completions. Whale appends it automatically.
  • The DEEPSEEK_BASE_URL environment variable overrides [api].base_url in ~/.whale/config.toml.
  • Whale still prioritizes DeepSeek-native models, streaming, thinking, tool calls, and prefix-cache workflows. Full compatibility with third-party endpoints depends on server-side support.

Non-goals

  • Not a generic multi-model wrapper. Whale is DeepSeek-only for now and prioritizes DeepSeek’s cache, tool-call, and cost advantages.
  • Not an IDE. Whale is terminal-first and works with your shell, git, and test commands instead of replacing IDEs like Cursor.

Project Status

Whale is moving quickly. It is best used first on personal projects, experimental repositories, or workflows where changes can be reviewed and rolled back.

Disclaimer: This project is not affiliated with DeepSeek Inc. It is an independent open-source community project.

Contributing

See CONTRIBUTING.md for cloning, local development, testing, issues, and pull requests.

Current development direction and available tasks are listed in ROADMAP.md.

Security

For security-sensitive issues, see SECURITY.md.

相似文章

@jakevin7: https://x.com/jakevin7/status/2086031167040426488

X AI KOLs Timeline

Maka 是一个开源 Agent Harness,通过日志即运行时、上下文剪枝、thinking 回传等机制,将同一 DeepSeek 任务的成本降至 OpenCode 的 1/8,并在 Terminal-Bench 上以更低成本取得更高通过率。

deepseek-ai/awesome-deepseek-agent

GitHub Trending (daily)

一份精心整理的 GitHub 列表,提供将 DeepSeek 模型集成到流行 AI 代理和编程助手工具(如 Claude Code、Cline、GitHub Copilot 等)的指南,包含安装和配置教程。

Hmbown/DeepSeek-TUI

GitHub Trending (daily)

一种基于终端的用户界面工具,作为 DeepSeek AI 模型的编程代理。