Configure startup commands
Open a project's Commands view and add the commands the repository needs, such as its development server, test watcher, or log tail. Choose where each command opens according to how it behaves:
- Main pane (
#primary) opens in the main pane. - Beside it (
#companion) opens beside the primary session. - Monitor (
#monitor) stays visible in the monitor dock. - In the menu (
#background) runs without occupying the working panes. - Quick run (
#quick) is for one-shot work that closes after success. It applies to a command you press, not to the layout.
Put the commands that should open together in the file's Layout section,
then use Open layout, or have it open whenever the project does. Saggar
stores the shared definitions in .saggar/commands.md, so they clone and review
with the repository.
How a layout is applied
- One
#primaryand one#companion. A second of either is skipped, and the first in the file wins. Without a#primary, the layout opens a plain shell in the main pane. #quickmeans nothing to a layout. A quick run inside the Layout section opens in the menu, like an untagged bullet.- At most 4 monitors take the dock. Further
#monitorcommands still run, in the menu. - A layout spawns at most 8 terminals. A command already running in the project is adopted rather than restarted and doesn't count.
- Commands start 400 ms apart, so several cold starts don't land at once.
- The older
## Startupheading and the bracketed[monitor]form still parse. Saggar writes## Layoutand#monitorwhen it edits the file.
For the file format and CLI form, see Commands, startups, and scheduled tasks.