Skip to content

up, down, restart, status, logs

The daily commands. Each has a shell helper (benchup, benchdown, benchrestart, benchstatus, benchlogs, benchfg, benchwatch, benchcd), see Benches and sites. Every command takes the options for every command, most often --bench-dir DIR for a bench that is not the default.

up

benchbar up [--bench-dir DIR]

Starts the bench in the background and waits for the site’s ping. It clears the stop flag, loads the launchd agent when it is not loaded, and asks before starting when another running bench uses the same web or socketio port. A running bench is left as it is.

Exit codes: 0 the bench is up (or already was); 1 the site did not answer in time (it may still be starting: benchbar logs), or you declined the port question.

Terminal window
benchbar up --bench-dir ~/dev/v16-bench

down

benchbar down [--bench-dir DIR] [--dry-run]

Stops the bench and keeps it stopped, also across reboots: it writes manual to the stop flag, stops the agent, then only this bench’s leftover processes and port listeners. Your own bench migrate or bench console keeps running.

Exit codes: 0 stopped; 1 some bench processes are still alive.

Terminal window
benchbar down

restart

benchbar restart [--bench-dir DIR]

Restarts every process and waits for the site. Needed after Python changes: the web server reloads by itself, the worker does not.

Exit codes: 0 the site answers; 1 it did not answer in time.

Terminal window
benchbar restart

status

benchbar status [--json] [--bench-dir DIR]

Agent state, pid, stop reason, last exit code, the processes, the site ping, the ports and the log path. --json prints the versioned JSON in the schema.

Exit codes: 0 always, whatever the state; 1 only when no bench is found.

Terminal window
benchbar status --json

logs

benchbar logs [--worker | --worker-error | --previous] [-n50] [--no-follow] [--process NAME] [--json]

Tails logs/bench.log and follows it in a terminal.

FlagWhat it does
--workerlogs/worker.log instead
--worker-errorlogs/worker.error.log instead
--previouslogs/bench.previous.log, the tail of the run before
-n50The last 50 lines (the default); any number works, -n then the count
--no-followPrint and exit
--process NAMEWith --json: only the lines of one honcho process: web, worker, socketio, schedule, redis_queue, redis_cache
--jsonThe lines as JSON (schema)

Exit codes: 0; 1 for a bad -n or --process value.

Terminal window
benchbar logs --json --no-follow -n100 --process worker

fg

benchbar fg [--bench-dir DIR]

Stops the service and runs honcho with Procfile.lean in the foreground. Ctrl+C stops it; benchup brings the background service back.

Exit codes: honcho’s; 1 when honcho or Procfile.lean is missing.

Terminal window
benchbar fg

watch

benchbar watch [--bench-dir DIR]

Runs bench watch for JS and CSS rebuilds. The lean Procfile has no watcher, so run this while you edit assets.

Terminal window
benchbar watch

path

benchbar path [--bench-dir DIR]

Prints the bench directory. benchcd is cd "$(benchbar path)".

Terminal window
cd "$(benchbar path)"