Installer Internals
Installer internals
Section titled “Installer internals”BuilderForce Agents ships three installer scripts, served from builderforce.ai. All of them install the npm package @seanhogg/builderforce-agents, which provides the builderforce CLI.
| Script | Platform | What it does |
|---|---|---|
install.sh | macOS / Linux / WSL | Installs the package globally with the npm already on your PATH. With a workspace token it also registers this machine as an agent host and starts the gateway. |
install-cli.sh | macOS / Linux / WSL | Installs its own Node plus BuilderForce Agents into a local prefix (~/.builderforce), from npm or a git checkout. No root required. |
install.ps1 | Windows (PowerShell) | The Windows counterpart of install.sh. |
Quick commands
Section titled “Quick commands”```bash# Install the beta dist-tag instead of latestcurl -fsSL --proto '=https' --tlsv1.2 https://builderforce.ai/install.sh | BUILDERFORCE_TAG=beta bash``````bashcurl -fsSL --proto '=https' --tlsv1.2 https://builderforce.ai/install-cli.sh | bash -s -- --help``````powershell& ([scriptblock]::Create((iwr -useb https://builderforce.ai/install.ps1))) -Tag beta -NoStart```install.sh
Section titled “install.sh”Flow (install.sh)
Section titled “Flow (install.sh)”The “Connect a new agent” command on builderforce.ai/workforce sets the token and workspace for you. They are read from the environment by builderforce connect, so they never appear on the command line or in shell history.
Examples (install.sh)
Section titled “Examples (install.sh)”install.sh takes no command-line flags. Configure it with the environment variables below.
| Variable | Description |
|---|---|
BUILDERFORCE_TAG=<dist-tag|version> | npm dist-tag or version to install (default: latest) |
BUILDERFORCE_TOKEN=<token> | Workspace token. When set, the script registers this machine (builderforce connect) |
BUILDERFORCE_WORKSPACE=<workgroup> | Workgroup slug to register into (read by builderforce connect) |
BUILDERFORCE_URL=<url> | API base URL (default: https://api.builderforce.ai) |
BUILDERFORCE_NO_START=1 | Register only; do not start the gateway |
install-cli.sh
Section titled “install-cli.sh”Flow (install-cli.sh)
Section titled “Flow (install-cli.sh)”Either way it writes a wrapper to `<prefix>/bin/builderforce` that runs the CLI on the prefix's Node.Examples (install-cli.sh)
Section titled “Examples (install-cli.sh)”| Flag | Description |
|---|---|
--prefix <path> | Install prefix (default: ~/.builderforce) |
--install-method npm|git | Install method (default: npm). Alias: --method |
--npm | Shortcut for --install-method npm |
--git | Shortcut for --install-method git. Alias: --github |
--git-dir <path> | Checkout directory for the git method (default: ~/builderforce). Alias: --dir |
--no-git-update | Skip git pull for an existing checkout |
--version <ver> | BuilderForce Agents version or npm dist-tag (default: latest) |
--node-version <ver> | Node version (default: 22.22.0) |
--json | Emit NDJSON events |
--onboard | Run builderforce onboard after install |
--no-onboard | Skip onboarding (default) |
--set-npm-prefix | On Linux, force npm prefix to ~/.npm-global if current prefix is not writable |
--help | Show usage (-h) |
These are the variables install-cli.sh reads. Their names predate the BuilderForce rename and are kept so existing automation keeps working.
| Variable | Description |
|---|---|
CODERCLAW_PREFIX=<path> | Install prefix (default: ~/.builderforce) |
CODERCLAW_VERSION=latest|next|<semver> | BuilderForce Agents version or npm dist-tag |
CODERCLAW_NODE_VERSION=<ver> | Node version (default: 22.22.0) |
CODERCLAW_INSTALL_METHOD=npm|git | Install method (default: npm) |
CODERCLAW_GIT_DIR=<path> | Checkout directory for the git method (default: ~/builderforce) |
CODERCLAW_GIT_UPDATE=0|1 | Set 0 to skip git pull for an existing checkout |
CODERCLAW_NO_ONBOARD=1 | Skip onboarding even when --onboard is passed |
CODERCLAW_NPM_LOGLEVEL=error|warn|notice | npm log level (default: error) |
SHARP_IGNORE_GLOBAL_LIBVIPS=0|1 | Control sharp/libvips behavior (default: 1) |
install.ps1
Section titled “install.ps1”Flow (install.ps1)
Section titled “Flow (install.ps1)”The script never calls exit, so running it through iex does not close your PowerShell session.
Examples (install.ps1)
Section titled “Examples (install.ps1)”| Flag | Description |
|---|---|
-Tag <tag> | npm dist-tag or version (default: latest) |
-ApiUrl <url> | API base URL (default: $env:BUILDERFORCE_URL or https://api.builderforce.ai) |
-NoStart | Install and register only; do not start the gateway |
| Variable | Description |
|---|---|
BUILDERFORCE_TOKEN | Workspace token. When set, the script registers this machine |
BUILDERFORCE_WORKSPACE | Workgroup slug to register into (read by builderforce connect) |
BUILDERFORCE_URL | API base URL, used when -ApiUrl is not given |
CI and automation
Section titled “CI and automation”install.sh and install.ps1 never prompt, so they run unattended as-is. Use install-cli.sh when you need a git checkout or machine-readable output.
Troubleshooting
Section titled “Troubleshooting”```bashSHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL --proto '=https' --tlsv1.2 https://builderforce.ai/install-cli.sh | bash``````powershellSet-PSDebug -Trace 1& ([scriptblock]::Create((iwr -useb https://builderforce.ai/install.ps1))) -NoStartSet-PSDebug -Trace 0```