- Install plantuml
For example, on macOS you can use a Homebrew formula:
brew install plantuml
If plantuml
fails to install, check the output for any missing formulae. For example, you may
need to run the following before installing plantuml
will succeed:
brew tap gromgit/fuse
Then run:
brew reinstall plantuml
- Install Dart Class Diagram Generator (
dcdg
)
dart pub global activate dcdg
- Generate a diagram grammar file
From the root of your repo, run dcdg
and supply an output file name (ex: package.uml
or package.plantuml
).
Example:
cd lib
dcdg -o package.uml
For greater control over the generated diagram, including source locations, grammar, and filters, see usage options.
- Render a diagram image using the generated grammar file
plantuml package.uml
This will generate a file called package.png
. Use the -o
option to specify a different name.