Skip to content

Getting started

This guide takes a repository from nothing to its first run on BareCI. You need the repository on GitHub, a local clone, and permission to install a GitHub App on its owner.

The bareci CLI is one static binary. Check it is on your path:

Terminal window
bareci --version

Run init in the repository’s root:

Terminal window
bareci init

init does every step of setup and shows you what it changed:

  1. Signs you in with a one-time code in the browser, as gh auth login does. No token is pasted anywhere. The token goes to the operating system’s keychain.
  2. Checks the GitHub App on the repository’s owner and links you to install it if it is missing.
  3. Opts the repository in, so its jobs can run on BareCI.
  4. Writes .bareci/config.yml and .bareci/image.sh from what it detects in the repository: Bun or Node, Playwright, Postgres, Docker. The image script is what the repository’s machine image is baked from.
  5. Points runs-on: at BareCI through a repository variable with a fallback, for example ${{ vars.BARECI_RUNNER_4 || 'ubuntu-latest' }}, so any job can return to its previous runner by changing one variable.
  6. Opens a pull request with all of it.

Useful flags:

Flag What it does
--dry-run Show the diff and what would happen; change nothing
--no-pr Write the files into this checkout instead of opening a pull request
--label bareci-8 The default pool size (default bareci-4)
--repo owner/name The repository, when it is not the origin remote
Terminal window
bareci doctor

doctor checks each step of init and prints the one fix for each failure.

Terminal window
bareci run -- bun test

run packs your worktree as it is, uncommitted changes included, runs the command on a fresh machine built from the repository’s image, streams the output, and exits with the command’s exit code. With no command, it runs the install and test commands from .bareci/config.yml.

Bring files back with --collect and test reports with --junit:

Terminal window
bareci run --junit junit.xml -- bun test --reporter=junit --reporter-outfile=junit.xml

After you merge the init pull request, CI jobs run on BareCI. On any pull request:

Terminal window
bareci ready --wait

ready gives the Gate’s verdict: ready, or every reason it is not yet with the command that fixes it. --wait holds until nothing is pending.