This guide covers Flow setup inside a monorepo. In this guide, you will learn:

  • Why Flow configures the harness inside your app
  • The Flow commands for npm, pnpm, Yarn and Bun
  • What to do when the monorepo has more than one AdonisJS app

The examples use an app in apps/backend. Flow does not decide where your app lives, so use your app's folder in its place.

Flow configures the harness inside each AdonisJS app of a monorepo, not at the workspace root, because its guidance is specific to one AdonisJS project and the stack you chose for it.

When you start your coding agent at the workspace root, it does not load any of the Flow skills or docs. That is fine, because your agent needs them only when it works inside the AdonisJS codebase.

This setup relies on one thing: a pointer to your AdonisJS app in the CLAUDE.md or AGENTS.md at the workspace root.

CLAUDE.md
<!-- FLOW-APPS-START -->
Use the right CLAUDE.md for the area you're working in:

- **AdonisJS backend app** (`apps/backend/**`) → `apps/backend/CLAUDE.md`
<!-- FLOW-APPS-END -->

Flow writes the pointer when you run flow install with the --workspace flag. It leaves the rest of the file as you wrote it. Commit the file.

Run the commands on this page from the workspace root. Your package manager runs each one inside your app. Bun cannot do this for a package's commands, so with Bun you move into your app's folder first.

Install @adonisplus/flow as a dev dependency of your app. Your monorepo must point at the Plus registry first, as Installation and setup shows.

npm
Terminal
npm i -D @adonisplus/flow -w apps/backend
pnpm
Terminal
pnpm --filter ./apps/backend add -D @adonisplus/flow
yarn
Terminal
yarn workspace backend add -D @adonisplus/flow
bun
Terminal
cd apps/backend
bun add -d @adonisplus/flow

With Yarn, backend is the name in your app's package.json, not its folder.

Configures the harness inside your app. It asks the same questions as in a project with one app.

npm
Terminal
npm exec -w apps/backend -- flow install --workspace
pnpm
Terminal
pnpm --filter ./apps/backend exec flow install --workspace
yarn
Terminal
yarn workspace backend flow install --workspace
bun
Terminal
cd apps/backend
bunx flow install --workspace

The --workspace flag also writes the pointer at the workspace root. You need it only the first time, because you commit the pointer. After an upgrade or a new clone, run flow install without it.

Flow finds the workspace root from a pnpm-workspace.yaml, or from the workspaces field of a package.json. If your monorepo has neither, pass the root as a path from your app's folder, for example --workspace=../...

Reviews your branch against the default branch. The code review is a skill you start yourself, and it does not load at the workspace root. This command starts your coding agent inside your app, with the skill.

npm
Terminal
npm exec -w apps/backend -- flow review
pnpm
Terminal
pnpm --filter ./apps/backend exec flow review
yarn
Terminal
yarn workspace backend flow review
bun
Terminal
cd apps/backend
bunx flow review

Applies a feature pack to your app. It starts your coding agent inside your app, the same way as flow review.

npm
Terminal
npm exec -w apps/backend -- flow apply --pack=two-factor
pnpm
Terminal
pnpm --filter ./apps/backend exec flow apply --pack=two-factor
yarn
Terminal
yarn workspace backend flow apply --pack=two-factor
bun
Terminal
cd apps/backend
bunx flow apply --pack=two-factor

Removes Flow from your app. With the --workspace flag, it also removes the pointer from the workspace root.

npm
Terminal
npm exec -w apps/backend -- flow uninstall --workspace
pnpm
Terminal
pnpm --filter ./apps/backend exec flow uninstall --workspace
yarn
Terminal
yarn workspace backend flow uninstall --workspace
bun
Terminal
cd apps/backend
bunx flow uninstall --workspace

A monorepo can hold more than one AdonisJS app, for example an API and an admin panel. Install the package and run flow install --workspace once for each app.

Each app gets its own harness: the docs for its packages, the skills for its stack, and its own flow.lock. The apps share nothing, so they can use different stacks and different versions of a package.

At the workspace root, each install adds its own pointer and keeps the pointers of the other apps.

CLAUDE.md
<!-- FLOW-APPS-START -->
Use the right CLAUDE.md for the area you're working in:

- **AdonisJS admin app** (`apps/admin/**`) → `apps/admin/CLAUDE.md`
- **AdonisJS backend app** (`apps/backend/**`) → `apps/backend/CLAUDE.md`
<!-- FLOW-APPS-END -->

Every command works on one app, the one you name in the command. flow uninstall --workspace in one app removes only that app's pointer.

Installation and setup

Sign in to the registry, and what the installer writes.

Pull request reviews

Turn on the Flow review on your GitHub repositories.