shire Docs
Docs/Plugin API/Official examples

Official Examples

All examples are real, runnable plugins. They use only the public API.

Python (7 examples)

Directory Demonstrates Permissions
examples/plugins/hello-python log, notification, text, button notifications.show, ui.create
examples/plugins/player-info-python player position and scene, refresh button player.read, world.read, ui.create
examples/plugins/custom-ui-python toggle, slider, input, select, progress, storage ui.create, storage.*, notifications.show
examples/plugins/event-listener-python subscriptions and UI updates from events events.subscribe, player.read, ui.create
examples/plugins/settings-manager-python load/save settings, restore defaults ui.create, storage.*, notifications.show
examples/plugins/map-overlay-python marker list and teleport to nearest map.read, teleport.write, ui.create, notifications.show
examples/plugins/advanced-python player + entities + markers + events + storage + async-style refresh all public read/UI/storage/event permissions

Run one against the mock Host:

python tools\shire-plugin\shire_plugin.py test examples\plugins\hello-python

Pack and install:

python tools\shire-plugin\shire_plugin.py pack examples\plugins\hello-python

TypeScript / Node

  • examples/plugins/hello-typescript — main.ts + shire-sdk.js/.d.ts, built to out/main.js.
cd examples\plugins\hello-typescript
npx --yes -p typescript tsc -p .
node ..\..\..\tools\shire-plugin\shire_plugin.py test .

C++

  • examples/plugins/hello-cpp — two-connection SDK, UI and notification.
  • Build with the provided CMake project; output out/plugin.exe.

Rust

  • examples/plugins/hello-rust — the shire-sdk crate with two connections.
  • Build with cargo build --release --target-dir out; output out/release/plugin.exe.

C

  • examples/plugins/hello-csharp — Client.ConnectAsync, UI and notification.
  • Build with dotnet publish -c Release -o publish; output publish/Plugin.dll.

Why the compiled examples use language: "executable" / "dotnet"

The Host does not compile plugins. It launches an entrypoint:

  • C++ and Rust compile to an .exe; the manifest language is executable.
  • C# publishes a DLL; the manifest language is dotnet, and the Host runs dotnet <entrypoint>.

shire-plugin build detects CMakeLists.txt, Cargo.toml and *.csproj and runs the right toolchain. shire-plugin test builds automatically when the entrypoint is missing.

Templates

shire-plugin init reproduces the same structures for a new plugin id/name. The SDK files are copied into the project so the package is self-contained at runtime (Python/Node) or self-contained after compilation (C++/Rust/C#).

Shire Plugin API 1.0 · Written in English. Documentation home · API status · Changelog

Independent project. Not affiliated with HoYoverse. Never put secrets in a plugin, manifest or package.