MCPcopy Index your code
hub / github.com/yarnpkg/berry

github.com/yarnpkg/berry @yarnpkg-cli-4.17.0

repository ↗ · DeepWiki ↗ · release yarnpkg-cli-4.17.0 ↗ · Ask this repo → · + Follow
15,277 symbols 56,108 edges 846 files 83 documented · 1% updated 4d ago@yarnpkg/cli/4.17.0 · 2026-06-15★ 8,087774 open issues
README

Yarn

Fast, reliable, and secure dependency management.

GitHub Actions status Discord Chat Latest CLI Release


Yarn is a modern package manager split into various packages. Its novel architecture allows to do things currently impossible with existing solutions:

  • Yarn supports plugins; adding a plugin is as simple as adding it into your repository
  • Yarn supports Node by default but isn't limited to it - plugins can add support for other languages
  • Yarn supports workspaces natively, and its CLI takes advantage of that
  • Yarn uses a bash-like portable shell to make package scripts portable across Windows, Linux, and macOS
  • Yarn is first and foremost a Node API that can be used programmatically (via @yarnpkg/core)
  • Yarn is written in TypeScript and is fully type-checked

Our supports

Gold sponsors

All your environment variables, in one place. Stop struggling with scattered API keys, hacking together home-brewed tools, and avoiding access controls. Keep your team and servers in sync with Doppler.
Your app, enterprise-ready. Start selling to enterprise customers with just a few lines of code. Add Single Sign-On (and more) in minutes instead of months with WorkOS.

But also

Datadog has been sponsoring the time of our lead maintainer for more than a year now. They also upgraded our account so that we can benefit from long-term telemetry (RFC).
SysGears also sponsored time from very early in the 2.x development. In particular, their strong investment is the reason why Yarn 2 supports node_modules installs even better than it used to.
Netlify has been the historical provider for our website. Each time we got issues, they jumped to our help. Their live previews have been super helpful in our development process.
Cloudflare has also been a historical partner. While we don't directly mirror the npm registry anymore, they still power our website to make its delivery as fast as possible.
Algolia contributed a lot to our documentation over the years. They still power the search engine we use on both versions of the documentation.

Installation

Consult the Installation Guide.

Migration

Consult the Migration Guide.

Documentation

The documentation can be found at yarnpkg.com.

API

The API documentation can be found at yarnpkg.com/api.

Current status

On top of our classic integration tests, we also run Yarn every day against the latest versions of the toolchains used by our community - just in case. Everything should be green!

Contributing

Consult the Contributing Guide.

Building your own bundle

Clone this repository, then run the following commands:

yarn build:cli

How it works

After building the CLI your global yarn will immediately start to reflect your local changes. This is because Yarn will pick up the yarnPath settings in this repository's .yarnrc.yml, which is configured to use the newly built CLI if available.

Works out of the box!

Note that no other command is needed! Given that our dependencies are checked-in within the repository (within the .yarn/cache directory), you don't even need to run yarn install. Everything just works right after cloning the project and is guaranteed to continue to work ten years from now 🙂

Yarn plugins

Default plugins

Those plugins typically come bundled with Yarn. You don't need to do anything special to use them.

Extension points exported contracts — how you extend this code

Linker (Interface)
(no doc) [6 implementers]
packages/yarnpkg-core/sources/Linker.ts
MapLike (Interface)
(no doc) [7 implementers]
packages/plugin-npm/sources/npmConfigUtils.ts
ZipImpl (Interface)
(no doc) [8 implementers]
packages/yarnpkg-libzip/sources/ZipFS.ts
StreamLock (Interface)
(no doc) [4 implementers]
packages/yarnpkg-shell/sources/pipe.ts
Engine (Interface)
(no doc) [4 implementers]
packages/plugin-constraints/sources/constraintUtils.ts
PackageInformation (Interface)
* `CombinedPackument` with a `versions` field that is an array of tags
packages/plugin-npm-cli/sources/commands/npm/info.ts
MountableFS (Interface)
(no doc) [2 implementers]
packages/yarnpkg-fslib/sources/MountFS.ts
ConfigurationValueMap (Interface)
(no doc)
packages/plugin-version/sources/index.ts

Core symbols most depended-on inside this repo

join
called by 2679
packages/yarnpkg-fslib/sources/path.ts
run
called by 1852
packages/acceptance-tests/pkg-tests-core/sources/utils/tests.ts
push
called by 1254
packages/yarnpkg-cli/bin/yarn.js
push
called by 1214
packages/berry-cli/bin/berry.js
makeTemporaryEnv
called by 1117
packages/acceptance-tests/pkg-tests-core/sources/utils/tests.ts
get
called by 1013
packages/yarnpkg-core/sources/miscUtils.ts
set
called by 1013
packages/yarnpkg-core/sources/miscUtils.ts
get
called by 994
packages/yarnpkg-shell/sources/pipe.ts

Shape

Function 9,942
Method 4,713
Class 478
Interface 86
Enum 58

Languages

TypeScript100%

Modules by API surface

packages/yarnpkg-cli/bin/yarn.js5,339 symbols
packages/berry-cli/bin/berry.js5,339 symbols
.pnp.cjs695 symbols
.pnp.loader.mjs242 symbols
packages/yarnpkg-parsers/sources/grammars/shell.js133 symbols
packages/yarnpkg-libzip/sources/ZipFS.ts119 symbols
packages/yarnpkg-pnpify/sources/NodeModulesFS.ts90 symbols
packages/yarnpkg-fslib/sources/MountFS.ts89 symbols
packages/yarnpkg-parsers/sources/grammars/syml.js80 symbols
packages/yarnpkg-fslib/sources/NodeFS.ts77 symbols
packages/yarnpkg-fslib/sources/NoFS.ts76 symbols
packages/yarnpkg-fslib/sources/ProxiedFS.ts74 symbols

Dependencies from manifests, versioned

@algolia/requester-common4.0.0-beta.14 · 1×
@arcanis/sherlock2.0.3 · 1×
@arcanis/slice-ansi1.1.1 · 1×
@docusaurus/core3.7.0 · 1×
@docusaurus/mdx-loader3.7.0 · 1×
@docusaurus/module-type-aliases3.7.0 · 1×
@docusaurus/plugin-content-docs3.7.0 · 1×
@docusaurus/preset-classic3.7.0 · 1×
@docusaurus/theme-classic3.7.0 · 1×
@docusaurus/theme-common3.7.0 · 1×
@docusaurus/tsconfig3.7.0 · 1×
@docusaurus/types3.7.0 · 1×

For agents

$ claude mcp add berry \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact