Skip to content

scan and register

Find the benches you already have and make benchbar remember them. The app’s Scan Folder… runs the same commands; see The menu bar app. Neither command writes a service file: to run a bench in the background, adopt it or use ports setup.

scan

benchbar scan PATH [--json]

Read only. Walks PATH and prints every bench it finds, one path per line; a folder is a bench when it holds sites/common_site_config.json or apps/frappe. It goes at most six folders deep and never looks inside a bench it found. It skips hidden folders, symbolic links, dependency and build folders (node_modules, env, venv, __pycache__, build, dist, vendor), test folders (tests, test, fixtures), macOS media folders (Library, Applications, Pictures, Music, Movies), and, only when you scan /, the system folders there (Volumes, System, private, cores, dev, usr, bin, sbin, opt). A scan of ~ does look into ~/dev. Folders it cannot read, for example ones macOS privacy settings block, are listed as warnings.

FlagWhat it does
--jsonThe benches, as list entries, and the warnings (schema)

Exit codes: 0, also when nothing is found; 1 when PATH is not a readable folder.

benchbar scan ~/dev

register

benchbar register PATH ... [--json] [--dry-run]

Remembers the benches you name, so benchbar list and the app show them. Every path must be a bench, or nothing is written. It adds them to registered-benches.txt in benchbar’s state folder (~/.local/state/benchbar, or .benchbar in a git checkout), once each; it does not write a service file, change the default bench or touch the bench. To forget one, delete its line from that file.

FlagWhat it does
--jsonPrint the list response afterwards (schema)
--dry-runCheck the paths, write nothing

Exit codes: 0; 1 when a path is not a bench.

benchbar register ~/dev/frappe-bench ~/dev/v16-bench