Run dgmo from code

1.Install

macOS

bash
brew install diagrammo/dgmo/dgmo

Arch Linux

Adds the Diagrammo package repository, so dgmo updates with the rest of your system. Remove it any time with sudo pacman -R diagrammo-keyring.

bash
curl -LO https://github.com/diagrammo/dgmo/releases/download/arch-repo/diagrammo-keyring.pkg.tar.zst &&
  sudo pacman -U ./diagrammo-keyring.pkg.tar.zst &&
  sudo pacman -Syu dgmo

Omarchy

Same as Arch, except the last step. Omarchy refuses a direct pacman -Syu and asks you to use omarchy update, so this only refreshes the package list. Keep the system itself current with omarchy update as usual.

bash
curl -LO https://github.com/diagrammo/dgmo/releases/download/arch-repo/diagrammo-keyring.pkg.tar.zst &&
  sudo pacman -U ./diagrammo-keyring.pkg.tar.zst &&
  sudo pacman -Sy dgmo

Linux, Windows, or anywhere with Node

bash
npm install -g @diagrammo/dgmo-cli

2.Render

pie.dgmo

pie Browser Market Share (2025)

Chrome           63.5
Safari           19.8
Firefox           6.2
Edge              5.1
Other             5.4 
bash
dgmo pie.dgmo -o pie.svg --theme dark --palette nord

Produces

Browser Market Share (2025)Chrome — 63.5 (64%)Safari — 19.8 (20%)Firefox — 6.2 (6%)Edge — 5.1 (5%)Other — 5.4 (5%)
pie Browser Market Share (2025)

Chrome           63.5
Safari           19.8
Firefox           6.2
Edge              5.1
Other             5.4

Open files in the desktop app

The same brew install diagrammo/dgmo/dgmo also installs adiagrammo command for launching the Diagrammo desktop app from your terminal. macOS only.

bash
diagrammo .              # open the current directory as the workspace
diagrammo foo.dgmo       # open a .dgmo file
diagrammo notes.md       # open a markdown file
diagrammo                # just launch the app

If Diagrammo.app isn't installed,diagrammo foo.dgmo falls back to opening the file as a share link in the web editor atonline.diagrammo.app.

Now write the diagram

Every chart type, directive and option is in one page — or start from an example that already renders and change the parts you need.