Install Vite+ (vp provides the pinned Node version from package.json):
curl -fsSL https://vite.plus | bash
# Windows PowerShell: irm https://vite.plus/ps1 | iexOn Windows, clone with long paths enabled so .repos/ checks out cleanly:
git clone -c core.longpaths=true https://github.com/pingdotgg/t3code.gitFrom the repository root:
vp i
vp run devOpen the pairing URL printed by the dev runner (the bare origin does not authenticate a new browser). Prefer a container? See Dev container.
GitHub is the source of truth; source.tanstack.com/@pingdotgg/t3code is a two-way mirror for parallel agent work:
git remote set-url origin https://source.tanstack.com/@pingdotgg/t3code.git
git remote add github https://github.com/pingdotgg/t3code.git
src auth login --web && src auth setup-gitWith origin on the mirror, use src instead of gh. PRs into main still merge on GitHub, and numbers can differ between forges—use the GitHub number in text that reaches GitHub.
vp run dev(server + web),vp run dev:desktop(Electron),vp run dev:server,vp run dev:web. See apps/mobile/README.md for mobile.- Pass flags directly after the task name (e.g.
vp run dev --home-dir /tmp/t3code-dev,--browser). - State and ports: Linked worktrees default to
<worktree>/.t3/userdata(outrankingT3CODE_HOME) and seed on first start from a read-only snapshot of~/.t3/userdata/statev2.sqlitewhen it is at most 500 MiB (--no-seedorT3CODE_DEV_SEED=0skips;vp run migrate-dev-dbrefreshes manually). Plain clones and the main checkout default to~/.t3/dev. Never point a dev server at~/.t3/userdata. Read actual ports from[dev-runner]output (T3CODE_PORT_OFFSET/T3CODE_DEV_INSTANCEoverride). - Resource monitor: First start builds
native/resource-monitorvia Cargo when missing; without Rust, dev starts without process telemetry. - Sharing:
vp run dev --shareexposes the web port over Tailscale and prints a pairing URL. Add--builtto serveapps/web/distviavp build --watch(no HMR, faster over slow links). Never setVITE_HTTP_URLorVITE_WS_URLin dev—Vite proxies/apiand/wssingle-origin. - Startup profiling:
vp run profile:startupcaptures the first 20 s of Node processes under.t3/startup-profiles/<timestamp>.
vp run dev registers Replay (dev) (dev-replay-agent.ts), a local ACP agent that streams recorded transcripts without calling a paid model. Add scenarios under SCENARIOS pointing at a generic ACP fixture (registry_transcript.ndjson) or a file in apps/server/scripts/dev-replay.
Only use this on a hostname where you trust every service (browsers share cookies across ports on the same hostname). Generate one secret once and put it in the main checkout's gitignored .env (which t3.json links into worktrees):
openssl rand -hex 32
# Add to .env: T3CODE_DEV_AUTH_TOKEN=<value>Restart vp run dev --share and open its printed pairing URL once per browser profile. Never commit or publish the token or startup URLs. Desktop and non-dev servers ignore it; see environment auth.
vp run check:changed— CI's fast checks for your branch (format, lint, knip, affected typechecks, nearby tests, and React Compiler coverage).- Focused iteration:
vp test run <files>,vp lint <files>,vp run --filter <pkg> typecheck,vp run knip:check,vp run lint:mobile. apps/webuses real Chromium (*.browser.test.{ts,tsx}) for DOM/React tests (no jsdom) and Node for*.test.ts.- Typechecking uses
effect-tsgo tsrs --noEmit(@effect/tsgo), nottypescript(exceptapps/marketingfor Astro). On Windows, open the workspace through WSL for VS Code's.vscode/tsdk/tsgo.
Unsigned local builds write to release/:
vp run dist:desktop:dmg
vp run dist:desktop:linux
vp run dist:desktop:win
# Linux ARM64: vp run dist:desktop:artifact --platform linux --target AppImage --arch arm64Run vp run dist:desktop:artifact --help for --arch, --signed, and --keep-stage.
Build on Linux (the browser-secret helper links against libsecret). Install Rust stable (rustup), C/C++ build tools, libsecret dev headers, pkg-config, ImageMagick, and Electron runtime libs (gtk3, nss, alsa, gbm):
# Ubuntu 24.04 / Debian 13 (on 22.04/Debian 12 use libgtk-3-0 and libasound2)
sudo apt-get install build-essential libsecret-1-dev pkg-config imagemagick libgtk-3-0t64 libnss3 libasound2t64 libgbm1
# Fedora
sudo dnf install gcc gcc-c++ make libsecret-devel pkgconf-pkg-config ImageMagick gtk3 nss alsa-lib mesa-libgbm
# Arch
sudo pacman -S base-devel libsecret pkgconf imagemagick gtk3 nss alsa-lib mesaInstall Xcode Command Line Tools (xcode-select --install) and Rust. For cross-arch/universal builds:
rustup target add aarch64-apple-darwin x86_64-apple-darwinInstall Rust, Python 3, and Visual Studio Build Tools (Desktop development with C++, Windows SDK, MSVC build tools, Spectre-mitigated libraries), then add the Rust target:
rustup target add x86_64-pc-windows-msvc # or aarch64-pc-windows-msvcWSL support also requires passing the Linux CLI archive via --wsl-runtime; see release runbook. For signing and macOS passkeys, see release and Connect setup.