INNER CODE UNIT · Python

_find_codex_bin

browser-use/bux · agent/box_agent.py:143

def _find_codex_bin() -> str:
	"""Locate the codex CLI. Mirrors the lookup paths bux's installer
	bakes in (npm global → /usr/local → /usr/bin) so a freshly-installed
	box and a long-lived one with custom paths both resolve.
	Falls back to bare 'codex' (PATH lookup) if nothing exists yet — the
	auth_poll then surfaces "command not found" cleanly."""
	for p in (
		'/home/bux/.npm-global/bin/codex',
		'/usr/local/bin/codex',
		'/usr/bin/codex',
	):
		if os.path.exists(p):
			return p
	return 'codex'


CODEX_BIN = _find_codex_bin()
# Written by browser-keeper.service on each rotation. Source of truth for

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…