Modules of GpgFrontend
Repo saturneric/GpgFrontend-Modules, read from GitHub 3 h ago. saturneric has not joined Take My Repo.
saturneric/GpgFrontend-Modules is a public repo on GitHub by saturneric. Modules of GpgFrontend. It declares the GPL-3.0 license on GitHub. It is written mainly in C++, has 5 stars and last changed on 2026-11-20. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-26.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A module is a plug-in for GpgFrontend. It is a small shared library
(.so, .dll, .dylib) that the application loads at startup. A module can
add menu entries, dialogs, settings pages and new document types, and it can
ask the application to sign, encrypt, decrypt and verify for it.
This folder holds the modules that ship with GpgFrontend. Read this page from the top the first time. After that, use it as a reference.
This folder is a git sub-repository. It must sit at GpgFrontend/modules.
You cannot build it on its own. Compilers, SDK headers, Qt and output paths all come from the main GpgFrontend CMake project.
Turn modules on when you configure the main project:
cmake -B build -DGPGFRONTEND_BUILD_MODULES=ON
You need Qt 6.5 or newer, the same Qt the application is built with. A module built against a different Qt major version will not load.
Users can switch a module off in the application settings. In an archive install they can also delete its folder (see where packages end up).
The full id of each module starts with com.bktus.gpgfrontend.module., shown
here as ….
| Folder | Module id | What it does |
|---|---|---|
m_ver_check |
…module.version_checking |
Checks for new GpgFrontend releases. |
m_gpg_info |
…module.gnupg_info_gathering |
Shows details about the local GnuPG install. |
m_key_server_sync |
…module.key_server_sync |
Searches and syncs keys with HKP/VKS servers. |
m_email |
…module.email |
E-mail helpers built on vmime. |
m_pgp_inspect |
…module.pgp_inspect |
Shows the packet structure of OpenPGP data. |
m_im |
…module.im |
OpenPGP messages as single-line chat tokens. |
m_notes |
…module.notes |
Rich-text notes, kept as OpenPGP-encrypted TextPacks. |
modules/
├── src/
│ ├── m_ver_check/
│ ├── m_gpg_info/
│ ├── m_key_server_sync/
│ ├── m_email/
│ ├── m_pgp_inspect/
│ ├── m_im/
│ ├── m_notes/
│ └── CMakeLists.txt <- lists every module folder
└── CMakeLists.txt
Want to copy something? Start from these two:
m_pgp_inspect: small. One command, one dialog.m_key_server_sync: bigger. Commands with
arguments, a dialog, a settings page, buttons on the key details page, and
events.Every module folder has the same four parts:
my_module/
├── module.json 1. WHO the module is and WHAT it is allowed to do
├── CMakeLists.txt 2. how to build it (one function call)
├── MyModule.cpp 3. the C++ code: commands that do the work
└── ui/main.lua 4. a tiny script: WHERE the commands appear in the UI
The C++ code never touches the application's windows directly. Instead:
The module talks to the application only through the SDK, a set of C
functions (GFGpgEncrypt, GFAppLocale, ...). It cannot call into
GpgFrontend's own libraries, and the build stops you if you try.
Where the SDK lives (you do not need to touch these, gf_add_module() adds
them to your include path):
src/sdk/: the GFSDK* functions, plus easier C++ wrappers
in GFSDK.hpp under gf::sdk::. The full SDK manual is
src/sdk/README.md.src/mod_rt/include/: GFModule.h
and friends. This is the header you include. It gives you the event types,
memory helpers, logging macros and the startup function.We will build a module that adds Help → About My Module. Clicking it shows a message box saying "Hello."
modules/src/my_module/
Then open modules/src/CMakeLists.txt and add one line:
add_subdirectory(my_module)
module.json{
"schema_version": 1,
"id": "com.example.my_module",
"name": "MyModule",
"description": "Says hello.",
"author": "Your Name",
"capabilities": ["ui"],
"events": [],
"commands": ["com.example.my_module.show_about"],
"translation_context": "ModuleMyModule"
}
What each field means:
| Field | Meaning |
|---|---|
id |
The module's unique name. Lower-case, dotted, like a reversed domain. |
name |
A short name shown to the user. |
capabilities |
What the module is allowed to use. See Capabilities. Here: only ui. |
events |
Every event the module listens to. See Events. Here: none. |
commands |
Every command the module provides. Each one starts with the module id plus a dot. |
translation_context |
The name its translations are filed under. Pick something like Module + name. |
version |
Optional. Defaults to the GpgFrontend version you build against. Bundled modules leave it out. |
min_host_version |
Optional. The oldest GpgFrontend that can run this module. Defaults to the version you build against. |
This file is the only place the module's identity is written. The build
reads it to generate a C++ header, to set up translations, and to make the
signed package. Never copy the id into other places by hand: use the
generated GF_MODULE_ID instead.
Important: the
eventsandcommandslists must match your C++ code exactly. List one you don't handle, or handle one you didn't list, and the module refuses to start.
// MyModule.cpp
#include <GFModule.h>
#include <GFSDKHostCommands.hpp> // commands the application itself offers
#include "GFModuleIdentity.h" // GENERATED from module.json, gives GF_MODULE_ID
#include "GFModuleTr.h" // GENERATED, gives GTrC for translations
// Write the type unqualified: lupdate misreads `gf::cmd::Meta kMeta{`.
using CommandMeta = gf::cmd::Meta;
// (A) Describe the command: its id, title, and that it runs on the GUI thread.
struct ShowAbout {
static constexpr CommandMeta kMeta{
GF_MODULE_ID ".show_about", // must be listed in module.json
GTrC::Noop("About My Module"), // title shown in the menu
"", // description
"", // category
0,
gf::cmd::kNeedsGuiThread};
using Args = gf::cmd::Unit; // takes no arguments
using Result = gf::cmd::Unit; // returns nothing
};
// (B) What happens when the user clicks it.
auto DoShowAbout(const gf::cmd::CommandContext&, const gf::cmd::Unit&)
-> gf::cmd::Outcome<gf::cmd::Unit> {
// Ask the application to show a message box.
Commands().Invoke<gf::cmd::host::AppMessage>(
{gf::cmd::host::AppMessage::Severity::kInfo,
GTrC::tr("About My Module"), GTrC::tr("Hello.")});
return gf::cmd::Outcome<gf::cmd::Unit>::Success({});
}
// (C) Runs once when the module starts.
auto OnActivate() -> GFResult {
LOG_I() << "MyModule activating";
return GFResult::Ok();
}
// (D) The list of commands. Must match "commands" in module.json.
const std::array<gf::cmd::Binding, 1> kCommands = {
gf::cmd::Bind<ShowAbout, &DoShowAbout>()};
// (E) Everything the application needs to know about this module.
const GFModuleHooks kHooks = {
sizeof(GFModuleHooks),
GF_MODULE_ID,
GF_MODULE_VERSION,
GF_MODULE_TRANSLATION_CONTEXT,
&OnActivate, // on_activate: runs at start
nullptr, // on_deactivate: stop your own threads/timers here
nullptr, // on_unload: final cleanup
nullptr, // events: none (must match module.json)
0, // number of events
kCommands.data(),
kCommands.size(),
};
// (F) The entry point. Copy this exactly. Do not rename it.
extern "C" GF_MODULE_EXPORT auto GFModuleGetApi(uint32_t abi)
-> const GFModuleApi* {
return GFModuleRuntimeGetApi(abi, &kHooks);
}
Things to know about this code:
nullptr for any you don't need.OnActivate()
runs, then your Lua script is loaded.on_deactivate runs. Use on_deactivate only to stop
things you started: threads, timers, network requests. If you started
none, pass nullptr.GFModuleGetApi written by hand? Nothing else in the module
refers to it. Writing it out keeps the linker from throwing it away. The
application looks for this exact name when it loads the library.Create ui/main.lua. It only says where the command appears:
-- ui/main.lua: places the command. No user-visible text belongs here.
local about = commands.get("com.example.my_module.show_about")
ui.action {
id = "about",
anchor = ui.anchor("main.menu.help"), -- the Help menu
command = about,
}
The menu title comes from the command (GTrC::Noop("About My Module")), not
from the script. All text the user sees lives in C++, so it can be
translated.
CMakeLists.txtgf_add_module(
NAME my_module
QT Core Widgets
LUA_SCRIPTS ui/main.lua
# UI_DIR ui # if you have Qt Designer .ui forms
# LINK some_target # extra libraries, if any
# RESOURCES my.qrc # extra Qt resource files
# INCLUDE_DIRS some/dir # extra include folders
# SOURCES a.cpp b.cpp # default: every source file in this folder
)
That one call does everything:
module.json,SOURCES, if you give it),GFModuleIdentity.h and GFModuleTr.h,.gfmodule package.Moc, rcc and uic run automatically. There is nothing else to wire up.
From the main GpgFrontend folder:
cmake -B build -DGPGFRONTEND_BUILD_MODULES=ON # only needed the first time
cmake --build build -j$(nproc)
Start GpgFrontend. Open Help: you should see About My Module.
If you added new .cpp files to an existing folder later, run the configure
command again: the file list is collected at configure time.
Run this whenever you add or change GTrC::tr(...) or GTrC::Noop(...)
strings:
scripts/update_translations.sh
It creates or updates the .ts files for every language, in your module's
ts/ folder. You never write them by hand. Details in
Translations.
Read this list. Each item is a mistake someone already made.
module.json and the code must agree. The events list must equal
your event table, and the commands list must equal your command table.
Any difference and the module will not start.GFGpgDecrypt without
"gpg" in capabilities, the call does nothing, returns a failure, and
logs a line telling you what to add.GTrC::tr("...") or GTrC::Noop("...") literally. No
wrapper functions, no #define, no QCoreApplication::translate with
another context. The translation tool cannot see through them, and those
strings silently stay untranslated.gf_core, gf_ui,
gf_host_api). The build fails if you do. Need something the SDK does
not have? Add it to the SDK (see What a module may link).saturneric/GpgFrontend-Modules is a public repo on GitHub by saturneric. Modules of GpgFrontend.
It declares the GPL-3.0 license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-20. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run GpgFrontend-Modules. What is known comes from GitHub. It declares the GPL-3.0 license on GitHub. Its last change was on 2026-11-20. It has 5 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.