Skip to main content

Introduction

laravel/multiplex is a terminal UI (TUI) for running multiple commands at once. Laravel 13’s php artisan dev uses it under the hood, letting you manage the PHP development server, queue workers, log tail, Vite, and every other process needed for local development from a single terminal. Each process gets its own tab where its output is displayed, and you can search and scroll through that output. When the command exits, each process’s output is written back into the terminal’s normal scrollback so you can still read the logs after leaving the TUI.

Installation and direct usage

Because php artisan dev handles the required configuration for you, most Laravel applications never need to install Multiplex directly. To use it on its own, install it with npm on Node.js 22.13 or later.
Commands are passed in label,command form:

TUI and inline modes

If both standard input and standard output are TTYs, the tabbed TUI is launched. Press s to switch to a streaming view, / to search output, r to restart the selected process, and q to quit. When there is no TTY — in CI, or when the output is piped — Multiplex switches to inline mode automatically. Each line is prefixed with its process label and rendered in the order the output arrives. Use -i to force inline mode explicitly:
Inline mode exits when the last process ends and reports command failures through the exit code. To consume the results as structured data, use --json:

Automatic restart and shutdown

Crashed processes wait one second and are then restarted automatically, up to five times. A process that exits within one second of starting is not retried — this usually means the executable is missing or a port is in conflict, so the process never really came up in the first place. For one-shot commands such as builds or migrations, pass --no-restart:
Multiplex terminates the process group of every child process when it exits or receives a signal. Every process is stopped together, preventing situations where the development server keeps running and holds a port open.

Caveats

Standard input is not forwarded to child processes. That means commands that need to read input, such as php artisan tinker or a migration confirmation prompt, cannot be run through Multiplex. Run interactive commands in a separate terminal. Multiplex exposes a programmatic API as well, but commands are executed through sh -c. Do not embed untrusted values — configuration files, request data, and so on — directly into the command string.

References

Last modified on August 21, 2026