git submodule update --init --recursive
mise trust
mise install
mise run build
mise run test
If Ghostty is checked out elsewhere:
GHOSTTY_ROOT=/path/to/ghostty mise run shim
Common tasks:
mise run build- buildbin/vtrmise run test- run Go testsmise run proto-ts- regenerate web TS protobuf stubs fromproto/*.protomise run web-build- buildweb/distmise run build-multi- build release artifacts intodist/mise run dev- run hub + Vite dev servermise run test-web-e2e- Playwright tests for web UImise run test-race-cgo- CGO race testsmise run test-sanitize-cgo- CGO sanitizer tests
mise run dev starts:
vtr hub(coordinator + web UI + WS bridge)- Vite dev server
Logs:
.logs/vtr-hub.log
Useful commands:
tail -f .logs/vtr-hub.log
rg -n "resize" .logs/vtr-hub.log
The dev hub binds to 127.0.0.1:8080 by default.
Set VTR_LOG_RESIZE=1 to log resize events (enabled in mise run dev).
Symptoms:
- Double resizes on load usually mean the client measured twice.
- No-op resizes indicate the client resent an identical size.
Ghostty VT may emit CSI warnings for sequences it ignores. You can silence Ghostty logs during dev with:
GHOSTTY_LOG=false mise run dev
Use vtr tui --profile to show render FPS/latency in the footer. For automated
baselines, run:
vtr tui --profile --profile-duration 10s --profile-dump
The command prints a JSON summary on exit (FPS and render timing in ms).
Key invariants for the Ghostty shim:
- The Go wrapper owns the terminal handle and must free it exactly once.
- Snapshot/dump calls allocate memory in the shim; Go must copy and then free it.
- The terminal is not thread-safe; callers must serialize access.
Testing tools:
mise run test-race-cgofor Go race checks near CGO boundaries.mise run test-sanitize-cgofor ASan/LSan via the shim.
- Ensure working tree is clean (
git status). - Update
VERSIONandCHANGELOG.md. - Run tests:
mise run test. - Commit:
git add VERSION CHANGELOG.md && git commit -m "release: vX.Y.Z". - Tag:
git tag -a vX.Y.Z -m "vX.Y.Z". - Build artifacts:
mise run build-multi. - Push:
git push && git push --tags.
- Prefer small, testable changes.
- Update docs alongside code changes.
- Use beads for tracking (
br ready,br update,br close). - Run a final check (
git status,br sync --flush-only) before ending a session.