Forrest logo
tool overview
On this page you find all important commands for the CLI tool lerna. If the command you are looking for is missing please ask our AI.

lerna

Lerna is a command line tool that helps manage large codebases with multiple packages. It is popularly used in JavaScript projects that follow a monorepo architecture. Lerna allows you to split your codebase into multiple packages or modules, making it easier to maintain and test. With Lerna, you have the ability to version and publish each package individually or all at once. It provides a seamless workflow for managing dependencies between packages, allowing you to easily share code across different modules within your monorepo. Lerna can hoist common dependencies to a higher level, reducing duplication and optimizing space usage in your project. It offers various commands for package management, including adding, removing, linking, and publishing packages. By utilizing Lerna's versioning capabilities, you can maintain a consistent release process across all packages in your monorepo. It supports different package managers like npm and Yarn, giving you flexibility in choosing the tools that best fit your project. Lerna is widely adopted by organizations working on large-scale projects, offering efficient development and maintenance workflows.

List of commands for lerna:

  • lerna:tldr:25836 lerna: Install all external dependencies of each package and symlink together local dependencies.
    $ lerna bootstrap
    try on your machine
    explain this command
  • lerna:tldr:b3050 lerna: Publish all packages that have changed since the last release.
    $ lerna publish
    try on your machine
    explain this command
  • lerna:tldr:d493c lerna: Run a specific script for every package that contains it in its `package.json`.
    $ lerna run ${script}
    try on your machine
    explain this command
  • lerna:tldr:e50c5 lerna: Initialize project files (`lerna.json`, `package.json`, `.git`, etc.).
    $ lerna init
    try on your machine
    explain this command
tool overview