Skip to content

Getting started with Ahoy

Terminal window
brew install ahoy

Before you run it, we recommend you verify your download. Then check it works:

Terminal window
ahoy --version

The fastest way in is the examples file, which has around 30 commands for common development jobs:

Terminal window
cd my-project
ahoy config init

This creates an .ahoy.yml in the current directory. Run ahoy on its own to see what’s in it:

Terminal window
ahoy

Create an .ahoy.yml file in your project root:

ahoyapi: v2
commands:
hello:
usage: Say hello to someone
cmd: echo "Hello, $1!"
start:
usage: Start the dev environment
cmd: docker-compose up -d
logs:
usage: Follow container logs
cmd: docker-compose logs -f "$@"

Then run them:

Terminal window
ahoy hello World # Hello, World!
ahoy start
ahoy logs web
ahoy # Lists all commands with their usage text

Ahoy looks for .ahoy.yml in the current directory and then each parent directory, so these work from anywhere inside the project.

Homebrew checks each download against the SHA-256 in its formula, so there’s nothing extra to do if you used brew install. If you install the binary yourself, download it, check it, then install the file you checked.

Each release includes an ahoy_<version>_checksums.txt file with a SHA-256 checksum for every file in the release. From v3.0.2, that file is also signed with cosign. Set FILE to the binary for your platform, such as ahoy-bin-darwin-arm64 on an Apple Silicon Mac:

Terminal window
VERSION=3.0.2
FILE=ahoy-bin-linux-amd64
BASE=https://github.com/ahoy-cli/ahoy/releases/download/v$VERSION
curl -fsSLO $BASE/$FILE
curl -fsSLO $BASE/ahoy_${VERSION}_checksums.txt
curl -fsSLO $BASE/ahoy_${VERSION}_checksums.txt.bundle
cosign verify-blob ahoy_${VERSION}_checksums.txt \
--bundle ahoy_${VERSION}_checksums.txt.bundle \
--certificate-identity "https://github.com/ahoy-cli/ahoy/.github/workflows/release.yml@refs/tags/v${VERSION}" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
&& sha256sum -c ahoy_${VERSION}_checksums.txt --ignore-missing \
&& sudo install -m 755 $FILE /usr/local/bin/ahoy

Each step only runs if the one before it passed:

  1. cosign checks that Ahoy’s own release workflow made the checksums file, for the version you asked for. A signature from any other tag or branch fails.
  2. sha256sum checks your binary against that checksums file. --ignore-missing checks only the files you downloaded.
  3. install puts that same binary in /usr/local/bin.

On macOS, use shasum -a 256 -c instead of sha256sum -c.

There’s no public key to download, because cosign signing here is keyless: the signature records which workflow and tag made it. The signature matters because a checksum shows a file is intact, but not who made it. Someone who could replace the binary could replace the checksums file too.

v3.0.1 has checksums but no signature, so you can only do the checksum step:

Terminal window
VERSION=3.0.1
FILE=ahoy-bin-linux-amd64
BASE=https://github.com/ahoy-cli/ahoy/releases/download/v$VERSION
curl -fsSLO $BASE/$FILE
curl -fsSLO $BASE/ahoy_${VERSION}_checksums.txt
sha256sum -c ahoy_${VERSION}_checksums.txt --ignore-missing \
&& sudo install -m 755 $FILE /usr/local/bin/ahoy

In v3.0.0 and earlier, the checksums file only lists the .tar.gz and .zip archives and SBOMs, so you can’t check the ahoy-bin-* binary on its own.