Skip to content

Templates

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; Hosihikari.Plugin.Abstractions 1.0.0 and later are MIT.

The plugin manager's built-in assembly loader loads a .NET class library. No loader package is needed.

Terminal window
dotnet new install Hosihikari.Plugin.Templates
dotnet new hosihikari-plugin -n MyPlugin # C#
# or
dotnet new hosihikari-plugin-fsharp -n MyPlugin # F#

Build and pack with Hosihikari.Plugin.Build; no framework checkout is needed:

Terminal window
cd MyPlugin
dotnet add package Hosihikari.Plugin.Build --version 1.0.0
dotnet build -t:PackPlugin

The target writes dist/MyPlugin/. Multi-target projects pass -f <tfm>. See Testing plugins for the test package and the template README.

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

Template Loader Install
CSharpPluginTemplate hosihikari-csharp lip install github.com/HosihikariFramework/CSharpLoader
FSharpPluginTemplate hosihikari-fsharp lip install github.com/HosihikariFramework/FSharpLoader

CSharpPluginTemplate demonstrates #:package and #:include; run its pack.ps1 or pack.sh, then copy dist/MyCSharpPlugin/ into plugins/. FSharpPluginTemplate demonstrates #load; copy the repository into plugins/MyFSharpPlugin/ directly. Rename the plugin and restart. See C# plugins for the contract.

RpcLoader 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 loader and refreshed when the loader 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 RpcLoader 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 out-of-process plugins for the protocol and context.

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