Compile-time plugin infrastructure for Go applications: a lifecycle host, plugin wiring generation, and route guarding. Framework-free and storage-agnostic. The application owns its plugin contract and its SDK surface, and pluginkit owns the mechanism underneath.
pluginkit is a set of primitives, not a framework. It grows by adding small independent building blocks, each usable on its own.
Pluginis the lifecycle contract, with the optionalMigrator,RouteProvider, andPublicPathProvidercapabilities.Hostmigrates, starts, and stops a fixed set of plugins with rollback and panic isolation.Protectguards a plugin's mounted routes with caller-supplied middleware while letting its declared public paths through untouched.wiregenerates the Go and TypeScript plugin wiring files fromplugins/*/plugin.jsonmanifests.
Applications re-export the lifecycle types from their own SDK package as type aliases, so plugins depend only on the application's contract.
host := pluginkit.NewHost(registeredPlugins...)
if err := host.Start(ctx); err != nil {
// every migrator ran first and a failed start rolled back cleanly
}
defer host.Stop(ctx)
for id, handler := range host.Routes() {
mux.Handle("/api/plugins/"+id+"/", http.StripPrefix("/api/plugins/"+id,
pluginkit.Protect(handler, host.PublicPaths()[id], requireSession)))
}Copyright 2026 Manuel 'SirLouen' Camargo
Apache License 2.0 (LICENSE). Every file carries an
SPDX-License-Identifier: Apache-2.0 header.