Skip to content

Templates

Start a plugin from a maintained template for each plugin type.

Each template is a complete plugin package. Copy it into the server as plugins/<Name>/, then change name in manifest.json and the matching .conf; the directory name must equal the manifest name. The templates are MIT-0; Abstractions 0.7.1 and later are MIT.

The core’s built-in assembly provider loads a .NET class library. No provider package is needed.

Terminal window
dotnet new install Hosihikari.Plugin.Template
dotnet new hosihikari-plugin -n MyPlugin

Build and pack with the framework’s packer. It needs a sibling Hosihikari.PluginManager checkout, or HOSIHIKARI_PLUGINMANAGER pointing at one:

Terminal window
cd MyPlugin
pwsh ./pack.ps1

dist/MyPlugin/ is the plugin package. See the template README.

The C# and F# providers compile the source at load; the package carries source and no build output.

Template Provider Install
CSharpPluginTemplate hosihikari-csharp lip install github.com/HosihikariFramework/CSharpProvider
FSharpPluginTemplate hosihikari-fsharp lip install github.com/HosihikariFramework/FSharpProvider

Copy the repository into plugins/MyCSharpPlugin/ or plugins/MyFSharpPlugin/, rename the plugin, and restart. See C# plugins for the contract.

RpcProvider starts the command from extraInfo.command and speaks JSON-RPC over stdio. Each directory below is a complete package; the binding is copied from the provider and refreshed when the provider is upgraded.

Template Runtime Build
Node.js/TypeScript Node.js 20+ npm install && npm run build
Python Python 3.8+ none
Kotlin/JVM JDK 21+ ./build.sh (build.ps1 on Windows)

Install RpcProvider and put the runtime executable on PATH, copy the directory into plugins/, and restart. The Python manifest uses python3; change it to python on Windows. See the out-of-process bridge for the protocol and context.

  • Precompiled assembly: multi-file projects, NuGet dependencies, and code that ships as a DLL.
  • C# or F# source: one-file plugins that the provider compiles at load.
  • RPC: Node.js, Python, and Kotlin plugins, or work that should run outside the server process.