Documentation Index
Fetch the complete documentation index at: https://docs.buttons.sh/llms.txt
Use this file to discover all available pages before exploring further.
install.sh is a POSIX-compatible shell script that fetches the correct Buttons binary for your platform, verifies its integrity, and installs it. It works on macOS, Linux, Alpine, and BusyBox-based environments — anywhere /bin/sh is available.
Basic usage
Configuration via environment variables
Pass variables beforesh to control the install:
| Variable | Default | Description |
|---|---|---|
BUTTONS_VERSION | Latest release | Pin to a specific version tag (e.g. v0.1.0) |
BUTTONS_INSTALL_DIR | /usr/local/bin | Directory to install the buttons binary |
GITHUB_TOKEN | (none) | GitHub personal access token for private repos or to avoid rate limits |
What the script does
Detect platform
The script identifies your OS (
darwin, linux) and architecture (amd64, arm64) using uname. It exits with an error if the combination is unsupported.Resolve version
If
BUTTONS_VERSION is not set, the script calls the GitHub Releases API to find the latest release tag. It passes GITHUB_TOKEN in the Authorization header if set.Download archive
Downloads the matching
.tar.gz archive and its .sha256 checksum file from the GitHub Release assets.Verify SHA256
Computes the SHA256 of the downloaded archive and compares it to the published checksum. The script exits immediately if they do not match — no binary is installed.
Pinning a version
For reproducible agent deployments, always pin a version:Custom install directory
To install withoutsudo, point the script at a user-writable directory:
$PATH:
GitHub rate limits
The unauthenticated GitHub API allows 60 requests per hour per IP. In CI environments where many jobs run on shared egress IPs, you may hit this limit. Pass a token to raise the rate limit:Alpine and BusyBox compatibility
The script uses only POSIXsh builtins and a small set of standard utilities (uname, curl or wget, sha256sum or shasum, tar). It runs in Alpine and BusyBox environments without modification.
Related
- Installation — full install options including Docker and Go
- Docker — bake the binary into a container image