cocode README

The project's README from github.com/cocode-agency/cocode. As one markdown file: README.md.

Cocode

A ready-to-run DeepSeek Harness distribution.

English · 简体中文

License: MIT

Most coding agents make the choices for you and take the choice away with them: which tools are available, how work gets scheduled, what the interface looks like — all settled upstream. Cocode wants the other half of that bargain. It makes the choices for you and leaves the screwdriver within reach: the default setup works the moment you install it, with nothing to study first, and when it doesn't fit you can open it up, see exactly how it was put together, and change it to your liking. Everything else in Cocode follows from that.

The runtime underneath is DeepSeek Harness, which makes an argument of its own: everything is a plugin. Models, tools, skills, sessions, sandboxes, and scheduling all come together through configuration, and Harness takes no position on what you should assemble. Cocode assembles one of those, and puts the assembly out in the open in the product instead of burying it in a config file.

Project status: Developer preview. Cocode is built on the DeepSeek Harness developer preview. It is an independent distribution, not an official DeepSeek product, and upstream compatibility may change. The repository supports source builds on macOS, Windows, and Linux; the current release scripts target macOS and Windows artifacts, and this repository does not include a hosted backend or a vendored Harness checkout.

Install and try it in five minutes

Use case Install Start
GUI Download the installer for your platform from the GitHub Releases page. Launch Cocode, then choose Cocode Pro with hosted Nut credits or your own DeepSeek-compatible key.
TUI Node.js 22.19.x or later (24+ is also supported), then npm install --global @cocode-agency/tui. Run cocode doctor, then cocode. A real terminal is required.
From source Follow the component-specific pnpm instructions below. Use make dev gui or make dev tui.

The published TUI package installs the matching @cocode-agency/host-supervisor automatically. For every release, keep @cocode-agency/tui and @cocode-agency/host-supervisor on the same version line; do not mix versions from different releases. GUI installers are downloaded separately from the matching GitHub Release and are not installed through npm. The current repository is a developer preview, so release availability and upstream Harness compatibility can change.

Five-minute first run

  1. Install the GUI from GitHub Releases, or run npm install --global @cocode-agency/tui.
  2. Start the GUI, or run cocode doctor followed by cocode in a real TTY.
  3. Choose Cocode Pro / Cocode Nut, or enter your own DeepSeek-compatible API key.
  4. Open a workspace and ask the agent to inspect a file or explain the project.
  5. If startup fails, save the output of cocode doctor and cocode host status --json for troubleshooting. Remove credentials and private session data before sharing diagnostics.

Why Cocode

The agent itself comes apart. Which tools a session runs, what prompts it carries, which capabilities are on — that is a plugin assembly called a preset, and you can read its agent.cordis.yml right in the interface. Four presets ship built in — Standard, PTC, Minimal, and Creator — and you copy one to make it yours. Elsewhere you get to swap the model. Here you get to swap the agent.

A workspace, not a chat box. Files, Git, a terminal, a built-in browser, and diff previews sit alongside the session. What the agent changed and what it ran is right there next to you, and you can take over by hand at any point instead of carrying context between windows.

The desktop and the terminal pick up the same session. GUI and TUI connect to the same Host and read and write the same session record. Push a task forward at your desk, then SSH in and continue from the terminal — presentation state never enters the session log, so any client can rebuild the full conversation from it.

The model is your call too. An official DeepSeek key, any OpenAI-compatible self-hosted or gateway endpoint, or Cocode Pro's hosted Cocode Nut service — all three are available, and you can switch between them.

Cocode is not trying to be another chat window. It won't parade a full chain of thought at you as a feature, and it won't hand the model every tool by default. What it wants to be is a workspace you trust with real work — and one you can reshape to your own liking.

Two entry points, one session

Cocode GUI A desktop workspace built on Electron. Sessions, files, terminals, and runtime state live on one surface. Diffs and attachments open in a preview panel, so you see exactly what changed before you confirm.
Cocode TUI A terminal client for keyboard-first and remote work. SSH into a machine and keep pushing tasks with no graphical environment required.

