Documentation

CLI reference

Reference for the Vectron command-line interface.

This page documents the user-facing vectron CLI. Configuration fields are documented separately in the vectron.toml reference and vectron.stack.toml reference.

Global options

Global options can be placed before the subcommand.

OptionValueDefaultEnvNotes
--log-leveltracing levelUnsetVECTRON_LOGExamples: trace, debug, info.
--trace-subscriberpretty, jsonprettyNoneControls tracing output format.
--manflagfalseNonePrints the roff man page to stdout.

Core commands

CommandPurpose
vectron startLaunch the configured workspace in the foreground.
vectron checkValidate vectron.toml.
vectron migrateGenerate vectron.toml from supported legacy inputs such as Procfile.
vectron initWrite a new vectron.toml in the current directory.
vectron statusQuery the local control endpoint for the current status.
vectron restart <target>Restart one process or one instance through the control endpoint.
vectron logsTail logs through the control endpoint.
vectron doctorDiagnose terminal support and configuration.
vectron stack ...Scaffold and provision a local stack from vectron.stack.toml on macOS.
vectron completions ...Generate or install shell completion scripts.

vectron start

vectron start loads ./vectron.toml, prepares the process plan, starts the supervisor, and runs the TUI when stdout is attached to a terminal.

For the keyboard model, focus areas, and interactive controls, see the Terminal UI guide.

OptionValueDefaultEnvNotes
--quietflagfalseNoneLimits output to essentials.
--dry-runflagfalseNonePrints the startup plan without running hooks, creating logs, writing runtime state, or launching processes.
--alt-screenbooleantrueNoneDisable with --alt-screen=false to keep output after exit.
--only-groupsgroup list[]NoneComma-separated or repeated. Starts processes that belong to at least one listed group.
--skip-groupsgroup list[]NoneComma-separated or repeated. Skips processes that belong to at least one listed group.
--enable-groupsgroup list[]NoneComma-separated or repeated. Re-enables groups listed in global.disabled_groups.
--only-labelslabel list[]NoneComma-separated or repeated. Starts processes that have at least one listed label.
--skip-labelslabel list[]NoneComma-separated or repeated. Skips processes that have at least one listed label.
--enable-labelslabel list[]NoneComma-separated or repeated. Re-enables labels listed in global.disabled_labels.
--tui-metricson, offonVECTRON_TUI_METRICSEnables process CPU/RSS metrics in the TUI.
--tui-metrics-modeauto, foreground, background, frozenautoVECTRON_TUI_METRICS_MODEControls how metrics behave with terminal focus.
--tui-metrics-intervalduration1sVECTRON_TUI_METRICS_INTERVALForeground partial refresh interval. Examples: 500ms, 1s.
--tui-metrics-full-scan-intervalduration10sVECTRON_TUI_METRICS_FULL_SCAN_INTERVALForeground full scan interval.
--tui-metrics-background-intervalduration20sVECTRON_TUI_METRICS_BACKGROUND_INTERVALBackground partial refresh interval when focus events are supported.
--tui-metrics-background-full-scan-intervalduration120sVECTRON_TUI_METRICS_BACKGROUND_FULL_SCAN_INTERVALBackground full scan interval when focus events are supported.

Group and label list options accept either comma-separated values or repeated flags:

vectron start --only-groups api,worker
vectron start --only-groups api --only-groups worker
vectron start --only-labels public,optional

vectron start --dry-run prints the resolved startup table, including process GROUP and LABELS metadata when configured, without running hooks, creating logs, writing runtime state, or launching processes.

vectron check

vectron check validates ./vectron.toml without starting processes.

OptionValueDefaultEnvNotes
--enable-groupsgroup list[]NoneComma-separated or repeated. Validates with selected disabled groups re-enabled.
--enable-labelslabel list[]NoneComma-separated or repeated. Validates with selected disabled labels re-enabled.

vectron migrate

vectron migrate generates ./vectron.toml from supported legacy config files such as Procfile. It refuses to overwrite an existing vectron.toml.

OptionValueDefaultEnvNotes
None---This command has no command-specific options.

vectron init

vectron init writes a minimal vectron.toml to the current directory. It refuses to overwrite an existing file. Use --example to write the complete built-in example to vectron.toml instead.

OptionValueDefaultEnvNotes
--exampleflagfalseNoneWrite the complete built-in example instead of the minimal config.

