Usage
Arguments
The name of the formula to get information about. The formula must be currently installed.Example:
jq, wget, gitOptions
Environment:
ZEROBREW_ROOTOverride the root directory for zerobrew’s content-addressable store.Environment:
ZEROBREW_PREFIXOverride the prefix directory where packages are linked.Default:
20Number of concurrent operations to perform.Alias:
--yesEnvironment: ZEROBREW_AUTO_INITAutomatically initialize zerobrew if not already set up.Output Fields
The command displays the following information:The formula name (bold formatting)
The installed version number
The first 12 characters of the content-addressable hash used to identify this package in the store. This key is based on the formula’s contents and metadata.
When the package was installed, shown in local time with a relative timestamp.Format examples:
- Recent:
14:32 (15 minutes ago) - Today:
2024-03-15 09:20 (5 hours ago) - Older:
2024-03-10 (5 days ago)
Examples
Get info for an installed package
Package installed days ago
Package installed hours ago
Package not installed
Use Cases
Check installation time
Find out when a package was installed:Verify package version
Confirm which version of a package is installed:Debug installation issues
The store key can help identify whether a package is correctly installed in the content-addressable store:zb list but not in zb info, there may be a database inconsistency.
Script integration
Check if a package is installed and get its version:Understanding Store Keys
The store key is the first 12 characters of the SHA-256 hash that identifies the package in zerobrew’s content-addressable store. Key properties:- Content-addressable: The same package with the same version and dependencies will always have the same store key
- Deduplication: Multiple formulas that depend on the same package share the same store entry
- Integrity: The store key ensures package integrity
Comparison with Homebrew
| Feature | zerobrew | Homebrew |
|---|---|---|
| Package info | zb info <formula> | brew info <formula> |
| Shows installed version | Yes | Yes |
| Shows available version | No | Yes |
| Shows dependencies | No | Yes |
| Shows installation time | Yes | No (requires brew list --versions) |
| Shows store location | Via store key | Via brew --prefix <formula> |
brew info provides additional details like homepage, description, and dependencies. zerobrew’s info focuses on installation metadata.
Related Commands
zb list- List all installed packageszb install- Install a packagezb uninstall- Uninstall a packagezb outdated- Check for package updates