View on Github

Only the assets you need.

Fetch minified JavaScript and CSS directly from npm packages. No node_modules bloat. No postinstall scripts. Just the files you actually use.

Install MPM Learn more
$
npm install -g @amaanwarsi/mpm
~ zsh
mpm get lodash
✔ Resolved lodash@4.17.21
✔ Extracted tarball to temporary folder
✔ Best candidate: lodash.min.js (score 31)
✔ Copied to asset_modules/lodash.min.js
✔ Updated package.json

Stop downloading
what you don't need.

MPM resolves packages from the npm registry, extracts tarballs, intelligently ranks files, and copies only the best candidates.

Saves Disk Space

No node_modules bloat. MPM downloads only the tarball, extracts temporarily, and copies the final assets you actually need.

Fast

Built on top of npm for speed. Downloads only the tarball, extracts temporarily, and copies what matters in seconds.

Low Risk

Doesn't execute any package code. Never runs postinstall scripts. Just static file extraction and copying.

Smart Ranking

Automatically picks the most likely asset minified, inside /dist, matching package name, reasonable size. Scored and ranked.

GitHub Fallback

If npm fails, MPM scans GitHub repositories for the same asset patterns. You always get your file, one way or another.

Tracks Everything

Updates your package.json under an "assets" section for full reproducibility. Update all assets with a single command.

How MPM finds
the right file.

dist/lodash.min.js
31
dist/lodash.js
21
lib/lodash.min.js
15
src/lodash.js
5
test/lodash.spec.js
-15
1

Resolve & Download

MPM resolves the package from the npm registry and downloads the tarball to a temporary folder.

2

Scan & Score

Each candidate file receives a score based on positive signals (.min.js, /dist, name match) and negative signals (/src, test files, too small).

3

Tie-Breaker

When scores match, MPM prioritizes: exact name match → index/main → shortest folder depth.

4

Copy & Track

The highest-scoring file is copied to your output directory and tracked in package.json for reproducibility.

Simple by design.

Three commands. That's all you need to manage your project's assets.

mpm get <pkg>

Fetch assets for a specific package. Supports --js, --css, --version, and --out flags.

mpm update <pkg>

Update specific package assets defined in package.json. Re-fetches and replaces output files with the latest version.

mpm delete <pkg>

Remove asset entries and delete the corresponding files from disk. Clean removal, no traces left behind.

mpm get --all

Process all packages listed in the package.json → assets section. Perfect for bootstrapping a project.

Flags

--js
Only download JavaScript assets. Prefers minified versions.
--css
Only download CSS assets.
--all
Process all packages listed in package.json → assets section.
--out <path>
Custom output folder. Default: asset_modules/.
--version <ver>
Specify a package version. Example: mpm get lodash --version 4.17.21
--force
Skip cache, re-download and re-extract the tarball.

Tracked in your
package.json.

MPM writes an "assets" object for full reproducibility and easy updates.

package.json
{
  "name": "my-project",
  // ... other fields
  "assets": {
    "preline": {
      "version": "2.0.1",
      "files": ["dist/preline.min.js"],
      "type": "js",
      "out": "assets/ui.js"
    },
    "bootstrap": {
      "version": "5.3.0",
      "files": ["dist/css/bootstrap.min.css"],
      "type": "css",
      "out": "assets/bootstrap.css"
    }
  }
}

files

The exact file(s) that were selected from the package. Can be overridden manually in package.json.

type

Either "js" or "css". Determines how the asset is categorized and filtered.

out

Where the file was copied, relative to the project root. MPM uses this path when updating assets.

update command

Running mpm update re-fetches each package and replaces the output file with the newly selected asset.

Important: MPM is designed for standalone, bundled assets (UMD, IIFE, pre-compiled CSS) meant for direct browser use. ES Module or CommonJS files with internal imports will break. MPM intentionally does not download the node_modules tree.

When npm isn't enough.

If the npm registry lookup fails, MPM seamlessly falls back to GitHub scanning repositories and applying the same ranking engine.

Try npm
Search GitHub
Rank Files
Download Raw

Start fetching
only what you need.

No more node_modules bloat. No more wasted disk space. Just the assets your project actually uses.