@diagrammo/dgmo-cli

中文文档
0.100.0发布于 2026/11/10MIT构建来源已验证近 30 天下载 2201

Render DGMO diagrams to PNG or SVG from the terminal, and wire the DGMO MCP server into AI editors.

原始使用文档
文档目录5 节
  1. Rendering
  2. AI editors
  3. Also
  4. Which package is which
  5. License

@diagrammo/dgmo-cli

The dgmo command — render DGMO diagrams to PNG or SVG from your terminal, and wire the DGMO MCP server into AI editors.

npm install -g @diagrammo/dgmo-cli   # macOS and Linux
npx @diagrammo/dgmo-cli diagram.dgmo # no install

Prefer your system's package manager? Homebrew and Arch/Omarchy (pacman) instructions are at diagrammo.app/dev.

Rendering

dgmo diagram.dgmo                          # PNG (the default)
dgmo diagram.dgmo -o output.svg            # format follows the extension
cat diagram.dgmo | dgmo > out.png          # stdin
dgmo diagram.dgmo --theme dark --palette catppuccin
dgmo share diagram.dgmo                    # shareable link, copied to the clipboard

AI editors

dgmo install                # auto-detects what you have, no prompts
dgmo install claude-code    # or name one

Detects Claude Code, Codex, Claude Desktop, Cursor, Windsurf and Copilot, and points each at the DGMO MCP server. dgmo mcp runs that server directly.

Also

dgmo types          # the chart types, and what each is for
dgmo diagnostics    # every diagnostic code the parser can emit

Which package is which

PackageWhat it is
@diagrammo/dgmo-clithis — the dgmo command
@diagrammo/dgmothe library: render(), the parsers, the palettes
@diagrammo/dgmo-mcpthe MCP server, installed with this package

The command lived inside @diagrammo/dgmo until 0.61.0. It moved out so that a documentation build calling render() stops installing a command-line program and a native rasterizer it never reaches.

Full language reference and docs: diagrammo.app.

License

MIT

版本与发布记录

@diagrammo/dgmo-cli 共发布 38 个版本,首次发布于 2026/08/07;过去 12 个月发布了 38 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.100.0latest2026/11/103 天前
0.99.02026/11/094 天前
0.98.02026/11/084 天前
0.97.02026/11/0211 天前
0.96.02026/10/3113 天前
0.95.02026/10/2915 天前

关于 @diagrammo/dgmo-cli 的常见问题

@diagrammo/dgmo-cli 是什么?

Render DGMO diagrams to PNG or SVG from the terminal, and wire the DGMO MCP server into AI editors.

如何安装 @diagrammo/dgmo-cli?

在项目目录运行 npm install @diagrammo/dgmo-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 dgmo,可以用 npx dgmo 直接运行。

@diagrammo/dgmo-cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/diagrammo__dgmo-cli 是否存在。

@diagrammo/dgmo-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@diagrammo/dgmo-cli 可以商用吗?

@diagrammo/dgmo-cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@diagrammo/dgmo-cli 的下载量有多少?

根据 npm 官方下载统计,@diagrammo/dgmo-cli 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,201 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@diagrammo/dgmo-cli 还在维护吗?

最新版本 0.100.0 发布于 2026/11/10(3 天前);至今共发布 38 个版本,其中过去 12 个月发布了 38 个;首次发布于 2026/08/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。