Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:

Bun

Version 1.3.9 or higher

Node.js

Version 24.13.1 or higher
T3 Code requires Codex CLI to be installed and authorized to work properly. Install it from github.com/openai/codex

Quick Start

1

Clone the repository

2

Install dependencies

This will install all dependencies across the monorepo using Bun’s workspace support.
3

Start development mode

This starts the contracts builder, WebSocket server, and Vite dev server in watch mode with hot reload.
4

Access the app

Open your browser to the URL shown in the terminal (typically http://localhost:5733)

Development Modes

Web Development

Starts the full web stack with hot reload:
This command runs:
  • @t3tools/contracts build in watch mode
  • WebSocket server on port 3773 (configurable)
  • Vite dev server on port 5733 (configurable)
Development mode uses ~/.t3/dev as the state directory to keep dev state isolated from production.

Desktop Development

Starts the Electron desktop app:
The desktop app spawns its own backend process and loads the web UI.

Component-Specific Development

Run individual parts of the stack:

Running Multiple Dev Instances

You can run multiple development instances simultaneously without port conflicts:
The T3CODE_DEV_INSTANCE environment variable hashes to a deterministic port offset:
  • Default server port: 3773
  • Default web port: 5733
  • Shifted ports: base + hash(T3CODE_DEV_INSTANCE)
For manual control, use T3CODE_PORT_OFFSET with a numeric value.

Environment Variables

Development Configuration

Turbo Configuration

These are automatically managed by the build system:
  • PORT - Application port
  • VITE_WS_URL - WebSocket connection URL
  • VITE_DEV_SERVER_URL - Vite dev server URL
  • ELECTRON_RENDERER_PORT - Electron renderer port

Passing Server Arguments

You can pass CLI arguments to the server from root dev commands:

IDE Setup

VS Code

Recommended extensions:
.vscode/extensions.json

Effect Language Service

The project uses Effect with language service support. Run this after installing dependencies:

Troubleshooting

If you see port conflicts:
  1. Kill existing processes:
  2. Or use a different instance:
If you see TypeScript errors about missing modules:
Ensure Codex CLI is installed and in your PATH:
If not installed, visit github.com/openai/codex

Next Steps

Architecture

Learn about the system architecture

Monorepo Structure

Understand the workspace layout

Testing

Write and run tests

Building

Build for production