YARN(1)
โจ NAME โจ
yarn โ Yarn: Fast, reliable, and secure dependency management. That's the official tagline, and honestly? It ate. ๐
๐ DESCRIPTION ๐
Okay bestie, so this whole page is about the Yarn Package Manager, version 4.0.1. The main-character invocation is literally just:
yarn <command>
Then we got a whole menu of commands, grouped by vibe. Let's go. โจ
๐ธ General commands ๐ธ
yarn addโ add dependencies to the project. Like adding new faves to the group chat, but for packages. ๐
yarn add [--json] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ...
yarn binโ get the path to a binary script. Need the exact location? Say less. ๐
yarn bin [-v,--verbose] [--json] [name]
yarn cache cleanโ remove the shared cache files. Bye bye, cache clutter. ๐งน
yarn cache clean [--mirror] [--all]
yarn configโ display the current configuration. Show me the settings, bestie. ๐
yarn config [--no-defaults] [--json] ...
yarn config getโ read a configuration settings. Get that one config value. ๐
yarn config get [--why] [--json] [--no-redacted] <name>
yarn config setโ change a configuration settings. Change it up. โจ
yarn config set [--json] [-H,--home] <name> <value>
yarn config unsetโ unset a configuration setting. Poof, gone. ๐
yarn config unset [-H,--home] <name>
yarn dedupeโ deduplicate dependencies with overlapping ranges. Clean up the overlap, no cap. ๐งผ
yarn dedupe [-s,--strategy #0] [-c,--check] [--json] [--mode #0] ...
yarn dlxโ run a package in a temporary environment. Temporary, like my attention span. ๐
yarn dlx [-p,--package #0] [-q,--quiet] <command> ...
yarn execโ execute a shell script. Run it. ๐ฅ
yarn exec <commandName> ...
yarn explainโ explain an error code. Yarn therapy session. ๐ญ
yarn explain [--json] [code]
yarn explain peer-requirementsโ explain a set of peer requirements. Peer pressure, explained. ๐
yarn explain peer-requirements [hash]
yarn infoโ see information related to packages. Spill the tea. ๐ต
yarn info [-A,--all] [-R,--recursive] [-X,--extra #0] [--cache] [--dependents] [--manifest] [--name-only] [--virtuals] [--json] ...
yarn initโ create a new package. New package, who dis? ๐
yarn init [-p,--private] [-w,--workspace] [-i,--install] [-n,--name #0]
yarn installโ install the project dependencies. The classic. Install szn. ๐ฆ
yarn install [--json] [--immutable] [--immutable-cache] [--refresh-lockfile] [--check-cache] [--check-resolutions] [--inline-builds] [--mode #0]
yarn linkโ connect the local project to another one. Link up. ๐
yarn link [-A,--all] [-p,--private] [-r,--relative] ...
yarn nodeโ run node with the hook already setup. Node, but pre-hooked. ๐ช
yarn node ...
yarn npm auditโ perform a vulnerability audit against the installed packages. Security check, periodt. ๐ก๏ธ
yarn npm audit [-A,--all] [-R,--recursive] [--environment #0] [--json] [--no-deprecations] [--severity #0] [--exclude #0] [--ignore #0]
yarn packโ generate a tarball from the active workspace. Tarball time. ๐
yarn pack [--install-if-needed] [-n,--dry-run] [--json] [-o,--out #0]
yarn patchโ prepare a package for patching. Patch it up. ๐ฉน
yarn patch [-u,--update] [--json] <package>
yarn patch-commitโ generate a patch out of a directory. Commit that patch. ๐พ
yarn patch-commit [-s,--save] <patchFolder>
yarn rebuildโ rebuild the project's native packages. Rebuild era. ๐จ
yarn rebuild ...
yarn removeโ remove dependencies from the project. Unstan. ๐ซ
yarn remove [-A,--all] [--mode #0] ...
yarn runโ run a script defined in the package.json. Script go brrr. ๐
yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
yarn set resolutionโ enforce a package resolution. Enforce it, period. โ๏ธ
yarn set resolution [-s,--save] <descriptor> <resolution>
yarn set versionโ lock the Yarn version used by the project. Lock it in. ๐
yarn set version [--yarn-path] [--only-if-needed] <version>
yarn set version from sourcesโ build Yarn from master. Build from source, main character energy. ๐ ๏ธ
yarn set version from sources [--path #0] [--repository #0] [--branch #0] [--plugin #0] [-n,--dry-run] [--no-minify] [-f,--force] [--skip-plugins]
yarn stageโ add all yarn files to your vcs. Stage it. ๐ฌ
yarn stage [-c,--commit] [-r,--reset] [-n,--dry-run]
yarn unlinkโ disconnect the local project from another one. Unlink, bye. ๐
yarn unlink [-A,--all] ...
yarn unplugโ force the unpacking of a list of packages. Unplug it. ๐
yarn unplug [-A,--all] [-R,--recursive] [--json] ...
yarn upโ upgrade dependencies across the project. Glow-up for deps. โฌ๏ธ
yarn up [-i,--interactive] [-F,--fixed] [-E,--exact] [-T,--tilde] [-C,--caret] [-R,--recursive] [--mode #0] ...
yarn whyโ display the reason why a package is needed. Why tho? ๐ค
yarn why [-R,--recursive] [--json] [--peers] <package>
๐ธ Constraints-related commands ๐ธ
yarn constraintsโ check that the project constraints are met. Rules are rules. ๐
yarn constraints [--fix] [--json]
yarn constraints queryโ query the constraints fact database. Query szn. ๐
yarn constraints query [--json] <query>
yarn constraints sourceโ print the source code for the constraints. Source code reveal. ๐
yarn constraints source [-v,--verbose]
๐ธ Interactive commands ๐ธ
yarn searchโ open the search interface. Search interface, let's go. ๐
yarn search
yarn upgrade-interactiveโ open the upgrade interface. Interactive upgrade, cute. ๐ฎ
yarn upgrade-interactive
๐ธ Npm-related commands ๐ธ
yarn npm infoโ show information about a package. Npm tea. โ
yarn npm info [-f,--fields #0] [--json] ...
yarn npm loginโ store new login info to access the npm registry. Login time. ๐
yarn npm login [-s,--scope #0] [--publish] [--always-auth]
yarn npm logoutโ logout of the npm registry. Logout, bye. ๐ช
yarn npm logout [-s,--scope #0] [--publish] [-A,--all]
yarn npm publishโ publish the active workspace to the npm registry. Publish it, slay. ๐
yarn npm publish [--access #0] [--tag #0] [--tolerate-republish] [--otp #0]
yarn npm tag addโ add a tag for a specific version of a package. Tag it. ๐ท๏ธ
yarn npm tag add <package> <tag>
yarn npm tag listโ list all dist-tags of a package. List the tags. ๐
yarn npm tag list [--json] [package]
yarn npm tag removeโ remove a tag from a package. Tag removed. โ
yarn npm tag remove <package> <tag>
yarn npm whoamiโ display the name of the authenticated user. Who am I? ๐ค
yarn npm whoami [-s,--scope #0] [--publish]
๐ธ Plugin-related commands ๐ธ
yarn plugin checkโ find all third-party plugins that differ from their own spec. Plugin vibe check. โ
yarn plugin check [--json]
yarn plugin importโ download a plugin. Import that plugin. ๐ฅ
yarn plugin import [--checksum] <name>
yarn plugin import from sourcesโ build a plugin from sources. Build from source. ๐๏ธ
yarn plugin import from sources [--path #0] [--repository #0] [--branch #0] [--no-minify] [-f,--force] <name>
yarn plugin listโ list the available official plugins. Official plugin list. ๐
yarn plugin list [--json]
yarn plugin removeโ remove a plugin. Plugin out. ๐๏ธ
yarn plugin remove <name>
yarn plugin runtimeโ list the active plugins. Active plugins, let's see. โก
yarn plugin runtime [--json]
๐ธ Release-related commands ๐ธ
yarn versionโ apply a new version to the current package. Version bump, new era. ๐
yarn version [-d,--deferred] [-i,--immediate] <strategy>
yarn version applyโ apply all the deferred version bumps at once. Apply all the bumps. ๐ฅ
yarn version apply [--all] [--dry-run] [--prerelease] [-R,--recursive] [--json]
yarn version checkโ check that all the relevant packages have been bumped. Check those bumps. ๐
yarn version check [-i,--interactive]
๐ธ Workspace-related commands ๐ธ
yarn workspaceโ run a command within the specified workspace. Workspace-specific command. ๐ข
yarn workspace <workspaceName> <commandName> ...
yarn workspaces focusโ install a single workspace and its dependencies. Focus on one. ๐ฏ
yarn workspaces focus [--json] [--production] [-A,--all] ...
yarn workspaces foreachโ run a command on all workspaces. For each workspace, do the thing. ๐
yarn workspaces foreach [--from #0] [-A,--all] [-R,--recursive] [-W,--worktree] [-v,--verbose] [-p,--parallel] [-i,--interlaced] [-j,--jobs #0] [-t,--topological] [--topological-dev] [--include #0] [--exclude #0] [--no-private] [--since] [-n,--dry-run] <commandName> ...
yarn workspaces listโ list all available workspaces. List the workspaces. ๐
yarn workspaces list [--since] [-R,--recursive] [--no-private] [-v,--verbose] [--json]
You can also print more details about any of these commands by calling them with the -h,--help flag right after the command name. That's the cheat code, bestie. ๐
Anyway, this whole page is brought to you by yarnpkg 4.0.1, dated October 2023, and it's serving YARN(1) realness. Bye bestie, go install something iconic. ๐โจ
๐ฆ where this page comes from
- debian trixie: yarnpkg 4.1.0+dfsg-1 ยท BSD-2-Clause
- ubuntu resolute: yarnpkg 4.1.0+dfsg-1 ยท BSD-2-Clause
- ubuntu stonking: yarnpkg 4.1.0+dfsg-7ubuntu1 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms