Examples

Learn AI SDK content operations, Office file import and export, visual inspection, and Worktree in order.

univer-cli-examples contains four standalone teaching applications that you can run. Each directory has its own package.json and lockfile. Each example retains the capabilities of the preceding example and adds one topic.

Learning order

ExampleWhat it coversAdded capability
01-content-operationsRead, edit, and view Sheet, Doc, and Slide UnitsCLI, Server, Web, Collaboration Runtime
02-file-exchangeImport and export Office filesExchange, UnitData, native binding
03-visual-inspectionCheck how the Unit actually rendersRender Page, Screenshot, Layout Lint
04-worktreeIsolate agent edits, then hand them to human reviewWorktree, Ready, Merge, Reopen

Run an example

All examples use the same startup sequence:

Bash
pnpm installpnpm buildpnpm link-clipnpm start-server

After the Server starts, run univer-example-cli from a second terminal. Each example README contains the complete flow, which can be copied directly, and an Agent skill prompt.

These examples are minimal teaching assemblies rather than complete products. The application remains responsible for its commands, the targets those commands operate on, identity and authorization, output, and deployment.

View complete source

Browse the numbered examples and run them in univer-cli-examples.

How is this guide?

© 2026 DreamNum Co., Ltd.