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:
# .github/workflows/ci.yml
steps:
- uses: actions/checkout@v4
- name: Install b
# todo: wrong url; create install script
run: curl -sSL https://github.com/fentas/b/releases/latest/download/install.sh | bash
- name: Install project tools
run: b install
- name: Run tests
run: |
kubectl version --client
jq --version
Version Management
Configuration
The .bin/b.yaml
file defines your project's tool 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
# custom file paths
custom-kubectl:
file: ../bin/kubectl # relative to config file
system-tool:
file: /usr/local/bin/tool # absolute path
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/tool
or./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
Next Steps
- CLI Reference - Complete command reference
Was this section helpful?