I built App Anatomy, a tool that reads a shipped app and shows what is inside it and how many bytes each part takes: the runtime, third-party libraries, the app's own code, and assets. It draws the result as a 3D chip you can open.
You can try it without installing anything: scs0209.github.io/app-anatomy
What it shows
Joplin, a note-taking app, is 613.7 MB on a Mac.
- 47% is the Electron framework
- 22% is an AI inference runtime (onnxruntime-web)
- 12% is the app's own bundled code
On the chip, area is bytes, height is the layer (app, runtime, library, module), and color is where the part came from. The camera is orthographic, so equal areas look equal. Parts that no rule names yet stay gray and hatched.
Scan your whole Mac
npx app-anatomy scan --open This reads every app in /Applications and opens the result in your browser, served from 127.0.0.1 only. It tells you things like how many copies of Electron you have installed and how much disk they take together.
It also reads one app at a time: a .app folder, a ZIP with a .app inside, an Android APK or an iOS IPA.
npx app-anatomy some.apk android-release.apk · apk · 226.7 MB (uncompressed) runtime: react-native 23.5% largest: libjingle_peerconnection_so.so 19.0% · libreactnative.so 11.6% · libbarhopper_v3.so 8.9% identified 94.0% · not looked inside 6.5% · overhead 2.8% Take a block out and see what falls
Drag a block off the chip. The size is recounted, and every part that declares it needs that block goes dark.
In Joplin, removing the 0.4 MB onnxruntime-common package takes 218 MB down with it.
Where the edges come from:
-
dependenciesin eachpackage.jsoninside an Electron app's asar -
DT_NEEDEDin ELF binaries (Android native libraries) -
LC_LOAD_DYLIBin Mach-O binaries - the fact that an Electron app's code needs the Electron framework
Nothing is run. "Goes down with it" means "says it needs it", not "was observed to fail". Code loaded by name at run time is not declared, so it does not show.
How it works
an app file or folder → a host reads bytes on request (Node for the CLI, a Web Worker in the browser) → the analyzer (Rust, compiled to WebAssembly) → one result JSON → the terminal summary, the 3D chip, a flat treemap, a list, a share card - One analyzer, two hosts. The command line and the browser run the same WebAssembly file and produce the same JSON for the same input. That is also why nothing needs to be uploaded.
- Rules are data. A part is named by a few lines of JSON: literals, prefixes and a restricted glob, no regular expressions. There are 651 rules so far, most converted from LibChecker-Rules.
- Exact byte accounting. A parent's bytes always equal the sum of its children. Whatever is not attributed to a part is shown as overhead.
How it got here
The first version only drew the chip. It looked good, and then I had to ask myself an uncomfortable question: what do you actually do with this? A picture of one app is something you look at once.
Three changes came out of that question.
Scanning the whole Mac. One app is trivia. Every app you have installed, side by side, is about your own disk, and that is what people want to look at first.
Taking a block out. My first attempt removed a block when you clicked it. It felt wrong immediately: you don't click a part out of a chip, you pull it out. So now you drag it off the board and drop it.
Showing what falls. Even then, removing a block only recounted the size, and subtraction is not interesting. What you want to know is what else stops making sense without that part. That is why the analyzer now records declared dependencies, and why a 0.4 MB package can take 218 MB down with it.
One thing went wrong in public. Version 0.1.1 shipped with the traced labels missing on wide screens: a comment I added on one line swallowed the option next to it. No test caught it, because the site has no automated tests. I only saw it while recording the demo for the README, and fixed it in 0.1.2. It is still on the limitations list for that reason.
What it does not do yet
- Scanning a machine is macOS only.
- Native Mac apps are mostly unidentified. On my Mac, 31% of all bytes were identified, because most rules are for Android libraries and Electron apps.
- Encrypted iOS apps (App Store downloads) show structure only.
- It has been checked in Chromium-based browsers. Safari and Firefox are not verified.
- The site has no automated test suite.
Adding a rule
Each gray block is a rule nobody has written. This one took Rocket.Chat's Android app from 90.9% to 94.0% identified:
{ "id": "lib.watermelondb", "name": "WatermelonDB", "kind": "library", "category": "other", "homepage": "https://github.com/Nozbe/WatermelonDB", "match": [ { "target": "file-name", "type": "literal", "value": "libwatermelondb-jsi.so", "packaging": ["apk"] } ] } You only need Node to write and test one. CONTRIBUTING.md walks through it. If you see a part labeled wrong, that report is the most useful one.
Source, Apache-2.0: github.com/scs0209/app-anatomy


