About / Quickstart
Quickstart
This guide takes one repository from nothing to a green check run. Steps 1 to 4 run on your machine. Steps 5 and 6 connect the repository to hatchrun.
Prerequisites
Section titled “Prerequisites”- A GitHub repository you can push to.
- A card on file for your organization. hatchrun CI jobs wait until there is one. See Billing.
- A Linux machine on x86-64 or arm64 for the prebuilt CLI. On macOS or anything else, you need Rust to build it.
- The GitHub CLI to download the release. You can also download the files from the release page by hand.
-
Install the CLI
Section titled “Install the CLI”Prebuilt binaries are for Linux on x86-64 and arm64 for now. Each release of hatchrun/hatchrun has
hatchrun-VERSION-linux-amd64.tar.gzandhatchrun-VERSION-linux-arm64.tar.gz.Terminal window VERSION=$(gh release view --repo hatchrun/hatchrun --json tagName -q .tagName | sed 's/^v//')gh release download "v$VERSION" --repo hatchrun/hatchrun \--pattern "hatchrun-${VERSION}-linux-amd64.tar.gz" --pattern SHA256SUMSsha256sum --check --ignore-missing SHA256SUMStar -xzf "hatchrun-${VERSION}-linux-amd64.tar.gz"sudo install -m 0755 "hatchrun-${VERSION}-linux-amd64/hatchrun" /usr/local/bin/hatchrunOn arm64, write
linux-arm64in the file names. On macOS, build from source instead:Terminal window cargo install --locked --git https://github.com/hatchrun/hatchrun hatchrun-cliCargo puts the
hatchrunbinary in~/.cargo/bin. Check the install:Terminal window hatchrun --versionYou see
hatchrunand the version number. -
Write a config
Section titled “Write a config”In the root of the repository, create
.hatchrun/config.yml:.hatchrun/config.yml jobs:test:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v5- run: make testworkflows:ci:on:push:branches: [main]pull_request: {}jobs:- testReplace
make testwith your own test command. The workflowciruns the jobteston every push tomainand on every pull request.If the repository already has GitHub Actions workflows, convert them instead of writing the file:
Terminal window hatchrun convert -o .hatchrun/config.ymlRead Migrate from GitHub Actions before you trust the result.
-
Validate the config
Section titled “Validate the config”Terminal window hatchrun validateNo output and exit code 0 mean the file is valid. Otherwise each line names a problem. Fix them and run it again. See Fix validate errors.
-
Commit the config
Section titled “Commit the config”Terminal window git add .hatchrun/config.ymlgit commit -m "ci: add hatchrun config"Do not push yet if the GitHub App is not installed. Nothing reads the file until it is.
-
Install the GitHub App
Section titled “Install the GitHub App”Sign in to app.hatchrun.io with GitHub and install the App on your organization. Add a card there too, or jobs wait. See Install the GitHub App.
-
Push and watch the check run
Section titled “Push and watch the check run”Push the commit to
main, or open a pull request. A check run namedtestappears as queued, then in progress, then passes. If nothing appears, see My workflow did not run.
Next steps
Section titled “Next steps”- Write your first config by hand builds a fuller config step by step.
- Choose a runner size moves a slow job to a bigger machine.
- Concepts explains every term on this page.