GitEaseGitEase
Developers/Plugin SDK

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.

ℹThe SDK headers live in Src/Plugins/ inside the GitEase source tree. Point GITEASE_SDK_DIR at that folder when configuring your CMake build.

Plugin Types

TypeInterfaceUse forStatus
PageIPagePluginFull page on the navigation railWorking
DockIDockPluginDock in the utility panelWorking
DiffIDiffPluginDiff viewer or syntax colorizer for file extensionsWorking
Context menuIContextMenuPluginItems on commit, branch, or file right-click menusWorking
ToolbarIToolbarPluginButtons on the main toolbarWorking
WorkflowIWorkflowPluginAllow or block pre-commit, pre-push, pre-mergeWorking
Conflict assistIConflictAssistPluginSuggest and apply a resolution in the conflict windowWorking
CommandICommandPluginRegister commandsPartial
RuleIRulePluginCheck an action before it runsPartial
ServiceIServicePluginBackground lifecycle servicesDeclared
AuthIAuthPluginCustom Git authentication handlersDeclared

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"
}
FieldRequiredDescription
idYesStable unique plugin ID. Use reverse-domain style.
nameYesHuman-readable plugin name.
versionRecommendedSemVer plugin version.
apiVersionRecommendedPlugin API version — current value is "1".
capabilitiesRecommendedList: "dock", "diff", "command", "page", "workflow", "service", "auth", "rule".
authorOptionalAuthor or organization name.
descriptionOptionalShort single-line description.
cppEntryC++ pluginsRelative path to the DLL/SO without extension.
qmlEntryQML-only pluginsRelative path to the root QML file.
minAppVersionOptionalMinimum GitEase app version (SemVer).
iconOptionalRelative path to an icon file inside the package.
iconUrlOptionalHTTPS URL for a marketplace icon.
enabledOptionalDefaults 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.qml

plugin.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:

PropertyTypeDescription
pluginManagervarThe PluginManager instance — read/write settings, get dock info.
pluginIdstringThe plugin's unique ID from the manifest.
repositoryControllervarAccess current repository.
branchControllervarAccess branch information.
remoteControllervarAccess remote information.
notificationControllervarShow info/success/warning/error toasts.
userAuthenticationPopupvarOpen the auth popup programmatically.
uiSessionPopupsvarAccess 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);
}
ℹUse a QML module name that does not start with 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, "&amp;")
            .replace(/</g, "&lt;")
            .replace(/>/g, "&gt;")

        // 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-plugin

Packaging (.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.gep

Package layout

repo-forest-1.0.0.gep
├── plugin.json
└── lib/
    └── repo-forest-plugin.dll
ℹPublish the .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):

LocationPathNotes
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.qml
ℹMarketplace installs enable the plugin automatically. Dropping a raw folder still requires a restart until live reload is supported.

API 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 stringLocation in UIStatus
commit.headerCommittingPage header bar (beside Pull/Push/Fetch)In progress
commit.messageButton row near the commit message textareaIn progress
commit.message.menuAction menu inside the commit message areaPlanned
commit.file.contextContext menu for a changed file rowPlanned
commit.diff.toolbarToolbar above the diff previewPlanned
graph.headerGraph view header barPlanned
graph.commit.contextRight-click menu on a commit in Graph viewPlanned
graph.fileChanges.headerFileChangesDock headerPlanned
graph.fileChanges.contextContext menu for a file in the FileChangesDockPlanned
utilities.dockUtilities page — same as registering a dock pluginStable
global.commandPaletteFuture global command palettePlanned

Command plugin result fields

Emit commandFinished with a result map. The host applies known fields — unknown fields are ignored.

FieldTypeEffect
commitMessagestringReplaces the commit message textarea text.
appendCommitMessagestringAppends text (with a blank line) to the commit message.
notificationstringShows an info toast.
warningstringShows a warning toast.
errorMessagestringShows an error toast.
copyTextstringCopies 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.