A modern JavaScript wrapper around the unrpyc Python tool, powered by @dynamicaaa/pyrunner. It is published as part of the RPX toolkit but can also be used independently if you need .rpyc decompilation in your own workflows.
npm install @dynamicaaa/unrpyc-jsThe module downloads a portable Python runtime on first use (cached under ~/.pyrunner).
import UnrpycJS from '@dynamicaaa/unrpyc-js'; const unrpyc = new UnrpycJS({ debug: false }); await unrpyc.init(); // Decompile a single file const result = await unrpyc.decompileFile('game/script.rpyc', { overwrite: true, outputDir: 'build/decompiled' }); console.log(result);new UnrpycJS(options)– initialise the wrapper. Options mirror the CLI flags exposed by RPX.init()– prepare the Python runner and installunrpycif missing.decompileFile(inputPath, options)– decompile a single.rpycor.rpymcfile.decompileDirectory(inputDir, options)– batch decompile directories.isValidRpycFile(filePath)– test if a file looks like a valid Ren''Py compiled script.getVersion()– return the underlyingunrpycversion string.
Refer to the inline JSDoc inside index.js for full option details.
MIT © Dynamicaaa