Making your repo pier-ready
Three optional files at the repo root, all committed:
| File | Runs / read | Contains |
|---|---|---|
.pier-setup.sh | Every session’s first boot, async, in a setup tmux window | Repo state: deps, services, migrations, seeds |
.pier-include | At create | Untracked/ignored files to carry (env files, local certs) |
.pier-bake.sh | Once, during pier bake | Toolchains beyond the default image (pnpm, python, rust, …) |
.pier-setup.sh
Section titled “.pier-setup.sh”# .pier-setup.sh (cwd is the repo root, logs to ~/.pier-setup.log)set -euo pipefailpnpm installdocker compose up -dpnpm db:migratePrefer docker compose up -d for services. A bare background process must
fully detach with setsid cmd </dev/null >log 2>&1 & or it dies when the
setup window closes.
Setup cannot fail silently. It runs after the checkout, dirty patch, and
.pier-include files are in place, and the outcome always surfaces:
pier lsand the TUI show(setup running)or(setup failed)~/.pier-setup.logends withpier setup: doneorpier setup: FAILED (exit N)- a failed window renames to
setup-failedand stays open instead of vanishing
Set PIER_SETUP_SCRIPT to run a different script for one create.
.pier-include
Section titled “.pier-include”# .pier-include: one path or glob per line (no **), a directory carries its subtree.envapps/*/.env.local.pier-bake.sh
Section titled “.pier-bake.sh”# .pier-bake.sh (agent user, passwordless sudo, NO repo checkout yet)set -euo pipefailsudo corepack enableecho COREPACK_ENABLE_DOWNLOAD_PROMPT=0 | sudo tee -a /etc/environment >/dev/nullCOREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack install -g pnpm@10.6.5See Bake for when and why to bake.
The pier-onboard skill
Section titled “The pier-onboard skill”Don’t write those files by hand. The pier repo ships
skills/pier-onboard,
a skill that teaches a coding agent to inspect your repo and write all
three files with the right boundaries.
cp -r pier/skills/pier-onboard ~/.claude/skills/ # or your repo's .claude/skills/Then ask your agent to “set this repo up for pier”.