Skip to main content

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

curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh | sh

Configuration via environment variables

Pass variables before sh to control the install:
curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh \
  | BUTTONS_VERSION=v0.1.0 BUTTONS_INSTALL_DIR=$HOME/.local/bin sh
VariableDefaultDescription
BUTTONS_VERSIONLatest releasePin to a specific version tag (e.g. v0.1.0)
BUTTONS_INSTALL_DIR/usr/local/binDirectory to install the buttons binary
GITHUB_TOKEN(none)GitHub personal access token for private repos or to avoid rate limits

What the script does

1

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.
2

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.
3

Download archive

Downloads the matching .tar.gz archive and its .sha256 checksum file from the GitHub Release assets.
4

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.
5

Extract and install

Extracts the buttons binary and copies it to BUTTONS_INSTALL_DIR. Uses sudo only if the target directory exists but is not writable by the current user.

Pinning a version

For reproducible agent deployments, always pin a version:
curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh \
  | BUTTONS_VERSION=v0.1.0 sh
This prevents unintended upgrades when you rebuild your image or re-provision a machine.

Custom install directory

To install without sudo, point the script at a user-writable directory:
curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh \
  | BUTTONS_INSTALL_DIR=$HOME/.local/bin sh
Make sure that directory is on your $PATH:
export PATH="$HOME/.local/bin:$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:
| GITHUB_TOKEN=$GH_TOKEN sh
In GitHub Actions, GITHUB_TOKEN is automatically available as a secret. Pass it directly: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}.

Alpine and BusyBox compatibility

The script uses only POSIX sh 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.
  • Installation — full install options including Docker and Go
  • Docker — bake the binary into a container image