Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
W

wakaru

> 开发工具
Open source

Javascript decompiler for modern frontend

940 stars0 likes1 views
WebsiteGitHub

About

Javascript decompiler for modern frontend

Quick start

Run without a global install:

bash
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:

bash
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:

…

Wakaru output:

javascript
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.

Tested like a compiler

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

  • 62,155 passing Test262 semantic round trips. Methodology and baseline.
  • 97.7% pattern recovery across 2,115 transpiler × minifier test shapes. Per-matrix results.

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:

bash
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 [email protected].

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustastbabelbrowserifybun

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具