Examples¶
This page shows common workflows and concrete command examples for browserget.
Installation¶
Install from PyPI:
pip install browserget
Basic workflows¶
Install the latest versions¶
browserget install chrome
browserget install firefox
browserget install edge
Install a specific version¶
browserget install chrome --version 131.0.6778.87
Install by milestone¶
browserget install chrome --version 131
This installs the latest patch release within the 131 milestone.
Install a browser and matching driver¶
browserget install chrome
browserget install chromedriver --for chrome
--for chrome resolves the installed Chrome version and installs the matching
ChromeDriver.
CI/CD workflows¶
The ensure command is idempotent: it only downloads a target when it is not
already installed. This makes it ideal for CI pipelines.
pip install browserget
browserget ensure chrome chromedriver
Use path to locate the installed binary:
CHROME_PATH=$(browserget path chrome)
CHROMEDRIVER_PATH=$(browserget path chromedriver)
Or use JSON output for scripts:
browserget ensure chrome chromedriver --json
Example output:
[
{"name": "chrome", "version": "131.0.6778.87", "path": "/home/user/.browserget/chrome/131.0.6778.87", "status": "already_installed"},
{"name": "chromedriver", "version": "131.0.6778.87", "path": "/home/user/.browserget/chromedriver/131.0.6778.87", "status": "already_installed"}
]
Cache management¶
List installed artifacts:
browserget list
Remove a single version:
browserget remove chrome --version 130.0.6723.69
Remove all versions of a target:
browserget remove chrome --all
Use a custom cache directory for CI caching:
export BROWSERGET_CACHE_DIR=/opt/browserget-cache
browserget ensure chrome chromedriver
Version discovery¶
List available versions from upstream:
browserget versions chrome
browserget versions firefox
browserget versions edge
browserget versions chromedriver
System health¶
Run doctor to verify the cache, disk space, and upstream API reachability:
browserget doctor
Example output:
✓ Cache directory: /home/user/.browserget
✓ Registry: 2 artifacts
✓ Disk space: 45213MB free, 187MB cache
✓ System browsers: chrome 131.0.6778.87
✓ CfT API: reachable
✓ Firefox FTP: reachable
✓ Edge API: reachable
✓ GitHub API: reachable
Exit codes¶
browserget uses the following exit codes:
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Unexpected error or insufficient disk space |
| 2 | Unknown target, version not found, or driver match failure |
| 3 | Network error |
| 4 | Checksum mismatch |
| 5 | Already installed (use --force) |
Use these in scripts to decide the next step:
browserget ensure chrome
if [ $? -eq 5 ]; then
browserget install chrome --force
fi