Mirror of pionxzh/wakaru
  • Rust 92.6%
  • JavaScript 5.3%
  • TypeScript 0.8%
  • MDX 0.5%
  • HTML 0.4%
  • Other 0.4%
Find a file
pionxzh 6bd091dfd8
test(unpack): expect the replaced colon in the Unix-only public path test
The rebase onto main brought in the rule that replaces characters Windows
rejects in each sanitized component, and the other colon expectations were
updated then. This test runs only on Unix, so it was missed: the segment
still stays a name below the root, now spelled `a_b.js`.
2026-11-03 02:55:00 +08:00
.cargo docs(testing): document accepting snapshots without cargo-insta 2026-09-29 17:31:53 +08:00
.config ci: run tests with nextest 2026-06-14 04:18:55 +08:00
.github ci(website): deploy the landing page from GitHub Actions 2026-10-10 18:29:02 +08:00
.vscode chore: rewrite README for v1.0.0 and publish to latest 2026-05-11 04:10:10 +08:00
crates test(unpack): expect the replaced colon in the Unix-only public path test 2026-11-03 02:55:00 +08:00
design chore(website): move og-card.html out of the deploy directory 2026-09-05 20:29:23 +08:00
docs fix(unpack): keep recovered names and glob-import names under the same filename rules 2026-11-02 22:51:12 +08:00
docs-site fix(unpack): keep recovered names and glob-import names under the same filename rules 2026-11-02 22:51:12 +08:00
examples chore: add examples and restore vscode settings 2026-05-07 02:52:53 +08:00
npm chore(release): prepare v1.16.0 2026-11-03 02:25:07 +08:00
playground build(playground): refresh dependencies to patched versions 2026-10-24 02:42:49 +08:00
scripts test(repro): add Babel SystemJS-lowered rows to the Vue render matrix 2026-10-10 15:01:48 +08:00
skills/wakaru fix(cli): keep a directory candidate whose bundle split was refused 2026-11-03 01:05:41 +08:00
testcases chore: disallow .only test to be commited 2024-05-27 03:40:03 +08:00
website docs: list Turbopack production chunks among supported bundlers 2026-10-10 17:47:28 +08:00
.gitattributes docs: rewrite project documentation 2026-05-02 01:06:00 +08:00
.gitignore chore: ignore local agent workspace 2026-06-17 00:30:19 +08:00
AGENTS.md docs(testing): require a pipeline test for new matchers and an unfiltered private check before merge 2026-10-10 03:06:31 +08:00
Cargo.lock chore(release): prepare v1.16.0 2026-11-03 02:25:07 +08:00
Cargo.toml chore(release): prepare v1.16.0 2026-11-03 02:25:07 +08:00
CHANGELOG.md chore(release): prepare v1.16.0 2026-11-03 02:25:07 +08:00
CLAUDE.md docs: add AGENTS.md with project overview, symlink CLAUDE.md 2026-05-02 01:07:24 +08:00
CONTRIBUTING.md docs(testing): write test inputs with synthetic names 2026-10-02 15:37:22 +08:00
LICENSE chore: switch Rust branch to Apache-2.0 2026-05-03 23:19:51 +08:00
README.md fix(un-optional-chaining): recover member optional calls lowered without temps 2026-10-08 02:04:34 +08:00
rust-toolchain.toml ci: pin Rust 1.97 and fix clippy 2026-07-12 03:07:13 +08:00

Wakaru

Unpack. Unminify. Understand.

Wakaru is a JavaScript decompiler. It splits production bundles into modules and restores readable, modern syntax from minified and transpiled code.

CI npm Telegram

Try it in the playground

Quick start

Run without a global install:

npx wakaru input.js -o output.js       # decompile a file
npx wakaru bundle.js --unpack -o out/  # unpack and decompile a bundle
npx wakaru dist/ --unpack -o out/      # scan a bundle output directory

See the CLI reference for rewrite levels, source maps, and more options.

Install

For regular use, install the CLI globally:

npm install -g wakaru@latest

Standalone binaries are available from GitHub Releases.

What it does

Wakaru rewrites the JavaScript AST to recover modern syntax, remove recognized runtime helpers, and split supported bundles into modules.

Minified Babel output:

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadProfile=void 0;
var _api=_interopRequireDefault(require("./api"));
function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}
function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,u,"next",e)}function u(e){c(a,n,o,i,u,"throw",e)}i(void 0)})}}
function c(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}
var loadProfile=function(){var e=_asyncToGenerator(function*(e){var t=yield _api.default.fetchUser(e),r=null!=t.name?t.name:"anonymous";return{name:r,avatar:null==t.profile?void 0:t.profile.avatar}});return function(t){return e.apply(this,arguments)}}();exports.loadProfile=loadProfile;

Wakaru output:

import _api from "./api";
export const loadProfile = async (e)=>{
    const t = await _api.fetchUser(e);
    const name = t.name ?? "anonymous";
    return {
        name,
        avatar: t.profile?.avatar
    };
};

The helpers become async/await, the null checks become ?? and ?., and CommonJS imports and exports become ESM. Some names, such as e and t, stay short because the input does not provide their original names.

What it handles

  • Bundles: split webpack, esbuild/Bun, Browserify, and Metro output into readable modules.
  • Transpiled code: recover modern syntax from Babel, TypeScript, and SWC output.
  • Minified code: expand compact expressions and simplify control flow.

See supported inputs for the full list and format-specific limits.

Guides

Tested like a compiler

We test both behavior and recovery against real compiler and minifier output:

Use cases

  • Security and supply-chain review: inspect the JavaScript a site or dependency ships, with supported bundles split into modules.
  • Debugging third-party SDKs: follow the code behind a stack trace or investigate behavior in a distributed build.
  • Source recovery: recover readable modules when only build artifacts remain, or extract original files embedded in source maps.

Works with other tools

Wakaru focuses on minifier and transpiler recovery. For supported obfuscation patterns, a deobfuscator such as webcrack can prepare the input before Wakaru processes it. Heavy control-flow or VM-based obfuscation needs a dedicated approach.

For AI-assisted identifier naming, see humanify. Inferred names are reading aids; source maps are the source of original names when available.

Use it from an agent

Give your coding agent readable modules to search and inspect. With the Wakaru skill, it can unpack a bundle and focus on the files relevant to your question, keeping unrelated code out of context.

Install via skills.sh:

npx skills add pionxzh/wakaru

In development: package inventory

Package inventory is under development: identify which npm packages and versions a production bundle contains. It is not part of the current release.

Share your use case to help shape its scope and priority, or contact hello@wakarujs.com.

Contributing

Small fixes, missing recovery patterns, and correctness reports are welcome. For a bug report, include the input, command, current output, and expected behavior. A clear issue is useful even without a proposed fix.

See CONTRIBUTING.md for setup and PR guidance, and docs/README.md for the development documentation.

License

Apache-2.0

Usage of Wakaru for attacking targets without prior mutual consent is illegal. End users are responsible for complying with all applicable laws.