@dynamicaaa/unrpyc-js
v1.0.0
Published
Node.js wrapper around unrpyc powered by PyRunner (bundled with RPX).
Maintainers
Readme
UnrpycJS
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.
Installation
npm install @dynamicaaa/unrpyc-jsThe module downloads a portable Python runtime on first use (cached under ~/.pyrunner).
Usage
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);API
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.
License
MIT © Dynamicaaa
