---
title: Hook Installation
description: Install the agent-receipts-hook binary and verify it is on your PATH.
---

`agent-receipts-hook` is released independently of the daemon — it has its own Homebrew formula and Go module path.

## Prerequisites

- `agent-receipts-daemon` running (see [Daemon Setup](/getting-started/daemon-setup/))

## Install

### Homebrew (macOS, Linux)

```bash
brew install agent-receipts/tap/agent-receipts-hook
```

### Prebuilt binaries

Download a tarball for your platform (darwin/linux, amd64/arm64) from the [releases page](https://github.com/agent-receipts/ar/releases?q=hook) and move `agent-receipts-hook` onto your `$PATH`.

### From source

```bash
go install github.com/agent-receipts/ar/hook/cmd/agent-receipts-hook@latest
```

Requires Go 1.26+.

## Verify installation

```bash
agent-receipts-hook --help
```

If the binary is not found after `go install`, the Go bin directory is not on your `$PATH`. Add it:

```bash
# bash / zsh
export PATH="$(go env GOPATH)/bin:$PATH"
```

```fish
# fish
fish_add_path (go env GOPATH)/bin
```

## Connecting to the daemon

`agent-receipts-hook` uses the same socket-path resolution as the emitter SDK: it reads `AGENTRECEIPTS_SOCKET` if set, then falls back to the platform default (`$TMPDIR/agentreceipts/events.sock` on macOS, `$XDG_RUNTIME_DIR/agentreceipts/events.sock` on Linux). No extra configuration is needed when the daemon is running at the default path.

Start the daemon before wiring up the hook — events emitted before the daemon is running are dropped silently.
