Skip to main content
The 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

Or using the full command:

How It Works

  1. Check Installation: If the package is already installed, use it directly
  2. Temporary Install: If not installed, install it temporarily (without linking)
  3. Execute: Run the package’s main executable with the provided arguments
  4. Environment Setup: Automatically configures SSL certificates and library paths
The package remains available for future zbx calls but isn’t added to your $PATH.

Arguments

string
required
Name of the Homebrew formula to run
string...
Arguments to pass to the executable (supports flags with hyphens)

Examples

Run a Command Without Installing

Try jq without adding it to your system:
Output:

Use a Package for a Single Task

Process JSON data without permanent installation:
Output:

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

Environment Configuration

When running a package, zbx automatically sets:

SSL/TLS Certificates

Library Path (Linux)

This ensures packages can find their dependencies without linking.

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

Some packages install executables with different names than the formula. Use zb info <formula> to see what’s included.

Permission Denied

If the package requires initialization:
Run zb init first or use --auto-init: