Linux command
plantuml 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Generate diagram
plantuml [diagram.puml]
Output as PNG
plantuml -tpng [diagram.puml]
Output as SVG
plantuml -tsvg [diagram.puml]
Output to directory
plantuml -o [output_dir] [diagram.puml]
Read from stdin
echo "@startuml\nA -> B\n@enduml" | plantuml -pipe > [diagram.png]
Watch for changes
plantuml -gui
说明
plantuml generates UML diagrams from text descriptions. It supports sequence diagrams, class diagrams, activity diagrams, and many other types. The tool uses a simple text-based syntax that can be version-controlled and integrated into documentation workflows.
参数
- -t _format_
- Output format (png, svg, eps, pdf, txt).
- -o _dir_
- Output directory.
- -charset _encoding_
- Input file encoding.
- -pipe
- Use stdin/stdout.
- -gui
- Launch GUI.
- -config _file_
- Include config file.
- -checkversion
- Check for updates.
- -verbose
- Verbose output.
FAQ
What is the plantuml command used for?
plantuml generates UML diagrams from text descriptions. It supports sequence diagrams, class diagrams, activity diagrams, and many other types. The tool uses a simple text-based syntax that can be version-controlled and integrated into documentation workflows.
How do I run a basic plantuml example?
Run `plantuml [diagram.puml]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -t _format_ do in plantuml?
Output format (png, svg, eps, pdf, txt).