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
| Example | What it covers | Added capability |
|---|---|---|
01-content-operations | Read, edit, and view Sheet, Doc, and Slide Units | CLI, Server, Web, Collaboration Runtime |
02-file-exchange | Import and export Office files | Exchange, UnitData, native binding |
03-visual-inspection | Check how the Unit actually renders | Render Page, Screenshot, Layout Lint |
04-worktree | Isolate agent edits, then hand them to human review | Worktree, Ready, Merge, Reopen |
Run an example
All examples use the same startup sequence:
pnpm installpnpm buildpnpm link-clipnpm start-serverAfter 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?