Both attach to the same Host through @cocode-agency/host-supervisor, so they can share sessions and task state when they use the same DSH_HOME, profile, and Host configuration scope. Switching between the desktop app and the terminal does not reset your work within that scope.

Cocode GUI

Cocode desktop workspace showing a DeepSeek Harness session

Cocode TUI

Cocode terminal interface showing a DeepSeek Harness session

Repository layout

This repository is not a single workspace. Each component is an independent pnpm workspace with its own lockfile and toolchain, tied together by a root Makefile.

cocode/
├── cocode-gui/               # Electron desktop / web GUI  (@cocode/gui-root)
├── cocode-tui/               # Terminal client             (@cocode-agency/tui)
├── cocode-host-supervisor/   # Shared DSH Host lifecycle   (@cocode-agency/host-supervisor)
├── Makefile                  # Root dev shortcuts
└── AGENTS.md                 # Engineering contract for contributors and agents

The runtime itself is not vendored here. @cocode-agency/host-supervisor pins @deepseek-ai/dsh from npm and owns the Supervisor service, the local IPC and lease protocol, runtime-slot materialization, and the Cocode JSON-RPC Host plugin. GUI and TUI never launch a Harness process themselves — they acquire a lease for a canonical DSH_HOME + profile + Host configuration scope and connect to the endpoint the Host advertises.

Cocode GUI ─┐
            ├─→ @cocode-agency/host-supervisor ─→ @deepseek-ai/dsh (npm) ─→ models · tools · sessions
Cocode TUI ─┘

Upgrading DSH

DSH is released as one exact release train in Cocode. The canonical target is cocode-host-supervisor/package.json's @deepseek-ai/dsh dependency; the GUI client packages and every packages/cocode/* plugin peer dependency must use that same version.

After changing the DSH package versions and refreshing both lockfiles, run the fast contract check first:

cd cocode-gui
corepack [email protected] install --frozen-lockfile --ignore-scripts
corepack [email protected] run check:dsh-contract

It checks all DSH declarations, installed package manifests, Cocode plugin manifests, browser plugin entrypoints, and every dsh.client.inject target. The complete gate rebuilds the plugins and Electron app, runs GUI/Host tests, stages a clean npm DSH runtime, and verifies its closure and hashes:

corepack [email protected] run check:dsh-compatibility

Do not treat a successful TypeScript build alone as compatibility proof. A DSH upgrade can change slot names, plugin injection, exported client entrypoints, or runtime dependency closure; the clean staging and runtime verification are what catch those integration breaks before release.

Requirements

The three components do not share a toolchain baseline. Check the one you plan to build:

Component Node.js pnpm
cocode-gui >=22.12.0 (see .nvmrc) 10.34.5 exactly
cocode-tui ^22.19 or >=24 any recent version
cocode-host-supervisor >=22.12.0 any recent version

Getting started

Every target below runs from the repository root.

# Desktop workspace: Electron client + Vite on :5273
make install-gui
make dev gui

# Terminal client (requires a TTY; preflight installs deps and refreshes the Host runtime)
make install-tui
make dev tui

# Browser-only GUI, useful for design-system work
make dev gui-web

# The Host on its own, for wire-protocol debugging
make install-dsh
make dev dsh

Run make with no arguments to list every target.

The cocode command

After installing the TUI or desktop build, cocode is the unified entry point. With no subcommand it keeps the existing behavior and opens the TUI. GUI, TUI, and Host management use the same environment-derived Host scope, so different clients can attach to the same Host.

