CLI reference
The T3 Code command line — launching the GUI, running headless with t3 serve, managing pairing credentials with t3 auth, and adding projects with t3 project.
The CLI matters more than you'd expect for a GUI product, because remote and headless setups are CLI-only — and so is adding projects to a remote server.
t3#
Launch T3 Code with the web UI.
npx t3@latest # newest release
npx t3 # cached / installed version
npx t3@0.0.28 # pinned versionStarts the Node server on port 3773, serves the front end and opens your browser.
t3 serve#
Run the server headless, for remote access.
npx t3 serve --host 0.0.0.0
npx t3 serve --host "$(tailscale ip -4)"
npx t3 serve --host 127.0.0.1
npx t3 serve --tailscale-serve
npx t3 serve --tailscale-serve --tailscale-serve-port 8443| Flag | Purpose |
|---|---|
--host <addr> | Interface to bind. Use a private address |
--tailscale-serve | Let Tailscale terminate HTTPS and proxy to the server |
--tailscale-serve-port <port> | Custom HTTPS port, e.g. 8443 |
On start it prints a connection string, a pairing token, a URL and a QR code.
t3 auth#
Manage pairing credentials after the initial connection.
t3 authInspect sessions, manage credentials, revoke access. Run it periodically — every device you've ever paired holds a live credential until you revoke it.
t3 project#
Add and list projects, from the machine running the server.
t3 projectThis is the workaround for the current limitation that the GUIs cannot add projects on remote environments. On a remote box, this command is the only way in.
Development commands#
For working on T3 Code itself, from a clone of the repository. The project uses bun and Vite+:
vp i # install dependencies (Vite+ CLI)
bun run dev # web dev server with hot reload
bun run dev:desktop # desktop app in development
bun run build # production build
bun run start # run the production build
bun run dist:desktop:dmg # macOS installer, arm64 by defaultRun isolated dev instances side by side — useful when you're testing a change without disturbing a working setup:
T3CODE_DEV_INSTANCE=feature-xyz bun run dev:desktopEach named instance gets its own port and state, so a dev build won't collide with your daily driver on port 3773. Recent builds also keep worktree dev state isolated per instance and can share dev instances over Tailscale.
Useful adjacent commands#
Not T3 Code's, but the ones you'll reach for constantly around it:
# provider health — always check these first when something breaks
codex --version
claude --version
# what's holding the port
lsof -ti:3773 # macOS / Linux
netstat -ano | findstr :3773 # Windows
# free it
lsof -ti:3773 | xargs kill -9 # macOS / Linux
taskkill /PID <pid> /F # Windows
# worktree hygiene
git worktree list
git worktree pruneFAQ#
What CLI commands does T3 Code have?#
The main ones are t3 to launch the GUI, t3 serve to run headless for remote access, t3 auth to manage pairing credentials, and t3 project to add and list projects on the server machine.
How do I revoke T3 Code remote access?#
Use t3 auth on the server machine to inspect sessions and revoke pairing credentials. Do this for any device you no longer control.
How do I run two T3 Code instances at once?#
For development builds, set T3CODE_DEV_INSTANCE=<name> before the dev command. Each named instance gets its own port and isolated state.
How do I add a project to a remote T3 Code server?#
Run t3 project on the server machine. The GUI doesn't yet support adding projects to remote environments.