Monorepos
Buttons scans the project root’s top level plus the directories you add, so a monorepo needs a small one-time setup: add your package roots as recursive scan directories.
project/├── package.json├── apps/│ └── web/package.json├── crates/│ └── cli/Cargo.toml├── packages/│ └── api/package.json└── plugin/composer.jsonAdd package roots as scan directories
Section titled “Add package roots as scan directories”The project root is scanned at its top level only. Nested packages are not discovered automatically. Add each package root (or a shared parent) in the Scan directories card in the Project scripts tab, with recursive on:
{ "buttons.scanDirectories": [ { "path": "apps", "recursive": true }, { "path": "crates", "recursive": true }, { "path": "packages", "recursive": true }, { "path": "plugin", "recursive": false } ]}The setting lives in the workspace, so the configuration is shared with the project. See Script scanning and Configuration.
How it appears
Section titled “How it appears”Scripts from nested packages show up in the Project scripts tab with their relative path, for example packages/api/package.json or crates/cli/Cargo.toml. They’re stored in .buttons.json with their packageDir and file fields set accordingly. See .buttons.json for the exact format.
Each script’s terminal is opened with its working directory set to the script’s packageDir, so pnpm dev in apps/web and cargo run in crates/cli run in the right place. Nested Node packages are assumed to share the workspace’s package manager. Cargo.toml and go.mod always run with cargo and go.
Ignored directories
Section titled “Ignored directories”Installed packages, VCS, and build output are skipped inside recursive scan directories so only your own source is scanned. For the full list, see Script scanning.