Description
TsUML2 generates UML diagrams from TypeScript source code. It is powered by nomnoml and works fully offline, so no third-party servers are involved and your code stays on your machine. It supports classes, interfaces, enums and type literals. By default it looks for a tsconfig.json file in the current directory, and you can point it at another file with a parameter. You can also exclude declaration files and spec files to avoid unwanted interfaces and classes in the diagram. Options can be set on the command line or in a config.json file, and command-line arguments override the values in the file. Besides SVG, the tool can output the diagram as nomnoml DSL code or as mermaid class diagram code, which you can save to a file and edit or render elsewhere. The README includes examples of both text formats. It is a command-line tool, installed with npm, and the project is open source on GitHub. It suits developers who want a quick architecture picture of a TypeScript codebase.…
Highlights
- UML diagrams from TypeScript code
- Works offline with no third-party servers
- Classes, interfaces, enums and type literals
- SVG, nomnoml and mermaid output
- Config file with command-line overrides
Ratings & Reviews
No ratings yet
Be the first to rate TsUML2.
People also visit
Pynsource - UML tool for Python
Pynsource - reverse engineer Python source code into UML
TsUML2 FAQ
What does TsUML2 do?
It reads TypeScript source and generates a UML class diagram, using nomnoml for the drawing.
Does my code leave my machine?
No. The README says TsUML2 works offline, so no third-party servers are involved.
What output formats are available?
SVG by default, plus the nomnoml DSL and mermaid classDiagram code, which can be written to files.
How do I keep out test and declaration files?
Use the exclude option to skip d.ts and spec.ts files, and set the tsconfig path if it is not in the current directory.
What are the best TsUML2 alternatives?
Popular alternatives to TsUML2 include Go Plantuml, Goplantuml and Py2puml. See all TsUML2 alternatives