cocode version                   # Show Cocode and bundled DSH versions
cocode --version                 # Print the installed Cocode version
cocode gui                       # Open the GUI
cocode tui                       # Open the TUI
cocode plugin list               # List plugins in the default cocode profile
cocode plugin --profile web list # List plugins in a selected DSH profile
cocode host status               # Inspect the shared Host without starting it
cocode host status --json        # Print machine-readable status
cocode host stop                 # Stop Host and Supervisor when no clients hold leases
cocode host stop --force         # Explicitly interrupt GUI/TUI clients that hold leases
cocode doctor                    # Check TUI, Supervisor, and Host connectivity

--dsh-home <path>, --profile <name>, and --runtime-channel stable|preview|dev can be placed before or after a subcommand to select the Host scope. If the GUI cannot be located automatically on a platform, set COCODE_GUI_EXECUTABLE (or the COCODE_GUI_PATH alias) to its executable path.

The GUI reuses a staged runtime in the OS cache directory. Two escape hatches when that cache goes stale:

DSH_FORCE_RESTAGE=1 make dev gui        # refresh the cache
DSH_DISABLE_RUNTIME_CACHE=1 make dev gui  # isolated runtime, no cache

Building distributables

make gui-build      # Electron Forge installers for the current platform

The canonical GUI release command is parameterized by platform and architecture:

cd cocode-gui
corepack [email protected] run release -- --platform darwin --arch arm64

The legacy release:<platform>:<arch> commands remain as compatibility aliases for existing automation.

The GUI is a private Electron workspace rather than an npm application package. The TUI and Host Supervisor have public publish configuration, but registry installation should only use matching versions listed in the same GitHub Release and npm release.

Getting a model

Cocode does not bundle a model and is not tied to one vendor. On first launch it asks you exactly one thing: use Cocode Pro with hosted Cocode Nut, or use your own key. Both can live on the same machine, and you can switch at any time.

Cocode Pro: subscription

Cocode Pro is the subscription plan for the Cocode GUI and TUI. It provides cycle-based Nut model credits, curated model access, paid-call priority, and one place to manage usage, billing, and automatic recharge. Cycle credits expire at period end; separately purchased Nut top-ups do not expire.

Cocode Nut: no API key to apply for

Cocode Nut is the hosted model service available with Cocode Pro. Sign in and call models through the desktop workspace, terminal, or an OpenAI-compatible personal API key — no upstream key to apply for or rotate.

Current Cocode Pro plans live at cocode.agency/pro; model endpoints and pricing live at cocode.agency/nut. Upgrade or cancel at any time. Identity tokens are stored in account.yaml under ~/.cocode, and the personal inference key is owned by the Host credentials service. Neither enters the session log.

Your own key

If you already have a DeepSeek API key, paste it on first launch. Cocode is a DeepSeek Harness distribution, so running entirely locally comes with no strings attached. The key is stored in the DSH credentials file under $DSH_HOME and likewise never enters the session log.

Relevant environment variables: DSH_HOME and DSH_PROFILE select the shared Host scope, COCODE_HOST_CONFIG_FINGERPRINT pins a custom Host composition, COCODE_HOME isolates Cocode credentials, and DSH_SESSION_ROOT relocates session files.

Documentation

CONTRIBUTING.md Contribution workflow, checks, and change boundaries
SECURITY.md Vulnerability reporting process
cocode-tui/docs/ TUI user guides, in English and Chinese
cocode-host-supervisor/README.md Supervisor lease protocol and client API
cocode-gui/README.md GUI development, packaging, and update behavior
THIRD_PARTY_NOTICES.md Third-party sources and license notices

Product documentation lives at doc.cocode.agency.

Contributing

Read CONTRIBUTING.md first — it covers the commit convention, which checks are mandatory, and how changes are scoped across the three components. Please keep changes focused on the component they affect and avoid committing local runtimes, caches, credentials, or generated output.

To report a security vulnerability, follow SECURITY.md rather than opening a public issue.

License

MIT © 2026 Cocode Agency.

Third-party components, including the npm-delivered DeepSeek Harness and Cordis framework, keep their own licenses. See THIRD_PARTY_NOTICES.md.


