Warning
This tool is under development, it is not completely finished.
cruml (Crystal UML) is a tool that allows to generate an UML diagram. This is useful for any Crystal projects.
A class diagram representing the child classes linked to the parent class.
- Add the dependency to your
shard.yml
:
development_dependencies:
cruml:
github: tamdaz/cruml
branch: main
- Run
shards install
, once this tool is installed, it will build a binary in thebin/
directory located in your project.
Usage : cruml generate [arguments] -- [options]
-v, --version Show the version
-h, --help Show this help
--verbose Enable verbose
--dark-mode Set to dark mode
--no-color Disable color output
--path=PATH Path to specify
--output-dir=DIR Directory path to save diagrams
To generate a diagram with all Crystal files in the src/classes
directory:
bin/cruml generate --path="src/classes"
To generate a diagram with one Crystal file:
bin/cruml generate --path="src/classes/my_class.cr"
Tip
You can use multiple --path
flag to include several files.
In addition, you can change the diagram theme thanks to --dark-mode
flag:
bin/cruml generate --path="src/classes" --dark-mode
If you don't want to colorize the diagram, you can use the --no-color
flag:
bin/cruml generate --path="src/classes" --no-color
- Fork it (https://github.com/tamdaz/cruml/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- tamdaz - creator and maintainer