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.

Last reviewed · verified against the pingdotgg/t3code repo

bash
npx t3@latest

That is the whole thing. No global install, no config file, no account.

What the command actually does#

  1. Downloads the t3 package from npm into the npx cache
  2. Starts a Node.js HTTP + WebSocket server on port 3773
  3. Serves the React front end from that server
  4. Opens your default browser at http://localhost:3773
  5. 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:

bash
# whatever you're on right now
npx t3 --version

# pin it
npx t3@0.0.28

Running 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:

bash
# 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-serve

t3 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:

bash
t3 project        # add and list projects
t3 auth           # inspect, rotate and revoke pairing credentials

See the CLI reference.

npx vs the desktop app#

npxDesktop app
Node.js requiredYes, your system NodeNo, bundled
Always latestYes, with @latestManual or auto-update
Server flags (--host, Tailscale)YesPartially, via Settings
Runs headlessYesNo
Lives in your dockNoYes
Provider CLI includedNoNo

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.