univer-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Univer CLI

Univer CLI

Terminal-native authoring and inspection for multi-Unit
.univer
files. The CLI provides isolated worktrees, version-matched Facade guidance, model readback, and browser review.
Install:
bash
npm install -g univer-cli
univer doctor
面向多Unit的
.univer
文件的终端原生创作与检查工具。该CLI提供隔离的工作树、版本匹配的Facade指引、模型回读以及浏览器预览功能。
安装:
bash
npm install -g univer-cli
univer doctor

Keep the CLI current

保持CLI为最新版本

Use these commands to compare the installed CLI with the latest public release:
bash
univer --version
npm view univer-cli@latest version --registry=https://registry.npmjs.org/
When a newer version is available, complete the current Univer task before updating:
bash
univer update
univer doctor --json
univer skills get core
If
univer update
reports that the shared daemon must stop, rerun it with
--force
after confirming that stopping the daemon is safe. Reload core and the target Unit Skill after every update.
使用以下命令对比已安装的CLI与最新公开版本:
bash
univer --version
npm view univer-cli@latest version --registry=https://registry.npmjs.org/
当有新版本可用时,请完成当前Univer任务后再进行更新:
bash
univer update
univer doctor --json
univer skills get core
如果
univer update
提示必须停止共享守护进程,请确认停止守护进程安全后,添加
--force
参数重新运行。每次更新后重新加载核心及目标Unit Skill。

Start here

入门指南

This file is the discovery entry, not the operational guide. Before using Univer commands for a task, load the complete core Skill from the installed CLI:
bash
univer skills get core          # shared model, workflow, evidence, and handoff
univer skills get core --full   # include direct references and templates
Runtime Skills ship with the CLI so their commands and Facade APIs match the installed version.
本文档是发现入口,而非操作指南。在使用Univer命令执行任务前,请从已安装的CLI中加载完整的核心Skill:
bash
univer skills get core          # 共享模型、工作流、验证信息及交接功能
univer skills get core --full   # 包含直接引用及模板
运行时Skill随CLI一同发布,因此其命令及Facade API与已安装版本匹配。

Core Model

核心模型

  • A
    .univer
    path is the authoritative multi-Unit target. Always address the file explicitly.
  • A Unit is a top-level Sheet, Doc, Slide, Base, or Board identified by
    unitId
    ; sheet names, pages, tables, ranges, shapes, and records live inside that Unit.
  • trunk
    is the reviewed main line. A worktree is an isolated scope for agent changes; there is no implicit current worktree.
  • Command success is not correctness evidence. Read back the target model, verify task-specific assertions, and inspect rendered output when appearance matters.
Use public CLI and Facade surfaces. The worktree commit path is the durable write boundary, and merge remains an explicit review decision.
  • .univer
    路径是权威的多Unit目标。请始终明确指定该文件。
  • Unit是由
    unitId
    标识的顶级表格(Sheet)、文档(Doc)、幻灯片(Slide)、Base或Board;表格名称、页面、数据表、范围、形状及记录均存在于该Unit内部。
  • trunk
    是已审核的主线。工作树(worktree)是用于隔离Agent变更的作用域;不存在隐式当前工作树。
  • 命令执行成功并不等同于结果正确。当外观重要时,请回读目标模型、验证任务特定断言并检查渲染输出。
请使用公开的CLI及Facade接口。工作树提交路径是持久化写入边界,合并仍是明确的审核决策。

Unit Skills

Unit Skills

After core, load the Skill matching the target top-level Unit before authoring:
bash
univer skills get sheet
univer skills get doc
univer skills get slide
univer skills get base
univer skills get board
Use
univer skills list
to discover the installed set. Each Unit Skill owns its creation recipe, Facade entrypoints, readback guidance, and visual verification requirements.
For cross-Unit composition, load the additional Topic Skill after the host and child Unit Skills:
bash
univer skills get embed
For a cross-Unit formula in a Sheet cell or formula-driven Shape, load its Topic Skill after the Host and Sheet or Base Source Unit Skills:
bash
univer skills get cross-unit-formula
加载核心Skill后,请在创作前加载与目标顶级Unit匹配的Skill:
bash
univer skills get sheet
univer skills get doc
univer skills get slide
univer skills get base
univer skills get board
使用
univer skills list
查看已安装的Skill集合。每个Unit Skill负责其创建流程、Facade入口、回读指引及视觉验证要求。
对于跨Unit组合,请在加载宿主及子Unit Skill后,额外加载Topic Skill:
bash
univer skills get embed
对于表格单元格中的跨Unit公式或公式驱动的形状,请在加载宿主及表格或Base源Unit Skill后,加载对应的Topic Skill:
bash
univer skills get cross-unit-formula

Task Routing

任务路由

TaskLoad and use
Inspect or edit spreadsheet values, formulas, formatting, charts, or tablescore +
sheet
Create or refine document paragraphs, rich text, tables, charts, or page layoutcore +
doc
Build or review presentation pages, shapes, text, or imagescore +
slide
Create or edit structured Base tables, fields, records, or viewscore +
base
Create or edit a Board canvas, charts, and other elementscore +
board
Embed one Unit inside another Unitcore + host Unit + child Unit +
embed
Read a Sheet range or Base table column from a Sheet cell or formula-driven Shapecore + Host Unit + Source Unit +
cross-unit-formula
任务需加载并使用的Skill
检查或编辑电子表格的值、公式、格式、图表或数据表core +
sheet
创建或优化文档段落、富文本、表格、图表或页面布局core +
doc
制作或审核演示页面、形状、文本或图片core +
slide
创建或编辑结构化Base数据表、字段、记录或视图core +
base
创建或编辑Board画布、图表及其他元素core +
board
将一个Unit嵌入另一个Unitcore + 宿主Unit + 子Unit +
embed
从表格单元格或公式驱动的形状中读取表格范围或Base数据表列core + 宿主Unit + 源Unit +
cross-unit-formula

Why Univer CLI

选择Univer CLI的理由

  • One
    .univer
    target can contain Sheet, Doc, Slide, Base, and Board Units addressed by
    unitId
    .
  • Worktrees isolate agent changes until review and merge.
  • Offline
    api show
    /
    api find
    resolves exact Facade symbols for the installed SDK.
  • Runtime readback and the viewer verify the stored model and rendered result.
  • Import/export and screenshots use the product runtime rather than unrelated file writers.
Do not edit
.univer
storage directly or substitute unrelated writers. Follow the loaded core and Unit Skills for the supported path.
  • 单个
    .univer
    目标可包含由
    unitId
    标识的表格(Sheet)、文档(Doc)、幻灯片(Slide)、Base及Board Unit。
  • 工作树可隔离Agent变更,直至审核并合并。
  • 离线
    api show
    /
    api find
    可解析已安装SDK的精确Facade符号。
  • 运行时回读及查看器可验证存储的模型及渲染结果。
  • 导入/导出及截图功能使用产品运行时,而非无关的文件编写工具。
请勿直接编辑
.univer
存储内容或使用无关工具替代。请遵循已加载的核心及Unit Skill所支持的操作路径。

Diagnose

诊断

bash
univer --help
univer doctor
univer skills list
univer skills path
Use
univer help <command>
for exact syntax. If the CLI is unavailable or
doctor
reports a blocking runtime failure, stop and report the diagnostic instead of switching tools.
bash
univer --help
univer doctor
univer skills list
univer skills path
使用
univer help <command>
查看精确语法。如果CLI不可用或
doctor
报告阻塞性运行时故障,请停止操作并提交诊断信息,不要更换工具。