Skip to main content
Skip to main content

b update

Update binaries and sync env files. If no arguments are given, b updates all binaries and envs from the b.yaml configuration file.

Alias

  • u

Usage

b update [binary|env...] [flags]

Examples

Update all binaries and envs

If a b.yaml file is present, this command will update all binaries to their latest versions and re-sync all env files.

b update

Update a specific binary

Update a single binary to its latest version.

b update jq

Force an update

Force an update even if the binary is already at the latest version. This is useful for re-installing a corrupted binary.

b update --force kubectl

Update with merge strategy

Use the --strategy flag to control how env file updates handle local changes:

# Replace local files with upstream (default)
b update --strategy=replace

# Keep local files, only add new ones
b update --strategy=client

# Three-way merge: upstream changes + local changes
b update --strategy=merge

Merge strategies

StrategyDescription
replaceOverwrite local files with upstream content (default)
clientKeep local files unchanged; only add new files from upstream
mergeThree-way merge using the lock file as a common ancestor. Detects conflicts and prompts for resolution

When using merge, b computes a three-way diff between:

  1. The base version (from b.lock — last known good state)
  2. The upstream version (latest from the remote repo)
  3. The local version (your current file on disk)

If both upstream and local have changed the same region, a conflict marker is inserted and the user is prompted to resolve it.

Env conflict warnings

When multiple env entries write to the same destination path, b warns about potential conflicts before syncing:

⚠ Conflict: config.yaml is written by both github.com/org/infra (base/config.yaml)
and github.com/org/overrides (override/config.yaml)
Hint: use 'dest' or 'ignore' in b.yaml to resolve

Flags

FlagDescription
--strategyMerge strategy for env updates: replace, client, or merge
-h, --helphelp for update

Global Flags

FlagDescription
-c, --config stringPath to configuration file (current: /home/fentas/github/fentas/b/.bin/b.yaml)
--forceForce operations, overwriting existing binaries
-q, --quietQuiet mode
-v, --versionPrint version information and quit
Was this section helpful?