Skip to content

site

The sites of a bench. The guide is Benches and sites. Every command takes the options for every command.

site list

benchbar site list [--json] [--bench-dir DIR]

Every site of the bench; the default one, the site benchup waits for, is marked. benchbar site alone does the same. With --json: each site’s name, whether it is the default, whether /etc/hosts has it, and its ping code (schema).

Exit codes: 0; 1 when no bench is found.

Terminal window
benchbar site list --json

site add

benchbar site add NAME [--bundle NAME | --apps "a b"] [--dry-run] [--yes]

bench new-site on the bench’s MariaDB with the root password from the Keychain, the site’s /etc/hosts line, and optionally apps that are already in apps/. The default site stays as it is. It asks for the new site’s Administrator password, or reads ADMIN_PASSWORD.

FlagWhat it does
--bundle NAMEInstall the apps of a bundle (minimal, common, extended)
--apps "a b"Install these apps, which must be in apps/ already
--dry-runPrint the plan, change nothing
-y, --yesDo not ask; ADMIN_PASSWORD must be set

Exit codes: 0 the site exists; 1 a step failed or an app is not in apps/; 2 the MariaDB root password is unknown (pass MARIADB_ROOT_PASSWORD).

Terminal window
ADMIN_PASSWORD='...' benchbar site add v16two --bundle minimal --yes

site default

benchbar site default NAME

Makes NAME the default site: bench use, the runner’s ping, benchup and the app all follow it. The processes keep running.

Exit codes: 0; 1 when the site does not exist or bench use fails.

Terminal window
benchbar site default v16two

site hosts

benchbar site hosts

Adds a 127.0.0.1 line to /etc/hosts for every site that has none, inside benchbar’s markers, with one sudo prompt.

Exit codes: 0; 1 when the hosts file could not be written.

Terminal window
benchbar site hosts