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

# Installation

> Install Buttons via curl, Docker, Go, Homebrew, or npm.

Buttons ships as a single static binary for **macOS** and **Linux** (amd64 + arm64). No runtime dependencies.

## curl (macOS / Linux)

The fastest path for a single machine:

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh | sh
```

The script detects your OS and architecture, downloads the matching archive from GitHub Releases, verifies the SHA256 checksum, and installs to `/usr/local/bin`. Uses `sudo` only if the target directory isn't writable.

### Pin a version

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh | BUTTONS_VERSION=v0.1.0 sh
```

### Custom install directory

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/autonoco/buttons/main/install.sh | BUTTONS_INSTALL_DIR=$HOME/.local/bin sh
```

## Docker (for deployed agents)

Multi-arch image on GitHub Container Registry:

```bash theme={null}
docker pull ghcr.io/autonoco/buttons:latest
docker run --rm ghcr.io/autonoco/buttons:latest version
```

Most agent deployments bake the binary into their own image via multi-stage copy:

```dockerfile theme={null}
FROM python:3.12-slim AS agent
# your agent setup...

COPY --from=ghcr.io/autonoco/buttons:v0.1.0 /usr/local/bin/buttons /usr/local/bin/buttons
```

The image is Alpine-based with `/bin/sh`, so shell buttons work out of the box. Add `python3` or `nodejs` via `apk add` in derived images when those runtimes are needed.

<Tip>
  For one-off invocations with state persisted to the host:

  ```bash theme={null}
  docker run --rm -v $PWD/.buttons:/home/buttons/.buttons \
    ghcr.io/autonoco/buttons:latest press weather --arg city=Miami
  ```
</Tip>

## Go

If you already have a Go toolchain:

```bash theme={null}
go install github.com/autonoco/buttons@latest
```

Installs to `$(go env GOPATH)/bin` (usually `~/go/bin`). Make sure that directory is on your `$PATH`.

## Homebrew

```bash theme={null}
brew install autonoco/tap/buttons
```

The tap auto-publishes on every release, so `brew upgrade buttons` always gets you the newest version. Supports macOS and Linux on both Intel and Apple Silicon.

## npm / pnpm / bun

```bash theme={null}
npm install -g @autono/buttons
```

The npm package is a thin JavaScript shim that resolves the right prebuilt binary for your platform through optional dependencies.

```bash theme={null}
pnpm add -g @autono/buttons
bun add -g @autono/buttons
```

## Verify

```bash theme={null}
buttons version
buttons version --json
buttons --version
```

## Updating

The fastest way to update is the built-in self-update command:

```bash theme={null}
buttons update
```

This downloads the latest release, verifies the SHA256 checksum, and atomically replaces the running binary. Use `--check` to see if an update is available without installing.

You can also update through your original install channel:

| Installed via | Update with                                     |
| ------------- | ----------------------------------------------- |
| Self-update   | `buttons update`                                |
| curl          | Re-run the same `curl \| sh` command            |
| Docker        | `docker pull ghcr.io/autonoco/buttons:latest`   |
| Go            | `go install github.com/autonoco/buttons@latest` |
| Homebrew      | `brew upgrade buttons`                          |
| npm           | `npm update -g @autono/buttons`                 |

<Note>
  If you installed via Homebrew, `buttons update` detects this and asks you to use `brew upgrade` instead.
</Note>
