Mod Developer Guide
Use this guide when building desktop mods in any independent mod repository.
Development contract
- Mods run through
nimi-hookinside desktop sandbox - Mods do not call runtime/realm directly
- Runtime and realm capabilities are exposed through approved hook interfaces
Local development
bash
# Scaffold once
pnpm dlx @nimiplatform/dev-tools nimi-mod create --dir my-mod --name "My Mod"
# Then inside your mod repo
cd my-mod
pnpm install
pnpm devThen inside Desktop:
- Open
Settings > Mod Developer - Enable
Developer Mode - Add your mod directory as a
devsource - Enable
Auto Reloadif desired - Watch diagnostics and reload results in the same panel
Desktop side development should be UI-only. NIMI_RUNTIME_MODS_DIR is kept only for CI/internal compatibility, not for the main third-party flow.
Recommended toolchain:
- inside this monorepo: invoke
dev-tools/bin/nimi-mod.mjs - outside this monorepo:
pnpm add -D @nimiplatform/dev-toolsand use the publishednimi-modCLI
Validation
bash
pnpm build
pnpm doctor
pnpm packFor a runnable mod repo template, see examples/mod-template.
For a mod SDK sample using setModSdkHost(), createHookClient(), and createModRuntimeClient(), see examples/mods/mod-basic.ts.
For official release flow, catalog publishing, and third-party listing review, see Mod Release And Submission Guide.