Ara’s workspace support is inspired by pnpm’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ara-home/ara/llms.txt
Use this file to discover all available pages before exploring further.
workspace: protocol and designed to make cross-package development fast and friction-free. When you declare a sibling package as a workspace dependency, Ara creates a live symlink from node_modules/<name> directly to the package directory — not a copy. This means any change you make to packages/ui/src/button.tsx is immediately visible to packages/server without reinstalling anything.
This guide walks through creating a monorepo from scratch, explaining each piece along the way.
Directory structure
A typical Ara monorepo looks like this:ara install at the root installs everything: registry packages are fetched and extracted, workspace members become symlinks, and a single ara.lock captures the complete resolved graph.
Setting up the monorepo
The root
package.json does two things: it declares the workspaces glob so Ara discovers member packages, and it lists any shared npm dependencies that all members should share via the hoisted node_modules/.{
"name": "my-mono",
"version": "0.1.0",
"private": true,
"workspaces": ["packages/*"],
"dependencies": {
"zod": "^3.0.0"
}
}
"private": true prevents the root from being accidentally published. The workspaces field accepts an array of glob patterns — packages/* matches every directory inside packages/.Each subdirectory matched by the glob needs its own manifest. Members can use
package.json or ara.toml — Ara checks for ara.toml first and falls back to package.json.// packages/ui/package.json
{
"name": "ui",
"version": "1.0.0",
"dependencies": {
"shared": "workspace:*"
}
}
// packages/server/package.json
{
"name": "server",
"version": "0.1.0",
"dependencies": {
"ui": "workspace:*",
"shared": "workspace:*"
}
}
The
workspace: prefix tells Ara that the dependency lives in the monorepo, not in a registry. Three forms are supported:workspace:*workspace:^^<version> on publishworkspace:1.2.3For development,
workspace:* is the most common choice. It always points at the current source on disk, regardless of the version field in the member’s manifest.package.json and discover packages/*.package.json or ara.toml).workspace: references and all registry dependencies using MVS.node_modules/ for each workspace member.zod) into node_modules/.ara.lock covering the entire resolved graph.Installing dependencies for my-mono v0.1.0
workspace member: shared -> packages/shared
workspace member: ui -> packages/ui
workspace member: server -> packages/server
symlink shared -> /path/to/my-mono/packages/shared
symlink ui -> /path/to/my-mono/packages/ui
symlink server -> /path/to/my-mono/packages/server
fetching zod@3.23.8...
✓ zod@3.23.8 (sha256:...)
Lockfile written to ara.lock
Cross-package references in practice
Because workspace dependencies are live symlinks, the development loop is tight:ara.lock records workspace entries with source = "workspace" so that the distinction between registry deps and local members is always explicit:
Running scripts across workspace members
Scripts are still defined per-member in eachpackage.json. Run them from the member directory:
Ara does not yet have a built-in “run script in all workspaces” command. To run a script across all members from the root, use a shell loop or a tool like
turbo or nx on top of Ara.Mixed manifests: package.json and ara.toml together
Workspace members can freely mix manifest types. A member that needs advanced security policies can add anara.toml without affecting other members:
ara.toml first. If ara.toml exists, its [security] and [build] settings apply to that member’s install and run steps. Dependencies and scripts always come from package.json.
Optional ara.toml at the root
The root can also have anara.toml to apply workspace-wide security policy:
package.json at install time. The security and build settings from ara.toml take effect; dependencies and workspaces always come from package.json.
Complete working example
Here is the minimal file set for a three-package monorepo you can copy and run:- package.json (root)
- packages/ui/package.json
- packages/server/package.json
zod is fetched and extracted, and ara.lock is written. You’re ready to build.