@rin-chat/rinext
The command-line kit for Rin Chat extensions: start from a template, test an extension in
Rin Chat's own sandbox, sign and pack it into a .rinext, and check a package the way the app's install dialog
will.
Guide: https://rin.chat/developers/extensions/ (getting started, the API, hooks, limits, five tested examples).
npm install -g @rin-chat/rinext # then: rinext <command>
npx @rin-chat/rinext <command> # or without installing
Node.js 22.2 or later. No other dependencies.
rinext init <dir> copy the template (an extension and its tests) into a new folder
rinext keygen <out-dir> make an author key
rinext pack <folder> --key <private-key> [--out f] check, sign and zip a folder into a .rinext
rinext check <file.rinext> what Rin Chat would show for it, or why it refuses it
rinext test <folder> [test-file] run it in Rin Chat's sandbox against a fake chat
Exit codes: 0 done, 1 refused or a test failed, 2 usage.
rinext test runs your script in the same QuickJS sandbox as the app, behind the same checks on every rin.*
call, with its hooks called the way the app calls them, the app's limits (1000 ms per hook, 100 ms of CPU per
call, 32 MB of heap) and the same error codes. Types for the rin API are
in @rin-chat/extension-api.
MIT licensed. dist/ bundles QuickJS (quickjs-emscripten) and other packages under their own licenses, listed
in dist/THIRD-PARTY-LICENSES.txt.