Render mermaid files to SVG or PNG on the CLI
-
Install using homebrew:
brew tap DavidGamba/dgtools https://github.com/DavidGamba/dgtools brew install DavidGamba/dgtools/mermaid
NoteCompletion is auto setup for bash.
For
zsh
completions, an additional step is required, add the following to your.zshrc
:export ZSHELL="true" source "$(brew --prefix)/share/zsh/site-functions/dgtools.mermaid.zsh"
Upgrade with:
brew update brew upgrade mermaid
-
Install using go:
Install the binary into your
~/go/bin
:go install github.com/DavidGamba/dgtools/mermaid@latest
Then setup the completion.
For bash:
complete -o default -C mermaid mermaid
For zsh:
export ZSHELL="true" autoload -U +X compinit && compinit autoload -U +X bashcompinit && bashcompinit complete -o default -C mermaid mermaid