# Gaphor: a UML and SysML modelling tool you can also script

> A Python and GTK desktop application implementing the full UML 2 data model, with five starting templates, a plugin system and a Python API.

**gaphor/gaphor** — Gaphor is the simple modeling tool

- Repository: https://github.com/gaphor/gaphor
- Website: https://gaphor.org
- Stars: 2,275 · Forks: 243
- Language: Python
- License: not declared
- Published: 2026-10-06 · Updated: 2026-10-06 · Language: en
- Canonical page: https://hysenlabs.com/projects/gaphor-gaphor

## A data model first, a canvas second

The README states the central claim early and repeats it in the background section: Gaphor implements a fully compliant UML 2 data model, so it is much more than a picture drawing tool. That sentence does the work of separating this project from the large group of diagram editors, and it is worth taking seriously rather than reading as marketing.

The distinction is testable. In a drawing tool, a shape is a shape and a relationship is a line between two shapes, so deleting or moving things can leave inconsistencies you have to police by hand. In a data model, every element you place is an instance in a model with identity, and it exists whether or not it is currently drawn. The README's usage instructions describe exactly this: clicking a Class in the Toolbox and then clicking a diagram places a Class item on the diagram and adds a new Class to the model, where it appears in the Model Browser.

The three design principles are stated plainly. Simplicity, meaning only basic knowledge of UML or SysML is required. Consistency, meaning all modelling is done in a diagram because UML is a graphical modelling language. And workability, meaning the application should not bother the user every time they do something non UML-ish. That third one is the most telling, because it describes a tool that has decided where to be strict (the model) and where to be relaxed (the interaction).

## Five templates, and the profile they set up

First launch presents a greeter dialog offering five models, and the choices map to real modelling approaches rather than to empty documents. There is a Generic blank template, a UML template for Unified Modeling Language, a SysML template, a RAAML template for Risk Analysis and Assessment Modeling language, and a C4 Model template described as a lean graphical notation technique for modelling the architecture of software systems.

Gaphor selects the correct profile based on which template you picked, and the profile can be changed afterwards through the button next to the Profile dropdown at the top of the window. That single mechanism is what lets one application serve five disciplines: the profile decides which elements the toolbox offers and which diagram types are valid, so a risk analysis model does not carry class diagrams and a C4 model does not carry a full SysML vocabulary.

The repository topics agree with that framing, listing `sysml`, `uml`, `mbse`, `model-based-systems-engineering`, `fta` for fault tree analysis, `stpa`, `c4model`, `gnome`, `gtk`, `diagram` and `modeling`. The presence of both STPA and fault tree analysis is the detail that sets Gaphor apart from general UML tools, since both are systems engineering safety methods that a diagram editor without those profiles cannot represent.

## It is a library as well as an application

The README has a short section that is easy to skim past and quite important: Gaphor is a library, and you can use it from scripts and Jupyter notebooks and interact with models programmatically.

The packaging confirms this is structural rather than aspirational. The project manifest declares a console entry point of `gaphor = "gaphor.main:main"`, and more tellingly it registers an entry point group called `gaphor.appservices` with services such as an event manager at `gaphor.core.eventmanager:EventManager` and a module loader under `gaphor.services`. Registering core services as entry points means third party code can contribute modules to the running application, which is the plugin mechanism in practice.

The dependency list is short and tells you the shape of the thing. `pycairo` and `PyGObject` handle rendering and the GTK bindings, `gaphas` is the diagram framework, and `dulwich` is a pure Python implementation of the Git protocols. Also present: `defusedxml`, `tinycss2` and `jedi` for style and code completion support, `pillow` for images, and `pydot` for Graphviz export. Requires Python 3.12 or newer, under 3.15.

## Two things the project deliberately will not do

Most tools in this space grow features until they are hard to explain. Gaphor instead lists non-goals, and they are specific enough to be useful when you are choosing a tool.

The first is generating UML diagrams from source code. The README suggests pynsource or pyreverse if that is what you are looking for, which is a generous pointer rather than a dismissal. The second is generating source code from diagrams, or creating any other concrete executable artifact, including the use of fUML or ALF. The README is clear that these would be possible to add and that they are not the goals of the project.

That is a coherent position rather than a limitation. Code generation makes a modelling tool responsible for the build output, and the moment a diagram produces code, the model and the codebase become two sources of truth for the same thing. Gaphor's answer is that if you need that capability you can probably extend it through a plugin, and the README links to the service oriented architecture page with an example plugin.

The same reasoning explains why the project describes itself as easy to use while still being powerful. Simplicity is a design constraint they are willing to defend, and the non-goals are where that constraint is tested.

## Models as files you can read in a repository

The examples directory is the most persuasive thing in the tree, because it shows finished models rather than describing them. There is a coffee machine, a SysML car, a SysML brake system, an action diagram, a block definition, a component, a decision node, a sequence diagram, a state machine and an STPA model. They are all `.gaphor` files, one per modelling approach, which doubles as a gallery of what the tool can represent.

Alongside them sits `examples/list_classes.py`, which is a script. That pairing is the library claim in practice: the same repository holds both the models and a short piece of Python for inspecting them.

Elsewhere the tree shows the same duality at project level. There is a `models/` directory and a `test-models/` directory, so model files are treated as test fixtures alongside the code, not only as user documents. There is a `test-plugin/` directory for exercising the plugin path, `docs/` for the documentation source that builds to docs.gaphor.org, `data/` for icons and logos including `data/logos/gaphor-logo-full.svg`, `po/` for translations, and `scripts/` for build helpers. `org.gaphor.Gaphor.json` and `gaphor-devel.flatpak` in the root are the Flatpak manifests.

The presence of both a Flatpak manifest and a separate packaging directory called `_packaging/` is worth noting for anyone shipping the tool internally.

## Releases, quality signals and licensing

Version 3.3.2 was published on 2026-05-02, and its release name tells you what it was about: fixing missing translations. The notes cover missing translation files in the wheel and flatpak packages, missing French and Chinese translations, the default zoom level for the HTML report, and adding HTML report files to the PyInstaller configuration. There is also maintenance work: simplifying the ReadTheDocs install process, updating to PyInstaller 6.20.0, and fixing licensing information for console scripts, hash-bangs and file permissions.

Version 3.3.1, published 2026-04-15, fixed one thing: missing toolbar icons on Windows, by updating GTK to 4.22.2. That is a useful data point about the cost of a GTK application, where a toolkit update can produce a visible regression.

The README carries quality badges that are worth reading as claims to verify rather than as settled facts: a build badge for the full build workflow, a code coverage badge, a maintainability badge from Qlty, an OpenSSF Best Practices badge, and a Weblate translation status badge. The project also publishes an OpenSSF project entry and uses VirusTotal scanning on the Windows installer, which is a practice more commercial projects skip.

The manifest classifies the license as Apache Software License, and the tree has a `LICENSES/` directory along with a `REUSE.toml`, indicating the project follows the REUSE licensing specification. It also ships a `SECURITY.md`, a `CHANGELOG.md`, a `CONTRIBUTING.md` and a `RELEASE_CHECKLIST.md`. With 2,273 stars, 244 forks and 207 open issues on a last push of 2026-09-23, this is an actively maintained project with a large contributor base of more than 150 people named in the contributors file.

## Conclusion

Gaphor's distinguishing claim is that it implements a fully compliant UML 2 data model and is therefore more than a diagram drawer, and the repository backs that up in the ways you would hope: a library-first design with entry points, a documented scripting surface, plugins, and example models committed alongside the code. The design also refuses code generation in both directions, which will save you an argument if you need it. Version 3.3.2 shipped on 2026-05-02 and the project was pushed on 2026-09-23, so it moves. Start with the SysML or C4 template from the greeter dialog, read the scripting page if you want the model in Python, and use the files in `examples/` as the fastest way to see what a finished model looks like.

## FAQ

### Is SysML free?

Gaphor is an open source application that implements SysML modelling and is available on Flathub, as installers for macOS and Windows from gaphor.org, and as a package on PyPI. The README describes it as implementing a fully compliant UML 2 data model, and the project is licensed under the Apache Software License.

### What is the difference between Gaphor and a simple diagram drawing tool?

Gaphor implements a fully compliant UML 2 data model, so an element placed on a diagram becomes an object in a model with identity and appears in the Model Browser. A drawing tool treats shapes and lines as graphics. That difference is why the README says it is much more than a picture drawing tool.

### Does Gaphor generate code from UML diagrams?

No, and this is a listed non-goal. The README also excludes generating diagrams from source code, suggesting pynsource or pyreverse for that. It notes such features could be added but are not the project's goals, and that a plugin may be the way to extend it.

### Can I use Gaphor models from Python?

Yes. The README states that Gaphor is a library you can use from scripts and Jupyter notebooks and interact with models programmatically, with a scripting page in the documentation. The manifest also registers service entry points such as an event manager, which is how plugins contribute to the running application.

### Which modelling notations does Gaphor support out of the box?

Five templates are offered at first launch: a blank Generic template, UML, SysML, RAAML for risk analysis, and the C4 Model for software architecture. Gaphor selects the matching profile automatically and lets you switch profiles afterwards from the dropdown in the main window.

## Sources

- [gaphor/gaphor on GitHub](https://github.com/gaphor/gaphor)
- [Issues](https://github.com/gaphor/gaphor/issues)
- [Project website](https://gaphor.org)
- [README](https://github.com/gaphor/gaphor/blob/main/README.md)
- [Releases](https://github.com/gaphor/gaphor/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/gaphor-gaphor
