M+Minify++
Start

Getting started

Build the tiny native CLI, minify a file, then decide whether Minify++ belongs directly in your deployment pipeline or behind another build tool.

Install

curl -fsSL https://nift-dev.github.io/minify-website/install | sh

The installer downloads the latest official release for your platform, verifies its SHA-256 checksum against SHA256SUMS from the GitHub release, and installs minify to ~/.local/bin by default. It never uses sudo and does not modify shell profiles. Set MINIFY_INSTALL_DIR to choose another directory, or MINIFY_VERSION to pin a specific release.

Installation requires no runtime beyond the single native binary. Supported platforms are Linux x86-64, macOS arm64/x86-64 and Windows x86-64.

Build from source

make
./minify --version

The project is deliberately self-contained. Nift is not required to build or run Minify++.

Your first minification

minify app.js styles.css data.json

Minify++ keeps the originals and writes sibling outputs:

app.js      → app.min.js
styles.css  → styles.min.css
data.json   → data.min.json

Replace files deliberately

minify --in-place dist/app.js
minify -i dist/styles.css

-i is intentionally explicit because overwriting source should never be an accidental default.

Writes are staged. The CLI prepares a complete sibling temporary output before replacement, preserves an existing regular file's permission bits, and rejects symbolic-link destinations rather than following them. A failed transform/write does not truncate the previous file.

Use it after another compiler

{
  "scripts": {
    "build": "tsc -p tsconfig.json && minify dist/app.js dist/app.css"
  }
}

Minify++ does not care whether the input came from TypeScript, React, Sass, a bundler, Nift, a different static-site generator or handwritten source.

Use it with Nift

nift build
minify public/app.js public/site.css

Nift can also invoke the embedded Minify++ library automatically for configured output extensions. The standalone command remains useful when the file is outside Nift's tracking model.

What to do next

Read Formats before assuming Minify++ applies the same strategy to every file type, then see Battle tested for the cases that have historically broken lightweight minifiers.

Validate the checkout

make test
make test-fuzz
make test-sanitize
make benchmark

The complete test target covers direct format, JavaScript semantic, JSX/TSX, non-JavaScript, cross-format and CLI gates. Fuzzing, sanitizers and performance are separate explicit production-evidence targets.

Use a release pipeline safely

  1. Build or generate the final artifacts.
  2. Keep the unminified output until Minify++ succeeds.
  3. Minify only supported extensions.
  4. Treat non-zero status as a failed optimization step.
  5. Deploy the completed artifacts.
Do not point the current CLI at a directory. It accepts named regular files. Use your build system or file-discovery tool to supply those paths; directory traversal is a possible future convenience, not current behavior.