Plugin SDK
Extend GitEase with custom docks, diff highlighters, and command actions — using pure QML for simple plugins or C++ Qt for full-power integrations.
Overview
GitEase scans two locations for plugins at startup — a portable folder next to the executable and a per-user folder. Each plugin lives in its own subfolder and is described by a plugin.json manifest. Plugins can be pure QML (zero compilation) or compiled C++ Qt plugins loaded via QPluginLoader.
Zero setup
Drop a folder with plugin.json + QML → it works on the next launch.
C++ power
Register custom QML types, call libgit2, use any Qt module.
Safe boundary
Plugins talk to the host through a pure-virtual IPluginContext interface.
Live settings
Read/write persistent plugin settings without touching GitEase config files.
Src/Plugins/ inside the GitEase source tree. Point GITEASE_SDK_DIR at that folder when configuring your CMake build.Plugin Types
| Type | Interface | Use for | Status |
|---|---|---|---|
| Page | IPagePlugin | Full page on the navigation rail | Working |
| Dock | IDockPlugin | Dock in the utility panel | Working |
| Diff | IDiffPlugin | Diff viewer or syntax colorizer for file extensions | Working |
| Context menu | IContextMenuPlugin | Items on commit, branch, or file right-click menus | Working |
| Toolbar | IToolbarPlugin | Buttons on the main toolbar | Working |
| Workflow | IWorkflowPlugin | Allow or block pre-commit, pre-push, pre-merge | Working |
| Conflict assist | IConflictAssistPlugin | Suggest and apply a resolution in the conflict window | Working |
| Command | ICommandPlugin | Register commands | Partial |
| Rule | IRulePlugin | Check an action before it runs | Partial |
| Service | IServicePlugin | Background lifecycle services | Declared |
| Auth | IAuthPlugin | Custom Git authentication handlers | Declared |
Working = the app uses it today. Partial = some of it is wired. Declared = in the SDK headers, but the app never calls it yet. See also architecture.
Manifest Format
Every plugin folder must contain a plugin.json.
{
"id": "com.example.my-plugin",
"name": "My Plugin",
"version": "1.0.0",
"apiVersion": "1",
"capabilities": ["dock"],
"author": "Your Name",
"description": "A short description.",
"cppEntry": "lib/my-plugin",
"qmlEntry": "qml/MyDock.qml"
}| Field | Required | Description |
|---|---|---|
| id | Yes | Stable unique plugin ID. Use reverse-domain style. |
| name | Yes | Human-readable plugin name. |
| version | Recommended | SemVer plugin version. |
| apiVersion | Recommended | Plugin API version — current value is "1". |
| capabilities | Recommended | List: "dock", "diff", "command", "page", "workflow", "service", "auth", "rule". |
| author | Optional | Author or organization name. |
| description | Optional | Short single-line description. |
| cppEntry | C++ plugins | Relative path to the DLL/SO without extension. |
| qmlEntry | QML-only plugins | Relative path to the root QML file. |
| minAppVersion | Optional | Minimum GitEase app version (SemVer). |
| icon | Optional | Relative path to an icon file inside the package. |
| iconUrl | Optional | HTTPS URL for a marketplace icon. |
| enabled | Optional | Defaults to true. Set false to skip loading. |
QML-Only Dock Plugin
The simplest plugin type. Drop a folder, write a QML file, done — no compilation.
Folder layout
plugins/
my-notes/
plugin.json
qml/
NotesDock.qmlplugin.json
{
"id": "com.example.my-notes",
"name": "My Notes",
"version": "1.0.0",
"apiVersion": "1",
"capabilities": ["dock"],
"qmlEntry": "qml/NotesDock.qml"
}NotesDock.qml
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Rectangle {
id: root
color: "#1e1e2e"
radius: 8
// GitEase injects these when the dock loads
property var pluginManager: null
property string pluginId: "com.example.my-notes"
Component.onCompleted: {
if (pluginManager)
noteArea.text = pluginManager.pluginSetting(pluginId, "notes", "")
}
TextArea {
id: noteArea
anchors.fill: parent
anchors.margins: 12
wrapMode: TextArea.Wrap
color: "#cdd6f4"
background: null
placeholderText: "Write anything…"
onTextChanged: {
if (pluginManager)
pluginManager.setPluginSetting(pluginId, "notes", text)
}
}
}Injected dock properties
If the root QML item declares any of the following properties, GitEase sets them automatically:
| Property | Type | Description |
|---|---|---|
| pluginManager | var | The PluginManager instance — read/write settings, get dock info. |
| pluginId | string | The plugin's unique ID from the manifest. |
| repositoryController | var | Access current repository. |
| branchController | var | Access branch information. |
| remoteController | var | Access remote information. |
| notificationController | var | Show info/success/warning/error toasts. |
| userAuthenticationPopup | var | Open the auth popup programmatically. |
| uiSessionPopups | var | Access shared app-wide popup objects. |
C++ Dock Plugin
Use a C++ plugin when you need custom QML types, platform APIs, libgit2 access, or Qt classes that are impractical from QML alone.
MyPlugin.h
#pragma once
#include <QObject>
#include "IDockPlugin.h"
class MyPlugin : public QObject, public IDockPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "com.gitease.IDockPlugin/1.0" FILE "plugin.json")
Q_INTERFACES(IPlugin IDockPlugin)
public:
QString id() const override { return QStringLiteral("com.example.my-plugin"); }
QString name() const override { return QStringLiteral("My Plugin"); }
QString version() const override { return QStringLiteral("1.0.0"); }
void initialize(IPluginContext* ctx) override;
void shutdown() override {}
QUrl dockQmlUrl() const override {
return QUrl(QStringLiteral("qrc:/com.example.my-plugin/qml/MyDock.qml"));
}
QString dockTitle() const override { return QStringLiteral("My Plugin"); }
QString dockIcon() const override { return {}; }
};MyPlugin.cpp
#include "MyPlugin.h"
#include "MyType.h" // your custom QML type, if any
#include <QQmlEngine>
void MyPlugin::initialize(IPluginContext* ctx)
{
// Register C++ types before registering the dock
qmlRegisterType<MyType>("com.example.MyPlugin", 1, 0, "MyType");
ctx->registerDock(this);
}GitEase. — that prefix is reserved for the host modules. For example, use MyTypes or com.example.MyPlugin.Embedded QML resources (recommended)
Embed the dock QML into the DLL as a Qt resource so you don't need loose QML files at runtime:
# In CMakeLists.txt
qt_add_resources(my-plugin "plugin_qml"
PREFIX "/com.example.my-plugin"
FILES
qml/MyDock.qml
)
# In MyPlugin.cpp — the QRC URL must match the prefix above
QUrl MyPlugin::dockQmlUrl() const {
return QUrl("qrc:/com.example.my-plugin/qml/MyDock.qml");
}C++ Diff Plugin
A diff plugin registers a QML colorizer for specific file extensions. The colorizer is loaded when the user selects a matching file in the commit diff view.
MyDiffPlugin.h
#pragma once
#include "IDiffPlugin.h"
#include <QObject>
class MyDiffPlugin : public QObject, public IDiffPlugin
{
Q_OBJECT
Q_INTERFACES(IPlugin IDiffPlugin)
Q_PLUGIN_METADATA(IID "com.gitease.IDiffPlugin/1.0" FILE "plugin.json")
public:
QString id() const override { return QStringLiteral("com.example.my-diff"); }
QString name() const override { return QStringLiteral("My Diff"); }
QString version() const override { return QStringLiteral("1.0.0"); }
void initialize(IPluginContext* ctx) override;
void shutdown() override {}
QStringList handledExtensions() const override { return { QStringLiteral("ts"), QStringLiteral("js") }; }
QUrl colorizerQmlUrl() const override {
return QUrl(QStringLiteral("qrc:/com.example.my-diff/qml/TsColorizer.qml"));
}
};Colorizer QML contract
The root item must be a QtObject exposing a colorize(raw) function that returns an HTML-safe string:
import QtQuick
QtObject {
function colorize(raw) {
if (!raw) return ""
// Always HTML-escape before adding rich text tags
let s = raw
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
// Example: highlight keywords
s = s.replace(/(const|let|var|function|return)/g,
'<span style="color:#569cd6;">$1</span>')
return s
}
}CMake & Build
Minimal CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(my-plugin VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
find_package(Qt6 REQUIRED COMPONENTS Core Quick)
# Path to GitEase Src/Plugins/ — override with -DGITEASE_SDK_DIR=...
if(NOT DEFINED GITEASE_SDK_DIR OR GITEASE_SDK_DIR STREQUAL "")
get_filename_component(GITEASE_SDK_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/../../Src/Plugins" ABSOLUTE)
endif()
add_library(my-plugin SHARED MyPlugin.h MyPlugin.cpp)
set_target_properties(my-plugin PROPERTIES PREFIX "") # avoid "lib" prefix on Windows
qt_add_resources(my-plugin "plugin_qml"
PREFIX "/com.example.my-plugin"
FILES qml/MyDock.qml
)
target_include_directories(my-plugin PRIVATE ${GITEASE_SDK_DIR})
target_link_libraries(my-plugin PRIVATE Qt6::Core Qt6::Quick)Auto-deploy after build
Add a POST_BUILD step to copy the DLL and manifest:
if(NOT GITEASE_PLUGINS_DIR)
if(WIN32)
set(GITEASE_PLUGINS_DIR "$ENV{APPDATA}/GitEase/plugins")
else()
set(GITEASE_PLUGINS_DIR "$ENV{HOME}/.local/share/GitEase/plugins")
endif()
endif()
set(_DEPLOY "${GITEASE_PLUGINS_DIR}/my-plugin")
add_custom_command(TARGET my-plugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${_DEPLOY}/lib"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:my-plugin>" "${_DEPLOY}/lib/"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/plugin.json" "${_DEPLOY}/"
COMMENT "Deploying my-plugin"
VERBATIM
)Configure & build (Windows + MinGW)
cmake -S SamplePlugins/my-plugin -B build/my-plugin ^
-G Ninja ^
-DCMAKE_CXX_COMPILER=C:/Qt/Tools/mingw1310_64/bin/g++.exe ^
-DCMAKE_PREFIX_PATH=C:/Qt/6.10.1/mingw_64 ^
-DGITEASE_SDK_DIR="%CD%/Src/Plugins" ^
-DGITEASE_PLUGINS_DIR="%APPDATA%/GitEase/plugins"
cmake --build build/my-pluginPackaging (.gep)
A GitEase Package (.gep) is a ZIP archive that ships only runtime files: plugin.json, the compiled library under lib/, and any QML/icon assets. Sources and CMake files are never packaged.
Build a package
python Scripts/create_gep.py SamplePlugins/repo-forest
# → repo-forest-1.0.0.gepPackage layout
repo-forest-1.0.0.gep
├── plugin.json
└── lib/
└── repo-forest-plugin.dll.gep from the admin Plugins panel. GitEase desktop installs the same format from the marketplace or via “Install plugin from .gep”.Installing Plugins
Users can install plugins from the in-app marketplace, or load a local .gep file. GitEase also scans these directories at startup (both are checked; order matters for overrides):
| Location | Path | Notes |
|---|---|---|
| Portable | <GitEase.exe dir>/plugins/ | Good for development and self-contained installs. |
| User data (Windows) | %APPDATA%/GitEase/plugins/ | Default install target for marketplace / .gep installs. |
| User data (Linux) | ~/.local/share/GitEase/plugins/ | XDG-compliant per-user install. |
Expected installed layout
plugins/
my-plugin/
plugin.json ← required
lib/
my-plugin.dll ← C++ plugin (Windows)
# my-plugin.so ← C++ plugin (Linux)
qml/ ← only if using loose QML (not recommended for C++ plugins)
MyDock.qmlAPI Reference
IPlugin (base interface)
class IPlugin
{
public:
virtual ~IPlugin() = default;
virtual QString id() const = 0; // stable unique id
virtual QString name() const = 0; // human-readable
virtual QString version() const = 0; // SemVer string
virtual void initialize(IPluginContext* ctx) = 0;
virtual void shutdown() = 0;
};IPluginContext (host interface)
class IPluginContext
{
public:
virtual ~IPluginContext() = default;
// Registration
virtual void registerDock(IDockPlugin*) = 0;
virtual void registerDiff(IDiffPlugin*) = 0;
virtual void registerCommand(ICommandPlugin*) = 0;
// Notifications (shown as toasts in the UI)
virtual void notifyInfo(const QString& message) = 0;
virtual void notifySuccess(const QString& message) = 0;
virtual void notifyWarning(const QString& message) = 0;
virtual void notifyError(const QString& message) = 0;
// Persistent plugin settings (stored under pluginId/key)
virtual QVariant pluginSetting(const QString& pluginId,
const QString& key,
const QVariant& defaultValue = {}) const = 0;
virtual void setPluginSetting(const QString& pluginId,
const QString& key,
const QVariant& value) = 0;
};IDockPlugin
class IDockPlugin : public IPlugin
{
public:
virtual QUrl dockQmlUrl() const = 0; // QRC or file:// URL
virtual QString dockTitle() const = 0; // panel title
virtual QString dockIcon() const { return {}; }
virtual bool defaultVisible() const { return true; }
};IDiffPlugin
class IDiffPlugin : public IPlugin
{
public:
virtual QStringList handledExtensions() const = 0; // e.g. { "qml", "ts" }
virtual QUrl diffViewerQmlUrl() const { return {}; }
virtual QUrl colorizerQmlUrl() const { return {}; }
};ICommandPlugin
class ICommandPlugin : public IPlugin
{
public:
struct Command {
QString id;
QString label;
QString icon; // lucide icon name
QString shortcut;
QStringList contexts; // "commit" | "graph" | "branch" | "file"
QStringList placements; // see Extension Points below
};
virtual QList<Command> commands() const = 0;
virtual void execute(const QString& commandId,
const QVariantMap& ctx) = 0;
signals: // must be emitted from the concrete QObject
void commandFinished(const QString& commandId, const QVariantMap& result);
void commandFailed(const QString& commandId, const QString& errorMessage);
};Extension Points (Placements)
Command plugins declare where their actions should appear using the placements field. The host renders native buttons at each matching location.
| Placement string | Location in UI | Status |
|---|---|---|
| commit.header | CommittingPage header bar (beside Pull/Push/Fetch) | In progress |
| commit.message | Button row near the commit message textarea | In progress |
| commit.message.menu | Action menu inside the commit message area | Planned |
| commit.file.context | Context menu for a changed file row | Planned |
| commit.diff.toolbar | Toolbar above the diff preview | Planned |
| graph.header | Graph view header bar | Planned |
| graph.commit.context | Right-click menu on a commit in Graph view | Planned |
| graph.fileChanges.header | FileChangesDock header | Planned |
| graph.fileChanges.context | Context menu for a file in the FileChangesDock | Planned |
| utilities.dock | Utilities page — same as registering a dock plugin | Stable |
| global.commandPalette | Future global command palette | Planned |
Command plugin result fields
Emit commandFinished with a result map. The host applies known fields — unknown fields are ignored.
| Field | Type | Effect |
|---|---|---|
| commitMessage | string | Replaces the commit message textarea text. |
| appendCommitMessage | string | Appends text (with a blank line) to the commit message. |
| notification | string | Shows an info toast. |
| warning | string | Shows a warning toast. |
| errorMessage | string | Shows an error toast. |
| copyText | string | Copies text to the system clipboard. |
Context fields received by execute()
// Context passed from the Committing page
{
page: "commit",
branch: "feature/my-branch",
commitMessage: "current text in the textarea",
selectedFile: "/abs/path/to/selected-file.ts",
stagedFiles: [...], // model items
unstagedFiles: [...] // model items
}
// Context passed from the Graph view (commit context menu)
{
page: "graph",
placement: "graph.commit.context",
currentBranch: "main",
selectedCommit: "a1b2c3d...",
selectedShortHash: "a1b2c3d",
selectedCommitMessage: "feat: add something",
selectedAuthor: "Ada Lovelace",
selectedAuthorDate: "2026-06-01T10:00:00",
selectedBranches: ["main", "feat/my-branch"],
selectedTags: ["v1.0.0"]
}Ready to build?
Start from a sample plugin — SamplePlugins/cpp-plugin-template is the fastest path for a C++ dock.