Packages and dependencies
Packages
Section titled “Packages”A monorepo is one repository holding many packages, for example a website, a UI library and a shared utilities package. To Axle, a package is a folder inside the repository with its own package.json, matched by the repository’s workspace patterns. The root package.json itself isn’t a package, unless the repository isn’t a monorepo; then it is the only one.
Each package has:
- a name, from the
namefield of itspackage.json, which must be unique in the repository; - scripts, the commands in its
scriptsfield that you can run, likebuildortest; - dependencies on other packages in the same repository.
Dependencies
Section titled “Dependencies”A package depends on another package in the repository when it lists that package’s name in dependencies, devDependencies, optionalDependencies or peerDependencies. The version doesn’t matter: workspace:*, * and ^1.0.0 all count. Packages from the npm registry aren’t part of the monorepo, so Axle leaves them out.
Dependencies decide the order of work: when web depends on ui, ui has to be built before web. That order is what axle run uses.
Projects
Section titled “Projects”Not everything in a repository has a package.json. A project is a folder Axle runs tasks in all the same, such as a Go service or a Python tool. The root axle.toml lists where projects are with projects, and each project’s own axle.toml gives its name and the command of each task. Plugins can find projects too, such as the Python projects of a uv workspace.
Projects and packages are treated alike: they run, cache and count as affected in the same way, and can depend on each other. Since a project has no package.json to list its dependencies, implicitDependencies in its axle.toml names the packages and projects it depends on; a package can use it too. tags label packages and projects, to choose them with --filter tag:<name> and to write boundaries rules. See projects in the axle.toml reference.