Configuration reference#

Every key in micromux.yaml. The machine-readable source of truth is micromux.schema.json; reference it from your config for editor completion and validation:

# yaml-language-server: $schema=https://github.com/romnn/micromux/raw/main/micromux.schema.json

Top level#

KeyTypeDefaultDescription
versionstring / number—Config format version. Use "1".
namestringdirectory nameSession name surfaced to agents via the control plane.
strictboolfalseTreat config warnings as errors.
servicesmap—Service definitions, keyed by id.
restartstring—Default restart policy.
healthcheckobject—Default healthcheck timing (no test).
logsobject—Default log retention.
uiobject—Terminal-UI options.
controlobject—Control plane and dynamic-service policy.

services.<id>#

KeyTypeDescription
commandstring / arrayRequired. Shell-like string or argv array. Each argument is interpolated after splitting.
namestringDisplay name for the TUI.
disabledboolLeave the service disabled when the session starts.
working_dirstringWorking directory, relative to the config; defaults to the config’s directory. Aliases: cwd, directory. May reference ${VAR} from micromux’s own environment only.
environmentmapInline environment variables. Values may reference ${VAR}.
env_filestring / object / array.env file(s) to load, earlier first. Long form is { path: …, optional: … }; see env_file[].
depends_onarrayDependencies; each a service id or { name, condition }.
healthcheckobjectA probe with test plus timing.
portsarrayPorts the service uses (metadata; not bound by micromux). Entries may reference ${VAR}.
restartstringRestart policy for this service.
stop_grace_perioddurationTime between graceful termination and force-kill. Defaults to 10s; must be greater than zero and no longer than 5m.
stop_signalstringSignal delivered for the graceful stop request. One of SIGTERM (default), SIGINT, SIGHUP, SIGQUIT, SIGUSR1, SIGUSR2; the SIG prefix is optional and matching is case-insensitive. Delivered to the service’s process group and — best-effort, via a process-table sweep that cannot guarantee hard containment — to descendants that escaped it, so a non-default choice reaches child processes too. Ignored on Windows.
logsobjectLog retention for this service.
colorboolForce color handling for this service.

env_file[]#

A bare path or an object:

KeyTypeDescription
pathstringRequired. Path of the dotenv file, relative to the config. May reference ${VAR} from micromux’s own environment.
optionalboolSkip the entry when its path names an unset variable or no file exists there. Defaults to false. A present file is always loaded in full.

depends_on[]#

A bare string (the started condition) or an object:

KeyTypeDescription
namestringRequired. The dependency’s service id.
conditionstringstarted, healthy, or completed.

healthcheck#

KeyTypeDescription
teststring / arrayThe probe command. Required on a service; absent in the top-level defaults block.
start_delaydurationGrace period before the first probe. Aliases: startup_delay, initial_delay.
intervaldurationTime between probes.
timeoutdurationPer-probe time limit.
retriesintegerConsecutive failures tolerated before unhealthy.

restart#

One of always, unless-stopped, on-failure (or on-failure:N), no (synonym never). Case-insensitive; - and _ are interchangeable.

logs#

KeyTypeDefaultDescription
retained_runsinteger5Full disk-backed runs kept, including the current run. Aliases: runs, history.
memory.max_linesinteger / unbounded—In-memory tail line bound.
memory.max_bytesinteger / unbounded—In-memory tail byte bound.
max_lines, max_bytes——Shorthand for the memory.* fields.
levelstringallInitial TUI level threshold for structured JSON logs: all, trace (same as all), debug, info, warn, error, or fatal. Lines without a structured level always show.
timestampsbooltrueLead structured JSON log lines with their local time in the TUI; toggle per service with T.
filter_fieldsbooltrueLeave out the fields that fields hides in the TUI; toggle per service with F.
fieldsmap of field name to hide / show{}How the TUI displays structured JSON fields. A service’s map merges into the inherited one key by key.

ui#

KeyTypeDefaultDescription
widthinteger—Initial sidebar width, in columns.
pretty_json_logsbooltrueRender structured JSON logs as compact colored lines in the TUI.

control#

KeyTypeDefaultDescription
enabledbooltrueEnable the local control endpoint. Changes require a session restart.
dynamic_services.enabledboolfalsePermit runtime-created services.
dynamic_services.allowed_working_rootsarray["."]Allowed working-dir roots, resolved relative to the config.
dynamic_services.max_servicesinteger4Maximum live dynamic services.
dynamic_services.max_lifetimeduration / none12hDefault and maximum dynamic-service lifetime.