Skip to content

CLI Reference

The tide-commander CLI manages the server process lifecycle. All commands run against the background daemon unless --foreground is passed.

Installation

Terminal window
# Run without installing (recommended for quick starts)
bunx tide-commander
# Install globally
npm i -g tide-commander@latest

Subcommands

start

Start the Tide Commander server (default command — runs when you call tide-commander with no subcommand).

Terminal window
tide-commander start [flags]

By default the server daemonises into the background. Use --foreground to keep it in the terminal.

stop

Stop the background server process.

Terminal window
tide-commander stop

status

Check whether the background server is running and show its PID and port.

Terminal window
tide-commander status

logs

Print recent server output. Useful for diagnosing startup failures.

Terminal window
tide-commander logs [--lines N] [--follow]
FlagDefaultDescription
--lines N50Number of log lines to show
--followoffStream logs in real time (like tail -f)

Flags (for start)

FlagDefaultDescription
--port N5174HTTP port the server listens on
--host HOSTlocalhostBind address. Use 0.0.0.0 to expose on the network
--foregroundoffRun in the foreground instead of daemonising
--generate-auth-tokenoffGenerate a random AUTH_TOKEN, print it, and exit

Environment variable overrides

All flags can be set in .env (loaded from the working directory or ~/.tide-commander/.env). Environment variables take precedence over config file defaults but are overridden by explicit CLI flags.

VariableDefaultDescription
PORT5174Server port
HOSTlocalhostBind address
AUTH_TOKENBearer token for API access. Required for network exposure
HTTPS_CERTPath to TLS certificate file
HTTPS_KEYPath to TLS private key file
LOG_LEVELinfoLog verbosity: debug, info, warn, error
DATA_DIR~/.local/share/tide-commanderOverride the data directory

Typical workflows

Terminal window
# Start on default port, background mode
tide-commander start
# Start on a custom port, expose to LAN
tide-commander start --port 8080 --host 0.0.0.0
# Watch logs while developing
tide-commander logs --follow
# Stop cleanly
tide-commander stop

For HTTPS setup (required for cross-origin mobile access and service workers), see HTTPS & Auth.