Skip to content
K

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.

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.

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:

FieldPurpose
commandThe command to run, e.g. npm run dev
cwdThe working directory the command runs in
envOptional environment variables for the command
labelA human-readable name, e.g. Web (docs)
kindThe type of target, e.g. build
preferredPortThe 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.

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.

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.

Keeping run configuration with each project means:

  1. No memorizing — the commands to run a project travel with the project, not in your head
  2. Right directory, right environment — each target carries its own cwd and env, so it runs the same way every time
  3. 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.

  • Live Preview — preview a started target’s running output inside Monday Morning