DSH Hub
Martty cover

openma-ai/Martty

Martty

ToolTerminal80 GitHub stars· updated 2026-10-27

Unified Harness TUI (ACP client). Self-Improvement TUI plugin of DeepSeek Harness. Everything Here Is Also A Plugin.

Install

npx @deepseek-ai/dsh plugin --profile martty add martty@latest

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

Martty DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/martty.svg)](https://dshhub.dev/plugins/martty)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from openma-ai/Martty, cleaned of badges and images.

<h1 align="center">Martty</h1>

DSH-first Agent TUI,使用与 DSH 同款的 Cordis 插件能力,也可连接其他兼容 ACP agent。

<a href="README.md">中文</a> · <a href="README.en.md">English</a>

快速开始

通过 npm install 安装时,本机需已安装 Node.js,且可能需要 pnpm。

AI agent / 自动化安装步骤见 Agent 安装说明。

全局安装后启动:

npm install --global martty
martty-cli   # 首次启动会创建 `martty` 命令,之后直接运行 `martty`

不想安装到全局,可以直接运行:

npx --yes martty

Martty 内置 ACP 连接层,默认启动并连接 DSH。已有 DSH 环境时,也可以把 Martty 安装到独立 profile,交给 DSH 管理插件和升级:

npm install --global @deepseek-ai/dsh
dsh plugin --profile martty add martty@latest
dsh --profile martty

已经装好这样的 profile 时,也可以从 npm 入口直接连到全局 dsh:

npx martty --dsh martty     # 等价于 dsh --profile martty,先做版本检查

dsh plugin add 由 dsh 通过 pnpm 安装插件。Martty 不声明任何安装脚本 (preinstall/install/postinstall),因此在 pnpm 严格的 build-scripts 策略下 (ERR_PNPM_IGNORED_BUILDS)也能直接安装,无需 --ignore-scripts 或批准构建。 之前用 0.3.2 及更早版本安装失败过的 profile(martty 已是依赖却不在 dsh.profile.bundles 中,重复 add 无效),先执行 dsh plugin --profile martty remove martty 再重新 add。

只想看界面,可以运行:

martty --demo
martty --demo-skin

Agent UI

Martty 在终端中呈现完整的 agent 工作过程,包括流式回复、推理、工具调用、 subagent、Plan、token 用量和持久化会话。图片可以从文件或剪贴板加入 prompt; 工具输出、Markdown、代码块和图片预览都使用终端原生交互。

回合运行时可以继续排队消息,也可以立即 steer 当前 agent。会话通过 /new、 /resume 和 --session-id 管理,workspace、模型、权限和界面选择会随会话恢复。

<img src="assets/screenshots/agent-turn.png" width="720" alt="Martty 中的 Markdown 回复、工具调用和运行状态" />

常用操作:

按键 / 命令行为
enter发送消息;composer 为空且 Queue 非空时立即发送队首
ctrl+enter立即 steer 当前 agent(macOS 也可用 ⌘⏎)
alt+↑选择任意 Queue 条目;↑/↓ 移动,enter 编辑,ctrl+d 删除
↓ · ←/→ · enter空输入时展开 Agent 导航、移动并打开;esc 折叠
esc中断当前回合并保留草稿
/打开命令与参数候选
/model · /agent选择模型和 Agent Preset
/harness [id]在 TUI 内切换 Harness 并启动新的空会话
/permission · shift+tab选择或轮换权限模式
/image <path> · /clip添加本地图片或剪贴板图片
!cmd在 workspace 的会话级本地 shell 中执行命令
/help · /keys查看命令与快捷键
/vim切换 vim 模态编辑(默认关闭;normal 模式 h/j/k/l 移动、dd 删行、i 插入)

文本编辑(composer 输入框)

按键行为
← / →移动光标(ctrl+b / ctrl+f)
↑ / ↓按屏幕行移动(多行草稿)
home / end行首 / 行尾(ctrl+a / ctrl+e;macOS ⌘←/→)
alt+← / alt+→按词移动(Linux/Win ctrl+←/→)
⌫ / delete删除前 / 后一个字符
ctrl+w删除光标前一个词
ctrl+k / ctrl+u删到行尾 / 行首(macOS ⌘⌫ 删到行首)
ctrl+shift+k删除整行
ctrl+z / ctrl+shift+z撤销 / 重做(macOS ⌘z / ⌘⇧z)
ctrl+y粘贴最近删除的文本(yank)
shift+←/→/↑/↓ · shift+home/end扩展选区
ctrl+shift+c / ctrl+x复制 / 剪切选区(键盘与鼠标拖选均适用)
shift+enter / ctrl+j草稿内换行

完整的编辑快捷键、鼠标操作(点击定位、拖选复制)与开发者集成说明,见 Composer 输入控件文档。

插件系统

Martty 的界面不是一组写死的开关。UI、主题、Slot、命令、Overlay 和 Session 视图 都由 Cordis Plugin 组合,并随 Plugin 生命周期一起加载和卸载。这套插件系统也是 Martty 的自进化路径:Agent 可以读取当前能力,创建新的界面 Plugin,并在运行中继续 观察和修改。

一个 Cordis Plugin Package 可以包含两个部分:

Cordis Plugin Package
├── code.host       # 可选,运行在 Host Cordis tree
└── code.client     # 可选,运行在 Martty Client Cordis tree

只包含 code.host 是 Host-only,只包含 code.client 是 Client-only,两者都有就是 双向 Plugin。双向 Plugin 仍是一个 Plugin run;Client half 可以通过 host.call(method, args) 调用同一 run 的 Host half。

四个 Plugin 视图

…

Related plugins