Skip to content

[建议 / Feature] 桌面版自带 CLI 的 tui 不可用(缺 @zcode/tui 包),并请求独立 CLI 发行版 #270

Closed as not planned

Description

@zuiailaoda

提交前确认 · Pre-submission checklist

  • 我已搜索过现有 issue,确认这不是重复提议 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.

问题类别 · Category

功能建议 / Feature request(兼打包问题)

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

使用场景 · Use case

桌面版自带了一个可用的 CLI(<安装目录>\resources\glm\zcode.cjs,当前 CLI 版本 0.16.3),除 tui 外的子命令均正常:

  • zcode skills list / doctor / commands / plugins / login / app-server / --version 实测正常;
  • 但 zcode tui 以及不带参数直接运行(--help 中明确写着 "With no command, zcode opens the full-screen TUI")都直接报错:
Error: Cannot find package '@zcode/tui' imported from F:\soft\ZCode\resources\glm\zcode.cjs

原因看起来是桌面版打包时 resources/glm/packages/ 只带了 7 个 plugin 包,没有包含 @zcode/tui(zcode.cjs 中存在对 @zcode/tui/dist/index.js 的引用,但包不在安装目录里)。

同时,官网 zcode.z.ai 目前只提供桌面安装包,没有任何独立 CLI 发行版的下载渠道(也没有公开的 npm 包)。结果是:终端/命令行用户想用 TUI(SSH 远程、tmux、无头环境、脚本化工作流)完全没有可用路径——CLI 帮助文本里宣传的默认行为在桌面安装下必然报错。

相关但不同:#8 请求的是 Linux 版本与 CLI 入口本身;本 issue 指向的是桌面版自带的 CLI 缺 TUI 包与缺少独立 CLI 分发渠道这两件事。

建议方案 · Proposal

二选一(或都做):

  1. 把 @zcode/tui 补进桌面版打包:在 resources/glm/packages/ 中随包分发 @zcode/tui,使 zcode tui 与无参数启动在桌面安装下按帮助文本宣传的那样工作;
  2. 提供独立 CLI 发行版:像同类工具(Claude Code 的 npm 包 / 安装脚本、Gemini CLI 等)一样,提供独立安装渠道(npm 包 @zcode/cli 或官网单独的 CLI 下载链接),让不装桌面版的用户(尤其是 Linux/SSH/容器环境)也能使用完整 CLI 与 TUI。

若 TUI 仅限独立发行版启用是刻意的产品决策,至少请:

  • 从桌面版 CLI 的 --help 中移除/修正 tui 与 "With no command, zcode opens the full-screen TUI" 的描述,或在执行时给出明确的引导提示(而不是裸的 Cannot find package 堆栈);
  • 在官方文档中说明桌面版与独立 CLI 的能力差异。

预期价值 · Expected value

  • 终端用户、远程/无头环境(SSH、tmux、WSL、容器、CI)获得可用的命令行体验,不再被桌面版打包缺口挡住;
  • 消除"帮助文本宣传的功能必然报错"的困惑,降低排障与支持成本;
  • 独立 CLI 渠道可扩大用户面(服务器侧开发者的刚需),对齐同类 agent CLI 工具的分发惯例;
  • 与 [建议 / Feature] Linux版本和ZCode Agent CLI #8 的诉求互补,共同补齐 CLI 一等公民的体验。

你认为的优先级 · Your perceived priority

高 · High(对终端/远程用户是功能完全不可用,而非体验问题)

你使用的 ZCode 版本 / 环境 · ZCode version / environment

  • ZCode 桌面版 v3.7.x(Windows x64,安装于 F:\soft\ZCode,待更新 3.7.7)
  • 自带 CLI 0.16.3(resources/glm/zcode.cjs,使用系统 Node 运行)
  • 复现:node <安装目录>\resources\glm\zcode.cjs tui 或无参数运行,均报 Cannot find package '@zcode/tui'

补充材料 · Additional context

  • 桌面版安装目录 resources/glm/packages/ 实际内容(无 @zcode/tui):android-emulator-plugin、browser-use-plugin、document-skills-plugin、ios-simulator-plugin、restore-legacy-sessions-plugin、skill-creator-plugin、zcode-guide-plugin
  • zcode.cjs 内存在字符串引用 @zcode/tui/dist/index.js
  • 相关 issue:[建议 / Feature] Linux版本和ZCode Agent CLI #8(Linux 版本与 ZCode Agent CLI 建议)

Activity

  1. github-actions commented on Aug 14, 2026

    @github-actions

    👋 感谢你的反馈,我们已经收到。

    • 维护者会在 3 个工作日内 给出首次响应。
    • 状态保持为 status: 待评估,你可以随时补充信息。
    • 信息不全时我们会打上 needs: 更多信息 标签并 @ 你。

    👋 Thanks — we've received your issue.

    • A maintainer will respond within 3 business days.
    • Status stays at status: 待评估 (Triage); feel free to add context.
    • If we need more details, we'll add needs: 更多信息 and ping you.
  2. panda920 commented on Aug 17, 2026

    @panda920
    Collaborator

    这条和 #29 是同一个问题,已合并到 #29 统一跟进。

    共同根因:ZCode 目前只能通过桌面端交互使用。社区需要一个可被 shell/CI/git hook 调用的非交互执行入口,以及一个可独立安装、TUI 可用的 CLI 发行版(桌面端内置的 zcode.cjs 缺 @zcode/tui 包)。

    合并是为了让研发看到完整上下文,而不是同一件事被拆成 5 条各自跟进。你的反馈没有丢——我已经在 #29 里把这几条一起列了出来,后续进展都会更新在那边,建议去 #29 点一下 Subscribe。

    如果你认为这其实是另一个问题,直接回复本条,我们会重新拆开。


    This is the same problem as #29, and is now tracked there.

    Shared root cause: ZCode can only be driven interactively from the desktop app today. The community needs a non-interactive entry point callable from shell / CI / git hooks, plus a standalone CLI distribution with a working TUI (the bundled zcode.cjs is missing the @zcode/tui package).

    We're consolidating so the team sees one complete picture instead of the same thing split across 5 issues. Nothing is lost — your report is listed in #29, all updates will go there, and you're welcome to subscribe to it.

    If you think this is actually a different problem, reply here and we'll split it back out.

  3. added
    duplicate
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicatepriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions