Plugins is an experimental feature! The API may change.
We welcome you to try and provide your feedback.
Plugins allow you to extend the functionality of Gaphor beyond the features provided in the standard distributions. In particular, plugins can be helpful if you install the binary distributions available on the download page.
Gaphor can be extended via entry points in several ways:
Application (global) services (
Session specific services (
Modeling languages (
(Sub)command line parsers (
Indirectly loaded modules (
gaphor.modules), mainly for UI components
The default location for plugins is
$USER/.local/gaphor/plugins-2 on Windows).
This location can be changed by setting the environment variable
GAPHOR_PLUGIN_PATH and point to a directory.
Install a plugin#
At this moment Gaphor does not have functionality bundled to install and maintain plugins.
To install a plugin, use
pip from a Python installation on your computer. On macOS and Linux, that should be easy,
on Windows you may need to install Python separately from python.org or the Windows Store.
Since plugins are installed with your system Python version, it’s important that plugins are pure python - e.i. do not contain compiled C code.
For example: to install the Hello World plugin on Linux and macOS, enter:
pip install --target $HOME/.local/gaphor/plugins-2 git+https://github.com/gaphor/gaphor_plugin_helloworld.git
Then start Gaphor as you normally would. A new Hello World entry has been added to the tools menu ( → Tools → Hello World).
Create your own plugin#
If you want to write a plugin yourself, you can familiarize yourself with Gaphor’s design principles, service oriented architecture (includes a plugin example), and event driven framework. Next you can have a look at the Hello World plugin available on GitHub.