CodeVetter · Repo Unpack · Feature catalog
lerna/lerna
The registered CLI covers workspace setup, package inspection, task execution, cleanup, importing history, and releases. Shared filtering supports package scopes, exclusions, changed-package selection, and dependency expansion where commands expose those options. Versioning and publishing have distinct modes and side effects. Legacy package-management names remain registered only to explain their removal.
- init generates lerna.json, adds Lerna as a development dependency, supplies workspace configuration for a new repository, and supports dry-run previews; create scaffolds package files and optional CLI files.
- list filters and formats packages; changed collects release candidates and returns exit code 1 when none exist; diff invokes Git for a named package or package parent directories; info reports environment details.
- run accepts comma-separated targets and forwards arguments after --; Nx is the default runner, while useNx=false selects parallel, topological, or lexical legacy execution and rejects multiple targets.
- exec runs shell commands in selected package directories with LERNA_PACKAGE_NAME and LERNA_ROOT_PATH; watch delegates change-triggered execution to Nx with LERNA_PACKAGE_NAME and LERNA_FILE_CHANGES.
- clean removes selected packages' node_modules directories after confirmation or --yes; import reads an external repository and sequentially applies rewritten commit patches with git am.
- version supports fixed and independent versions, explicit semver or increment keywords, interactive selection, conventional-commit recommendations, changelogs, Git tags, pushes, and optional hosted releases.
- publish selects from-git, from-package, canary, or composed versioning; it supports custom publish directories/assets, private-package inclusion, temporary dist-tags, throttling, and a JSON summary.
- add-caching collects script dependency/cache/output answers and writes nx.json; repair passes registered Lerna migrations to Nx; add, bootstrap, and link terminate with removal guidance.