zbx command (alias for zb run) allows you to execute a package without creating permanent symlinks in your $PATH. This is useful for trying packages, running one-off commands, or avoiding conflicts with existing installations.
Usage
How It Works
- Check Installation: If the package is already installed, use it directly
- Temporary Install: If not installed, install it temporarily (without linking)
- Execute: Run the package’s main executable with the provided arguments
- Environment Setup: Automatically configures SSL certificates and library paths
zbx calls but isn’t added to your $PATH.
Arguments
Name of the Homebrew formula to run
Arguments to pass to the executable (supports flags with hyphens)
Examples
Run a Command Without Installing
Tryjq without adding it to your system:
Use a Package for a Single Task
Process JSON data without permanent installation:Pass Complex Arguments
All arguments after the formula name are forwarded:Avoid Conflicts with Existing Tools
Use zerobrew’s version without affecting system installations:Comparison with Install
| Aspect | zb install | zbx / zb run |
|---|---|---|
| Symlinks to PATH | ✅ Yes | ❌ No |
| Permanent | ✅ Yes | ✅ Yes (but not linked) |
| Multiple packages | ✅ Yes | ❌ One at a time |
| Use case | Regular tools | One-off commands |
Environment Configuration
When running a package,zbx automatically sets:
SSL/TLS Certificates
Library Path (Linux)
Use Cases
Try Before You Install
Test a package before committing to installation:Run Development Tools
Use build tools without cluttering your PATH:Scripting with Temporary Dependencies
Use packages in scripts without requiring pre-installation:Resolve Version Conflicts
Run different package versions without interfering:Installation Behavior
When you run a package:- First time: Package is installed to the Cellar but not linked
- Subsequent runs: Existing installation is reused immediately
- Manual installation: If you later run
zb install <formula>, it will link the existing package
Error Handling
Formula Not Found
Executable Missing
zb info <formula> to see what’s included.
Permission Denied
If the package requires initialization:zb init first or use --auto-init:
Related Commands
zb install- Install and link packages permanentlyzb uninstall- Remove installed packageszb info- View package information