cocode.agency · Documentation · Download · Cocode Pro · Cocode Nut

cocode (cocode-agency/cocode)

Searching Database…

165 ·GitHub
这是什么?一套开箱即用的 DeepSeek Harness 编程代理发行版:包含一个桌面工作区应用和一个终端客户端,装好就能用,同时代码完全开放,可以查看和修改。
它是桌面应用还是终端工具?两者都是,共用同一个运行时:Electron 图形界面和以键盘为主的 TUI 连接到同一个 Host,共享同一条会话记录,工作可以在桌面和终端之间无缝切换,不用重置。底层运行时是 DeepSeek Harness,模型、工具、技能和会话全都是插件。
五分钟内怎么试起来?从 GitHub Releases 下载适合你系统的图形界面安装包,或者在使用 Node.js 22.19+ 的情况下运行 npm install --global @cocode-agency/tui,先用 cocode doctor 检查环境,再在真正的终端里运行 cocode。
我需要自己的 DeepSeek API 密钥吗?不需要。首次启动会提供 Cocode Pro 的托管 Nut 额度——有免费档,不用自己去申请上游密钥——你也可以粘贴自己的 DeepSeek 兼容密钥。
现在有多不成熟?这是一个开发者预览版:它是独立发行版,不是 DeepSeek 官方产品,上游 Harness 的兼容性和发布可用性都可能变化。
它能在 Linux 上运行吗,还是只支持 macOS 和 Windows?从源码构建可以在 macOS、Windows 和 Linux 上运行,但目前发布脚本只生成 macOS 和 Windows 的安装包,Linux 需要用 pnpm 从源码构建。npm 上的 TUI 在任何能跑 Node 的地方都能运行。
我能从远程服务器上操作它吗?可以——TUI 就是为这种场景设计的:SSH 到一台没有图形环境的服务器上,把任务持续丢给它跑。它没有托管后端;Host 跑在你自己的机器上,客户端连接到它。
能指向我自己的本地模型接口吗?可以——任何 OpenAI 兼容的自托管端点或网关端点都能用,用你自己的密钥完全本地运行也没有任何限制;托管服务和本地服务随时可以切换。
我的代码会被拿去训练吗?在 Cocode Pro 上,提示词、代码和响应不会用于训练,也不会被出售;请求内容除用于调用、计费和排查问题外不会保留;凭据不会写入会话日志。
Cocode 是开源的吗?是的,采用 MIT 协议。第三方组件(如通过 npm 分发的 DeepSeek Harness 和 Cordis 框架)保留各自的开源协议,详见 THIRDPARTYNOTICES.md。
代理本身可以自定义哪些东西?一次会话用哪些工具、带什么提示词、开启哪些能力——这些配置合在一起叫预设,本质是一份插件组合,可以直接在界面里以 agent.cordis.yml 的形式查看。内置四个预设(Standard、PTC、Minimal、Creator),复制一份就能改成你自己的:这里可以替换整个代理,而不只是换个模型。
为什么说它是工作区,而不是聊天框?文件、Git、终端、内置浏览器和差异预览都摆在会话旁边,代理改了什么、跑了什么,就在你眼前——你随时可以亲自动手接管,不用在多个窗口之间来回搬运上下文。
Cocode Pro 要多少钱?Cocode Nut 有免费档,无需预先付费。Pro 每月 10 美元起,可用高达 60 美元的模型用量——包括 DeepSeek V4 Pro 和 Flash(免费档只能用 Flash)——而且一个额度余额同时覆盖桌面应用和终端。
底层的 DeepSeek Harness 是什么?它是 Cocode 所依赖的基于插件的运行时:模型、工具、技能、会话、沙箱和调度都通过配置组合到一起。Cocode 通过其 host-supervisor 从 npm 锁定一个 DSH 发布系列,并以公开的方式交付这套组合。
Size
15.4 MB
Stars
165
Age
2mo
Commits · 90 Days