# Install yarn with Homebrew

JavaScript package manager. Version 1.22.22 via Homebrew; verified 2026-07-04.

## Install

```sh
sudo av install brew:yarn
```

## Agent safety answer

yarn manages JavaScript dependencies and package scripts with registry access.

- **Credential access:** Reads npm/yarn registry tokens, environment variables, and package scripts.
- **Remote mutation:** Can install packages and run scripts that modify remote systems.
- **Publish/artifact risk:** Can publish packages and build release artifacts.
- **Recommended control:** Gate publish, install scripts, and credentialed registry operations.
- **Agent-use guidance:** Allow local test/build after scan; require approval for publish and lifecycle scripts.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install yarn
```

  Evidence: provider-native install command

## Package facts

- **Package key:** brew:yarn
- **Package manager:** Homebrew
- **Version:** 1.22.22
- **Source summary:** JavaScript package manager
- **Homepage:** <https://yarnpkg.com/>
- **Repository:** <https://github.com/yarnpkg/yarn>
- **Last updated:** 2026-07-04T13:13:45+09:00
- **Generated:** 2026-08-03T00:40:33+00:00

## Executables

- yarn (alias)
- yarnpkg (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.22.22
## Project history and usage

Yarn is a JavaScript package manager created to make npm-registry installs faster, more reliable, and more reproducible. The Homebrew `yarn` package points at the classic 1.x line, but the project history continues through Yarn Berry and modern Yarn releases.

### Project history

Yarn was open-sourced on 2016-10-11 as a collaboration between Facebook, Exponent, Google, and Tilde. The launch post emphasized continued access to the npm registry while improving speed, consistency across machines, and secure offline operation.

The 1.x line established the features that made Yarn famous: a lockfile, deterministic installs, a global cache, offline mode, checksums, concurrency, and workspace-oriented workflows. The classic repository README now says the 1.x codebase is frozen except for historical upkeep and occasional hotfixes.

Modern Yarn moved to the yarnpkg/berry repository, created in 2018. Yarn 2.0 shipped on 2020-01-24 after a year of intensive development, bringing a TypeScript codebase, plugin architecture, Plug'n'Play, workspace-aware commands, a YAML lockfile/config model, and a different release and migration story from classic Yarn. Yarn 4.0 followed in 2023 after a long release-candidate cycle focused on reducing migration pain and improving user experience.

### Adoption history

Yarn's adoption was fast because it solved immediate pain in large JavaScript dependency trees: slow installs, non-determinism, network fragility, and inconsistent environments. It did not replace the npm registry; it competed at the client and workflow layer while consuming the same package ecosystem.

Classic Yarn became common in CI systems, monorepos, front-end applications, and open-source JavaScript projects. Later Yarn adoption split into two cultures: projects staying on stable 1.22.x for node_modules compatibility and projects moving to Berry for Plug'n'Play, constraints, plugins, workspaces, and zero-install workflows.

### How it is used

Typical classic workflows are `yarn install`, `yarn add`, `yarn remove`, `yarn upgrade`, and `yarn run`, with `yarn.lock` committed so dependency resolution is reproducible. Workspaces let monorepos manage multiple packages in a single install graph.

Modern Yarn expands that usage into project management: `yarn set version`, plugins, constraints, workspace foreach commands, patch protocols, portable script execution, and selectable install strategies including node_modules and Plug'n'Play.

### Why package nerds care

Yarn is one of the defining package-manager projects of the 2010s because it forced JavaScript tooling to treat reproducibility, lockfiles, cache behavior, and CI determinism as first-class package-manager features. Its competition with npm changed expectations for every JavaScript dependency client that followed.

For package nerds, Yarn is also a rare case where the package manager itself has two living historical identities: Yarn Classic as the widely packaged 1.x executable and Yarn Berry/Modern as the active architecture with plugins, PnP, and project-management features.

### Timeline

- 2016-01-19: yarnpkg/yarn repository is created on GitHub.
- 2016-10-11: Yarn is announced as a Facebook, Exponent, Google, and Tilde collaboration.
- 2016-10-18: GitHub release v0.16.0 is published shortly after launch.
- 2018-09-10: yarnpkg/berry repository is created for the modern Yarn line.
- 2020-01-24: Yarn 2.0 is released after 365 days of development.
- 2023-10-23: Yarn 4.0 is announced after 53 release candidates.
- 2024-03-09: Yarn Classic v1.22.22 is published.

### Related projects

- npm is the registry and original package-manager client Yarn was designed to interoperate with and improve upon.
- yarnpkg/berry is the active modern Yarn repository.
- Bundler and Cargo are named by the classic README as prior art.

### Sources

- <https://api.github.com/repos/yarnpkg/berry>
- <https://api.github.com/repos/yarnpkg/yarn>
- <https://api.github.com/repos/yarnpkg/yarn/releases?per_page=100>
- <https://classic.yarnpkg.com/blog/2016/10/11/introducing-yarn/>
- <https://github.com/yarnpkg/berry>
- <https://github.com/yarnpkg/yarn>
- <https://raw.githubusercontent.com/yarnpkg/berry/master/README.md>
- <https://raw.githubusercontent.com/yarnpkg/yarn/master/README.md>
- <https://yarnpkg.com/blog/release/2.0>
- <https://yarnpkg.com/blog/release/4.0>
- <https://yarnpkg.com/migration/overview>


## Security Notes

package manager and supply-chain mutator.

- **Geiger risk:** orange / high
- package manager and supply-chain mutator


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .yarnrc

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- curated agent safety answer
