Getting Started with b
Get up and running with b in just a few minutes. b helps you manage command-line tools and binaries for your development projects with automatic PATH management and version control.
Installation
Quick Install (Recommended)
Manual Installation
- Download the latest release for your platform from GitHub Releases
- Extract the binary to a directory in your PATH
- Make it executable:
chmod +x b
Verify Installation
Quick Start
1. Initialize a Project
This creates a b.yaml file in your project root.
2. Install Tools
3. Use Your Tools
Tools are automatically available in your PATH:
Common Workflows
Team Collaboration
Share tool requirements with your team:
CI/CD Integration
Use b in your CI/CD pipelines:
Version Management
4. Sync Environment Files
Sync configuration files from upstream git repositories:
5. Verify and Update
Configuration
The .bin/b.yaml file defines your project's tool and env requirements:
binaries:
jq:
version: "jq-1.7"
kubectl:
version: "v1.28.0"
# leave empty for latest version
terraform:
# alias: install one binary under a different name
envsubst:
alias: renvsubst
# install any GitHub release by ref
github.com/sharkdp/bat:
version: "v0.24.0"
# custom file paths
custom-kubectl:
file: ../bin/kubectl # relative to config file
envs:
# Sync files from upstream git repos
github.com/org/infra:
version: v2.0
strategy: merge # replace (default) | client | merge
ignore:
- "*.md"
files:
manifests/base/**:
dest: base/
manifests/hetzner/**:
dest: hetzner/
# Minimal entry - sync all files
github.com/org/shared-config:
Binary Aliases
You can create aliases for binaries using the alias field. This installs one binary but makes it available under a different name:
Aliases are useful when:
- You want to use a standard name for a tool that has a different actual name
- You need multiple versions of the same tool with different names
- You want to maintain compatibility with existing scripts while using a different implementation
Custom File Paths
You can specify custom file paths for binaries using the file field. This allows you to:
- Point to existing binaries on your system
- Specify custom installation locations
- Use binaries from different directories
Path Resolution:
- Relative paths (like
../bin/toolor./tools/binary) are resolved relative to the config file's directory - Absolute paths (like
/usr/local/bin/tool) are used exactly as specified (mind the permissions) - This feature is particularly useful for pointing to pre-existing binaries or organizing tools in custom directory structures
Uninstalling
Remove b and all managed binaries
Remove project configuration
Clean up PATH
Remove the PATH export line you added during installation from your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile).
Next Steps
- CLI Reference - Complete command reference