# Install yuicompressor with Homebrew, MacPorts, Nix

Yahoo! JavaScript and CSS compressor. Version 2.4.8 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:yuicompressor
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install yuicompressor
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install yuicompressor
```

  Evidence: MacPorts ports tree: www/yuicompressor/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#yuicompressor
```

  Evidence: nixpkgs package indexes: pkgs/by-name/yu/yuicompressor/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:yuicompressor
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/yuicompressor>
- **Version:** 2.4.8
- **Source summary:** Yahoo! JavaScript and CSS compressor
- **Homepage:** <https://yui.github.io/yuicompressor/>
- **Repository:** <https://github.com/yui/yuicompressor>
- **Upstream docs:** <https://github.com/yui/yuicompressor#readme>
- **License:** BSD-3-Clause
- **Source archive:** <https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- yuicompressor (cli)
- yuicompressor (alias)

## Dependencies

- openjdk

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.4.8
- Local data: ok
- Upstream repository: https://github.com/yui/yuicompressor
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

YUI Compressor is Yahoo's Java-based JavaScript and CSS minifier from the YUI era. It removes comments and whitespace, shortens local JavaScript symbols when safe, compresses CSS, and became a standard build-step tool before newer JavaScript-native minifiers took over much of the ecosystem.

For package managers, its identity is very CLI-shaped: install a small wrapper around a Java jar, point it at .js or .css files, and produce smaller production assets. That made it easy to package across Homebrew, MacPorts, Maven, npm wrappers, and older Ant-era web build systems.

### Project history

The project grew out of Yahoo's frontend performance work around the YUI Library. The official project page frames minification as one of the secondary performance techniques used after larger page-design savings, and compares YUI Compressor with tools such as JSMin, the Dojo compressor, and Dean Edwards' Packer.

Technically, YUI Compressor used Mozilla Rhino to tokenize JavaScript instead of relying only on text substitutions. That let it remove whitespace and rename local symbols while taking a defensive approach around difficult JavaScript constructs such as eval and with. CSS compression was also included, using a regular-expression-based minifier lineage credited on the official page.

The public GitHub repository was created in December 2008, while the changelog preserves a longer 2.x release line. The final tagged GitHub release, v2.4.8 'Greendale', was published in July 2013 and focused on compatibility fixes, CSS compression improvements, warning output, parameter parsing, batch modes, and tests.

### Adoption history

YUI Compressor became popular because it matched the way web teams shipped assets in the late 2000s and early 2010s: Java was already common in build infrastructure, Ant integration was natural, and the command-line interface fit makefiles, CI jobs, and static asset deployment scripts.

Its official documentation emphasizes byte savings compared with JSMin and safe handling of JavaScript and CSS. Those claims mattered in the pre-bundler period, when teams often concatenated and minified library files directly rather than running a full module pipeline.

Later adoption shifted toward wrapper packages and legacy maintenance. The README documents an npm package that still invokes Java under the hood, showing how the compressor was carried forward into Node-oriented workflows even though its implementation remained a Java command-line tool.

### How it is used

Typical use is batch minification: run the yuicompressor command or jar against JavaScript or CSS input, set the type explicitly when needed, and write to stdout or an output file. The README documents options for character set, line breaking, JavaScript symbol munging, semicolon preservation, and disabling micro-optimizations.

The tool is most relevant today when reproducing older web builds, maintaining projects that were pinned to YUI-era minification behavior, or comparing historical minifier output. It is also a useful example of a minifier that exposes safety knobs for constructs and comments that mattered to production JavaScript/CSS deployment.

### Why package nerds care

YUI Compressor is package-nerd archaeology from the period when frontend optimization was often a Java jar in a build directory. It sits between tiny text filters such as JSMin and modern JavaScript bundler/minifier stacks, and it explains why many old packages still have yuicompressor hooks.

It also shows how a once-central tool can survive as a compatibility package: the web moved on to UglifyJS, terser, esbuild, SWC, and bundlers, but package collections keep YUI Compressor available for old build recipes and reproducible maintenance work.

### Timeline

- 2008-12-05: The public GitHub repository for yui/yuicompressor is created.
- 2008-2010: The 2.x changelog records active fixes around JavaScript parsing, CSS compression, source compatibility, and batch workflows.
- 2013-07-03: GitHub release v2.4.8, named Greendale, is published.
- 2021-09-15: GitHub metadata shows the repository's most recent push before the 2026 enrichment run.

### Related projects

- YUI Library is the Yahoo frontend library whose performance culture helped drive the compressor.
- Mozilla Rhino is the JavaScript engine/tokenizer lineage used by YUI Compressor, with local modifications documented in the README.
- JSMin, the Dojo compressor, and Dean Edwards' Packer are named by the official project page as contemporary JavaScript minification tools.

### Sources

- <https://api.github.com/repos/yui/yuicompressor>
- <https://api.github.com/repos/yui/yuicompressor/releases>
- <https://github.com/yui/yuicompressor>
- <https://raw.githubusercontent.com/yui/yuicompressor/master/README.md>
- <https://raw.githubusercontent.com/yui/yuicompressor/master/doc/CHANGELOG>
- <https://yui.github.io/yuicompressor/>


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** yuicompressor
- **Version Scheme:** 0
- **Revision:** 1
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - yuicompressor: normalized package name match | nixpkgs package indexes: pkgs/by-name/yu/yuicompressor/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - yuicompressor: normalized package name match | MacPorts ports tree: www/yuicompressor/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [emscripten](https://www.automicvault.com/pkg/brew/emscripten/) - Popular package that depends on this formula.
- [esbuild](https://www.automicvault.com/pkg/brew/esbuild/) - Shares av.db curated category or tags: build-tools, cli, css, developer-tools, javascript.
- [grunt-cli](https://www.automicvault.com/pkg/brew/grunt-cli/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, javascript.
- [pulp](https://www.automicvault.com/pkg/brew/pulp/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, javascript.
- [rollup](https://www.automicvault.com/pkg/brew/rollup/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, javascript.
- [vite](https://www.automicvault.com/pkg/brew/vite/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, javascript.
- [webpack](https://www.automicvault.com/pkg/brew/webpack/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, javascript.
- [yeet](https://www.automicvault.com/pkg/brew/yeet/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, javascript.
- [ant](https://www.automicvault.com/pkg/brew/ant/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools.
- [yuicompressor](https://www.automicvault.com/pkg/npm/yuicompressor/) - Same normalized package name appears in another local ecosystem. Shared terms: compressor, yuicompressor.
- [leiningen](https://www.automicvault.com/pkg/brew/leiningen/) - Local metadata places this package in an adjacent workflow. Shared terms: build, build-tool, build-tools, cli, developer.
- [yuicompressor](https://www.automicvault.com/pkg/npm/yuicompressor/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/yuicompressor.yml](https://github.com/automic-vault/db/blob/main/combined/yuicompressor.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
