Skip to content

A simple wrapper for the ForgeFlower java decompiler, made with Node.js

License

Notifications You must be signed in to change notification settings

Hennamann/node-forgeflower

Repository files navigation

node-forgeflower

A simple wrapper for the ForgeFlower java decompiler, made with Node.js.

It's largely based on the existing source code for node-fernflower but altered to use ForgeFlower instead of Fernflower.

Installation

CLI Installation

A CLI interface for ForgeFlower can be installed with the following command:

npm install -g fernflower

Programmatic Installation

To install it for use programmatically in a node.js project the following command will install it in your npm project:

npm install fernflower

Usage

CLI Usage

The CLI interface can be used like this:

forgeflower <jarFile> <outputDir> [<verbose>]

Programmatic Usage

Here's an example for using the package programmatically:

const forgeflower=require("forgeflower");
const path = require('path');


const inputJar=path.join(__dirname,"forgeflower.jar");
const outputDir=path.join(__dirname,"output");

forgeflower(inputJar,outputDir)
  .then((decompiledDir) => console.log("Decompiled "+inputJar+" at "+decompiledDir))
  .catch(err => console.log(err.stack));

See the example.js file located in this repository for a full example.

License

This project is licensed with the Apache 2.0 license, see the LICENSE file.

Releases

No releases published

Packages

No packages published