vectron status

vectron status queries the running workspace through the control socket.

OptionValueDefaultEnvNotes
None---This command has no command-specific options.

vectron restart

vectron restart <target> restarts a process or a single instance through the control socket.

ArgumentValueRequiredNotes
<target>process or instance nameYesExamples: web, web#1.

vectron logs

vectron logs tails logs through the control socket.

OptionValueDefaultEnvNotes
--targetprocess or instanceUnsetNoneExamples: web, web#2. Conflicts with --process and --instance.
-p, --processprocess nameUnsetNoneFilters a process. Conflicts with --target and --instance.
--instanceinstance nameUnsetNoneExample: web#2. Conflicts with --target and --process.
--onceflagfalseNoneStreams once and does not follow. Conflicts with --follow.
--followbooleantrueNoneDisable with --follow=false. Conflicts with --once.
--jsonflagfalseNoneEmits NDJSON log records.

vectron doctor

vectron doctor reports terminal and TUI capability information.

OptionValueDefaultEnvNotes
--jsonflagfalseNoneEmits the report as JSON.

vectron doctor tui

vectron doctor tui runs an interactive terminal capability probe.

OptionValueDefaultEnvNotes
--timeoutduration10sNoneProbe duration. Examples: 500ms, 10s.
--jsonflagfalseNoneEmits the probe result as JSON.

vectron stack

Stack mode is currently macOS-only. Plugin IDs accepted by stack commands are listed in the built-in plugins page.

vectron stack init

vectron stack init writes a minimal vectron.stack.toml. It refuses to overwrite an existing file. Use --example to write the complete built-in stack example instead.

OptionValueDefaultEnvNotes
--exampleflagfalseNoneWrite the complete built-in vectron.stack.toml example and stop.

vectron stack provision

vectron stack provision initializes .vectron_stack/, installs dependencies, and generates vectron.toml from an existing vectron.stack.toml.

OptionValueDefaultEnvNotes
--forceflagfalseNoneAllows deleting a non-empty .vectron_stack/data directory.
--dry-runflagfalseNonePrints the plan without making changes.
--onlyplugin list[]NoneComma-separated or repeated. Uses only these plugins before implicit dependencies are added.
--skipplugin list[]NoneComma-separated or repeated. Removes these plugins from the selected set.

vectron stack check

vectron stack check validates vectron.stack.toml and the derived/generated configuration without side effects.

OptionValueDefaultEnvNotes
--onlyplugin list[]NoneComma-separated or repeated. Restricts the check to selected plugins.
--skipplugin list[]NoneComma-separated or repeated. Removes selected plugins from the check.

vectron stack landing-ids

vectron stack landing-ids prints available nginx landing-page link IDs for nginx.landing.quick_links.

OptionValueDefaultEnvNotes
--onlyplugin list[]NoneComma-separated or repeated. Restricts output to selected plugins.
--skipplugin list[]NoneComma-separated or repeated. Removes selected plugins from output.

vectron completions

vectron completions generate

vectron completions generate prints a completion script to stdout.

OptionValueDefaultEnvNotes
--shellbash, fish, zshRequiredNoneSelects the shell to generate completions for.

Generated completions include static CLI structure and dynamic value candidates:

  • vectron restart <target> completes process and instance names.
  • vectron logs --target, --process, and --instance complete runtime/config targets.
  • vectron start and vectron check group/label flags complete values from vectron.toml.
  • vectron stack provision/check/landing-ids --only and --skip complete built-in plugin IDs.

Dynamic process and instance candidates prefer the running control socket when Vectron is active, then fall back to the local config. Group and label candidates come from the local config. Plugin candidates come from the built-in stack plugin catalog. Comma-separated list flags complete the current item after the last comma.

vectron completions install

vectron completions install installs a completion script to a conventional directory.

OptionValueDefaultEnvNotes
--shellbash, fish, zshRequiredNoneSelects the shell to install completions for.
--dirpathShell-specificNoneDestination directory override.

Default completion targets:

ShellFileDefault directory
Bashvectron$XDG_DATA_HOME/bash-completion/completions, fallback ~/.local/share/bash-completion/completions
Fishvectron.fish$XDG_CONFIG_HOME/fish/completions, fallback ~/.config/fish/completions
Zsh_vectron$XDG_DATA_HOME/zsh/site-functions, fallback ~/.local/share/zsh/site-functions