Per-Project Commands
Every project starts differently. One needs npm run dev, another runs its docs site on a separate port, a third has a build step and an API to bring up. When you switch between projects, you have to remember which command goes with which, run it in the right directory, and often keep several terminals straight at once. Monday Morning lets you record that knowledge per project, so each project carries its own run configuration and you launch it from the app.
What per-project commands are
Section titled “What per-project commands are”A per-project command is a runnable target tied to one project — a dev server, a build, a docs site, an API, or a test run. Instead of typing the command from memory or hunting through a README, you define it once and start it from Monday Morning.
Because targets are stored per project, you never have to remember which command belongs to which repository. Open the project, and its commands are there.
How they’re stored
Section titled “How they’re stored”Run targets live in the project’s .mm/config.json under preview.targets. Each target is a small object describing one thing you can run:
| Field | Purpose |
|---|---|
command | The command to run, e.g. npm run dev |
cwd | The working directory the command runs in |
env | Optional environment variables for the command |
label | A human-readable name, e.g. Web (docs) |
kind | The type of target, e.g. build |
preferredPort | The port the target prefers to use |
A project can have several targets. For example, one repository might define a docs site and a marketing site as two separate entries, each with its own command, cwd, label, and preferredPort.
Auto-detection
Section titled “Auto-detection”You don’t have to define every target by hand. The preview.autoDetect setting lets Monday Morning automatically detect runnable targets and dev servers, along with the ports they use. When it’s on, the app surfaces things it can run without you configuring them first.
This is useful when you open a project for the first time, or when a project adds a new script — the runnable target shows up rather than waiting for you to register it manually.
Connection to Live Preview
Section titled “Connection to Live Preview”Per-project commands tie directly into Live Preview. When you start a target, its running output can be previewed inside Monday Morning — the dev server, docs site, or build it launches is rendered in the embedded preview dock alongside your terminals.
That’s why the configuration lives under preview in the project config: a target isn’t just a command to run, it’s the source for what Live Preview displays. Start the docs target, and its output appears in the preview; start the build, and you see that instead.
Why it’s project-scoped
Section titled “Why it’s project-scoped”Keeping run configuration with each project means:
- No memorizing — the commands to run a project travel with the project, not in your head
- Right directory, right environment — each target carries its own
cwdandenv, so it runs the same way every time - Fewer terminals to juggle — you launch targets from the app and preview their output, instead of managing windows by hand
The desktop app manages this configuration for you, reading and writing .mm/config.json so each project remembers how to run itself.
Related
Section titled “Related”- Live Preview — preview a started target’s running output inside Monday Morning