Getting started
Worktrees
Run several git worktrees side by side, each with its own databases and hostnames.
A worktree uses the stores of the main checkout and gets its own databases, bucket and hostnames.
Never run docker compose inside a worktree
Start the stores in the main checkout with docker compose up -d.
Commands
| Command | Run |
|---|---|
bun run wt:setup | Inside a new worktree. --no-seed skips demo telemetry; --days and --concurrency tune it. Safe to run again. |
bun run wt:teardown | Before removing the worktree. |
bun run wt:prune | To drop the stores of worktrees that no longer exist. |
What a worktree gets
| Resource | Its own |
|---|---|
| PostgreSQL | A database copied from the main one. |
| ClickHouse | A database with 14 days of demo telemetry. |
| Redis | A database. |
| Object storage | A bucket. |
| Hostnames | One per service, see Hostnames. |
Environment files
wt:setup copies each .env from the main checkout, or from .env.example, and writes a .env.local that points at the worktree's stores. It rewrites .env.local on every run: keep your own values in .env.
Hostnames
| Service | Main checkout | Worktree |
|---|---|---|
web | https://openperf.localhost | https://<name>.localhost |
api | https://api.openperf.localhost | https://api.<name>.localhost |
api-ingest | https://ingest.openperf.localhost | https://ingest.<name>.localhost |
mcp | https://mcp.openperf.localhost | https://mcp.<name>.localhost |
<name> is the worktree directory with a short hash, such as feat-auth-3fa2.