Processes

A process is a command you want running whenever the workspace is running, like a dev server, a worker, or a test watcher.

What a process is

You configure processes on the project; each workspace gets its own copy it can tweak without affecting the project. Each process is a pane in the workspace panel, a target row with a number.

Commands

Each process command is shell input, run through your login shell in the workspace directory with the workspace variables set (see Environment variables). Plain commands such as npm run dev run naturally, and so do cd, &&, pipes, redirects, and environment assignments:

PORT=$SPACES_WEB_PORT npm run dev
cd frontend && PORT=$SPACES_WEB_PORT npm run dev
npm run dev | tee .logs/frontend.log

A command must be non-empty; Spaces leaves parsing to your shell.

On exit

Pick what happens when the process exits:

  • none: mark it exited and move on.
  • notify: show a macOS notification, “Process Exited”, on the device that runs the process.
  • restart: show “Process Restarting”, then start it again.

A Linux device has no notification center, so notify shows nothing there; the process still shows exited in the sidebar. An exited process shows red and raises an alert, see Alerts. Once that alert is dismissed, or you visit the process's terminal, the process shows as not started on every device until it exits again.

Controlling one process

The row's context menu offers Start, Stop, and Restart when they apply. A restart keeps its pane in place. If a process exits while it is starting, its output shows in its pane.

Editing a process

  • Adding a process: it appears immediately, and you can launch it directly if the workspace is already running.
  • Changing its command: Spaces asks for restart confirmation, since the running process has to be relaunched.
  • Changing only its name or on-exit policy: Spaces applies the edit immediately.
  • Removing a process: Spaces removes it from the workspace's settings. A copy that is running keeps running, and its pane stays open, until you stop it yourself.