CLI tool for JavaScript deobfuscation using LLMs
Top 19.4% on sourcepulse
HumanifyJS is a tool designed to deobfuscate, unminify, and decompile JavaScript code, making it more readable for developers. It leverages Large Language Models (LLMs) like ChatGPT and local models, combined with Babel for AST-level transformations, to rename variables and functions while ensuring code equivalence.
How It Works
The tool employs a hybrid approach. LLMs provide intelligent suggestions for renaming variables and functions, enhancing code readability. These suggestions are then integrated with Babel, a JavaScript compiler, which performs structural transformations on the Abstract Syntax Tree (AST) level. This ensures that the deobfuscated code remains functionally identical to the original, even after significant renaming and unminification.
Quick Start & Requirements
npm install -g humanifyjs
humanify <mode> <file.js> [--apiKey="your-token"]
(modes: openai
, gemini
, local
).humanify download <model_name>
(e.g., 2b
).Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
Large files processed with ChatGPT may incur significant token costs (estimated at 2 tokens per character). Local mode accuracy and speed depend heavily on available hardware, with CPU execution being potentially very slow.
3 days ago
1 day