Running T3 Code with npx
The npx t3 command explained — what it downloads, what it starts, how to pin a version, and how to run it headless on a server with npx t3 serve.
npx t3@latestThat is the whole thing. No global install, no config file, no account.
What the command actually does#
- Downloads the
t3package from npm into the npx cache - Starts a Node.js HTTP + WebSocket server on port 3773
- Serves the React front end from that server
- Opens your default browser at
http://localhost:3773 - On demand, spawns your provider CLI as a subprocess and speaks JSON-RPC to it over stdio
Nothing runs on a T3-operated server. Your code and your provider credentials stay on your machine.
Pinning a version#
@latest is convenient and occasionally regrettable — this is an early-stage project that ships most days. To hold a known-good build:
# whatever you're on right now
npx t3 --version
# pin it
npx t3@0.0.28Running it headless#
The npx route is the one to use on a server or a second machine, because it takes flags the desktop app doesn't expose:
# bind to a specific interface
npx t3 serve --host 0.0.0.0
# bind to your Tailscale address (recommended)
npx t3 serve --host "$(tailscale ip -4)"
# let Tailscale terminate HTTPS for you
npx t3 serve --tailscale-servet3 serve prints a connection string, a pairing token, a URL and a QR code. Treat the pairing token like a password. The full flag list and the security rules are on the remote access page.
Managing projects from the CLI#
The GUI cannot add projects to a remote server yet. On the machine running the server, use:
t3 project # add and list projects
t3 auth # inspect, rotate and revoke pairing credentialsSee the CLI reference.
npx vs the desktop app#
| npx | Desktop app | |
|---|---|---|
| Node.js required | Yes, your system Node | No, bundled |
| Always latest | Yes, with @latest | Manual or auto-update |
Server flags (--host, Tailscale) | Yes | Partially, via Settings |
| Runs headless | Yes | No |
| Lives in your dock | No | Yes |
| Provider CLI included | No | No |
Neither bundles Codex. That is always your install.
Common problems#
It opens the browser but the page never connects. The HTTP server started but the WebSocket didn't, usually because the provider CLI failed to spawn. Check the terminal output where you ran npx t3 — the real error is there, not in the browser.
EADDRINUSE. Something already holds port 3773, frequently another T3 Code instance. Fix it here.
It says codex isn't found, but codex --version works. A PATH inheritance problem. Fix it here.
npx keeps running an old build. Clear the npx cache, or use the explicit @latest tag rather than bare npx t3.
FAQ#
What does npx t3 do?#
It downloads and runs the latest T3 Code release without installing it permanently, starting a local Node server on port 3773 and opening the web GUI in your browser.
Is npx t3 the same as npx create-t3-app?#
No. npx create-t3-app scaffolds a full-stack TypeScript project. npx t3 launches T3 Code, the GUI for coding agents. Different tools that happen to share a naming lineage.
Can I run npx t3 on a remote server?#
Yes, use npx t3 serve --host <address>. It prints a pairing token and URL for connecting from another device. Bind it to a private address such as a Tailscale IP rather than a public interface.
How do I update T3 Code installed via npx?#
Run npx t3@latest, which always fetches the newest published release. There is nothing to uninstall because npx does not install globally.