CLI Commands

Command reference, flags, TUI controls, and environment file loading.

Reference

Commands

CommandAliasDescription
fuku run [profile]rRun services for a profile (default if omitted)
fuku stop [profile]sStop the running fuku of the project gracefully, then kill what is left in the service directories. When the running fuku cannot be reached, it exits 1 and stops nothing
fuku logs [services...]lStream logs from a running fuku instance
fuku doctor [profile]—Diagnose configuration, environment, topology, and runtime issues
fuku initiGenerate a fuku.yaml template
fuku version-v, --versionShow version
fuku help-h, --helpShow help

Options

Flags

FlagDescription
--config, -cPath to config file (default: fuku.yaml, falls back to fuku.yml). Disables automatic override file merging. Supported with run, stop, logs, and doctor commands
--no-uiWith run, run without the interactive TUI (log-only mode). With logs, hide the logs panel and the footer and keep the log lines
--detached, -dRun in the background and return once every service is running. Exits 1 when a service fails and stops what started, 130 on Ctrl-C. Supported with run only
--profileProfile the running instance must serve; logs exits with 1 on a mismatch
--tailReplay at most the newest n buffered messages, in total across the named services. Must be greater than zero. Supported with logs only
--no-followExit once the buffered replay is written instead of following new lines. Supported with logs only
--summaryPrint a compact one-line-per-check report (used with doctor command)
--jsonPrint the report as machine-readable JSON (used with doctor command)

Flags can be placed in any position:

terminal
fuku run core --no-ui
fuku --no-ui run core        # Same result

Examples

Usage examples

terminal
# Run with TUI (default profile)
fuku

# Run a specific profile without TUI
fuku run core --no-ui

# Use short aliases
fuku r core

# Run in the background and return once every service is running
fuku run core -d

# Stop the running fuku, then the services of a profile
fuku stop                       # Default profile
fuku stop core                  # Specific profile

# Stream logs from running instance (separate terminal)
fuku logs                       # All services
fuku logs api auth              # Specific services
fuku logs api --profile core    # Filter by profile
fuku l api db                   # Short alias

# Bounded log read for scripts and agents
fuku logs api --tail 100        # At most the newest 100 buffered messages, then follow
fuku logs api --no-follow       # Replay the buffered messages and exit
fuku logs api --no-ui --tail 100 --no-follow  # No panel, at most 100 messages, then exit

# Use a custom config file
fuku --config path/to/fuku.yaml run core
fuku -c custom.yaml run core

# Diagnose configuration, environment, and runtime issues
fuku doctor                     # Default profile
fuku doctor core                # Specific profile
fuku doctor --summary           # Compact one-line-per-check report
fuku doctor --json              # Machine-readable report

# Generate config template
fuku init

# Show help / version
fuku help
fuku version

Diagnostics

fuku doctor

fuku doctor runs a read-only health check and prints a sectioned report — Environment, Configuration, Services,Topology, and Runtime. It diagnoses a broken setup without starting any services, so it works even when the config fails to load. See Troubleshooting for what each section checks.

Each check carries a status glyph:

GlyphMeaning
✓ok
○idle (inactive but expected)
↑note (informational)
⚠warning (non-fatal)
✗failure

The exit code makes doctor usable in scripts and CI:

Exit codeMeaning
0No failures (warnings and notes are allowed)
2At least one check failed
3doctor itself errored (e.g. failed to write the JSON report)

Keyboard

TUI controls

When running with the interactive TUI (default), use these keyboard shortcuts:

KeyAction
↑ / ↓ or k / jNavigate services (or scroll the focused panel)
PgUp / PgDnScroll the focused panel
Home / EndJump to start / end of the focused panel
EnterOpen the service info aside (toggles closed when already open)
Tab / Shift+TabCycle aside tabs forward / backward
\Toggle focus between the services list and the aside
sStop or start the selected service
rRestart the selected service
ctrl+rRestart all failed services
tShow or hide the rotating tips
/Filter services by name
EscClose the service info aside, or clear filter when it is already closed
qQuit and stop all services

Environment

Environment file loading

On startup, fuku loads its own environment files using godotenv, in this order (the first file to set a variable wins):

  1. .env.<GO_ENV>.local
  2. .env.<GO_ENV>
  3. .env

GO_ENV must be set before fuku starts. Fuku reads it before any file, so a GO_ENV in .env does not select .env.<GO_ENV>.

These files configure the fuku process itself. Each service inherits fuku's environment but does not receive any per-service variables injected by fuku — child processes run in their service dir and are responsible for loading their own .env files.

Per-service .env files are still read by fuku, but only for display in the TUI's info aside (the env tab). By default fuku reads .env, .env.local, .env.development, and .env.development.local from each service's dir; override the list with the per-service env.files field (see Configuration).