Skip to content

TypeTorch logo

TypeTorch

Update live Roblox games without restarting their servers.

TypeTorch is a roblox-ts framework and toolchain. You run typetorch deploy, and every live server hot-swaps to the new version in a few seconds. Players stay in the game and nobody gets kicked to a new server. The same goes for assets: builders edit models and UI templates in the place, run typetorch assets sync, and running servers pick up the new versions live. One place serves any number of branches (prod, dev, feature-x), so you can test a branch in a private server of the real game instead of keeping a separate testing place. An optional self-hosted backend shows you the live servers, each deploy's results, errors, performance and your own analytics, sends experience notifications, collects player feedback, runs scheduled live events, and lets you debug one live server from the browser.

Status: early. The core loop works on live Roblox servers today. APIs will change. The packages are on npm (@typetorch/framework, @typetorch/cli, ...).

Get started

→ Read the docs: www.typetorch.dev

A new game starts from the template. typetorch init in an empty folder walks you through every step (needs Bun and Rokit):

bunx @typetorch/cli init

The template's package versions are behind npm: after init, take the newest @typetorch/* packages (how).

  • Fresh setup: a new game from the starter template to a live hot-swap.
  • Migrate an existing game: services, swap safety, networking, data and UI, with before/after code.
  • Agent playbook: tell your coding agent "migrate this project to typetorch". For Claude Code: /plugin marketplace add typetorch/claude-plugin.

Why

Shipping an update on Roblox today means restarting servers. You either kick everyone with "shutdown all servers" or wait for "migrate to latest update" to drain old servers. Each restart costs players, progress and momentum, so teams batch changes and ship less often. Testing usually happens in a second "testing place" that drifts from the real one.

Analytics is the other half of shipping often: Roblox's own dashboards lag by hours and tell you little about one build, one experiment or one player's first session.

TypeTorch treats game code and game assets like deployable artifacts instead of parts of the place file:

  • No restart for code updates. Servers load the new version in place.
  • No restart for asset updates. Models and UI templates marked in the place are versioned, uploaded and swapped live too, and a rollback brings the older versions back.
  • Fast feedback. From typetorch deploy to players running the new build takes about 7–9 seconds.
  • Instant rollback. Going back to an earlier build re-uses an already-approved upload and takes about 1–2 seconds.
  • Safe deploys. A cloud test gates every prod publish, each server rolls a failing build back on its own, and a build that fails on too many servers is rolled back across the branch.
  • Branches in the real game. Open a private server on any branch with /tt new <branch>.
  • Your own analytics. Sessions, funnels, experiments, revenue, performance and first-session recordings, on your own server, with every row tied to the build that produced it.
  • Studio becomes optional for code. Build, test and deploy from the command line, which also suits AI agents.

How it works

flowchart LR
    A[typetorch deploy] --> B[build: roblox-ts → payload.rbxm]
    B --> C[upload as a private Model asset<br/>Open Cloud, moderation check]
    C --> T[cloud test<br/>prod: always]
    T --> D[you approve<br/>prod: signed]
    D --> E[deploy message<br/>MessagingService]
    E --> F[live servers: kernel loads the payload]
    F --> G[old version stops, new version starts<br/>server + clients, no restart]
    G --> R[reports to the backend<br/>bad build: automatic rollback]
Loading
  1. Kernel. A small loader is the only TypeTorch code baked into the place, so it's the only part that needs a server restart to change. It chooses each server's branch: public servers run prod, and private servers run whatever branch they were opened on.

  2. Artifacts. Each build of your game becomes one immutable artifact, identified by its git commit (a1b2c3d-9f8e7d). It is uploaded as a private Model asset that only your experience can load.

  3. Swaps. On a deploy message (or a periodic check), each server loads the new artifact next to the running one, stops the old version (every thread and connection it started is stopped, and everything in its troves is cleaned up), starts the new one, and tells clients to do the same. A version that fails to start is rolled back automatically. Prod builds boot in a headless cloud test before they are published, and a build that fails on many servers is rolled back across the branch by itself.

  4. Prod is signed. Prod releases are approved at your terminal and signed with your own keys. Prod servers (kernel 0.3) accept only signed updates, so code running inside the game can't push them a new build.

  5. Framework. Your game code uses modules (@Service / @Controller) with constructor injection, lifecycle hooks and a trove for cleanup. Type-checked networking guards every remote call. Plain data you choose survives swaps (persist); player data stays in the data library you already use, kept outside the swapped code. The framework ships inside every artifact, so framework fixes also hot-swap.

  6. Hot assets. Builders mark models and UI templates in the place with one attribute (TypeTorchAsset) and publish the place as usual. typetorch assets sync exports them from the latest published place, uploads new and changed ones as versioned Model assets and writes a lockfile that every build carries as its asset manifest. On a swap, servers keep the copies that already match, load the rest in parallel and tell clients; game code reads them with hotAsset("ui/shop") and gets a changed callback. Assets persist across swaps, and a rollback restores the older versions.

  7. Dev menu. Developers get an in-game menu with:

    • the running artifact, its signatures and the server's status;
    • modules, state and hot assets;
    • logs, a network packet inspector and stats;
    • a client and server explorer;
    • branch switching, rollback and owner tools;
    • a Claude chat that acts on a dev server or edits and redeploys a dev branch, with your approval.

    The editing tools work only where dev rules apply; on a normal public server they are read-only.

  8. Backend (optional, self-hosted). One server, one Docker image, two keys. It holds:

    • the fleet API: every server's heartbeat (players, TPS, memory), deploy reports, alerts and a closing notice, sent by the kernel itself (typetorch servers, report, alerts; Discord, Slack or JSON webhooks);
    • analytics: the framework's AnalyticsEngine sends sessions, custom events, funnel steps, purchases, currency, screens and zones, device and tech stats, experiments and a detailed recording of new players' first sessions. Rows carry the artifact and branch, a random player id (never the UserId) and no chat or typed text. Stored in DuckDB on a small VPS or in Cloudflare Basin;
    • error logs from game servers, counted per minute, with names and ids already replaced;
    • experience notifications: your game says why a player should hear from it, the backend decides when, sends through Open Cloud and tracks the funnel from send to tap;
    • player feedback (TypeTorch.feedback()) and live events ("double cash this weekend", signed once and switched on by every server on time, with a lift report afterwards);
    • the web explorer: Overview, Players and player timelines, Funnels, Flow graphs, Retention and LTV, Demographics, Notifications, Feedback, First session, Recordings and Maps (first sessions replayed on each map's real geometry), Economy, Monetization, Live events, Experiments, Roblox benchmarks, Fleet, Live map, Deploys, Errors, Performance (client FPS, memory and ping; server TPS and memory, at p10 to p99, with deploy marks on every chart and a before/after compare), Query, and the owners' Settings, Backend stats and Audit log. Sign in with the admin token, with Roblox, or with typetorch.dev;
    • remote and live debug (kernel 0.5+): open any live server in the explorer and read its status, logs, players, module state, a read-only Dex, builds, boot budget, error and network counters, a live map of its players, and the read-only commands, streams and Fleet columns your game declares (kernel 0.5.7, framework 0.7.1). The server pulls commands while someone watches, and an idle server makes no extra requests.

Repositories

Repository Package What it is
docs Getting started, migration, guides and the agent playbook, published at www.typetorch.dev
kernel @typetorch/kernel The Luau loader baked into the place: boot within a 15 s budget, branch selection, signature checks, artifact loading, hot swaps with a health window and automatic rollback, the signed settings record, cross-server messaging, the stable remotes, the /tt chat commands, heartbeats and reports to the backend, error logs, debug bundles, and the remote and live debug poll
framework @typetorch/framework The roblox-ts framework your game is written with: modules with dependency injection and lifecycle hooks, troves, guarded networking, state that survives swaps, hot assets, the analytics engine, notifications, feedback, live events, UI helpers, a Flamework compatibility layer and the in-game dev menu. Ships inside every artifact
cli @typetorch/cli The typetorch command, alias tt (Node 20+ or Bun): init, build, deploy, test, approve, promote, rollback, pin, deployments, branch, assets sync, servers, report, alerts, backend setup and run, settings, access, experiment, notify, keys, kernel deploy and restore, backup refresh, serve and studio (the Studio loop), mcp, migrate --from flamework, doctor, update
transformer @typetorch/transformer The roblox-ts compiler plugin that generates runtime type guards and dependency-injection metadata from your types. A stripped-down fork of rbxts-transformer-flamework (MIT); TypeTorch games don't need Flamework
template A starter game (Target Rush) showing services, controllers, networking, state that survives swaps, the runtime API and the dev menu
dev-server @typetorch/dev-server remote-claude: a local server behind a temporary Cloudflare tunnel that lets allowlisted developers chat with Claude Code from inside a dev-branch game server, or from Studio through typetorch serve --claude. Claude acts on the server or edits the branch; you approve each deploy
studio-plugin The TypeTorch Studio plugin (TypeTorchSync.rbxm on GitHub releases): attaches Studio to typetorch serve, reloads a running playtest on save, publishes hot assets from a panel, and has a Claude tab
backend The self-hosted backend: the fleet API (SQLite), analytics (DuckDB or Cloudflare Basin), error logs, remote and live debug, notifications, feedback, live events and the web explorer, from a checkout or one Docker image (not on npm)
claude-plugin A Claude Code plugin marketplace with the typetorch-migrate skill

A taste

// src/shared/net.ts: one typed declaration; guards are generated for every client → server call
interface ClientToServer { coins: { collect(coinId: string): void } }
interface ServerToClient { coins: { changed(total: number): void } }
export const network = createNetwork<ClientToServer, ServerToClient>();

// src/server/services/coin.service.ts
@Service()
export class CoinService extends Module implements OnStart {
	constructor(private readonly score: ScoreService) { super(); } // injected

	onStart() {
		// Handlers live in this module's trove, so a hot swap removes them cleanly.
		this.trove.add(network.server.coins.collect.on((player, coinId) => {
			const total = this.score.add(player, 1);
			network.server.coins.changed.fire(player, total);
		}));
	}
}
// Hot assets: builders edit ui/shop in the place; servers and clients get new versions live.
const shop = hotAsset("ui/shop");
shop.changed(rebuild, this.trove);
rebuild(shop.get());

// Analytics: rows go to your own backend, tagged with the running build and branch.
const analytics = new AnalyticsEngine();
analytics.step(player, "onboarding", 3, "opened_shop");
const variant = analytics.experiment(player, "onboarding", ["short", "long"]);
typetorch deploy --branch dev      # build, upload, swap every dev server
typetorch rollback --branch dev    # back to the previous build in ~1–2 s
typetorch deployments              # every deploy with its git commit
typetorch assets sync --deploy dev # upload changed models and UI templates, then deploy
typetorch servers --watch          # live servers from your backend
typetorch report latest            # what every server did with the last deploy

Principles

  • Everything is identified by git. Artifact ids, payload attributes and deployment logs all carry the commit, so any build on any server can be traced back to source.
  • Production is locked down. Public servers run prod and take only updates you signed, editing tools only work where dev rules apply, and every permission is checked on the server.
  • Clean up everything. Each module's trove owns what it creates, and a swap stops every thread and connection the old version started (tested over 180 consecutive swaps).
  • No CI for your game. Your game never builds or deploys in hosted CI (a common supply-chain risk). Builds, cloud tests, signing and deploys run on your own machine, where your keys stay. (TypeTorch's own npm packages are released from version tags by a GitHub workflow with npm trusted publishing.)

License

MIT. The transformer keeps the original MIT license of rbxts-transformer-flamework, whose design TypeTorch builds on.

Popular repositories Loading

  1. kernel kernel Public

    Luau

  2. framework framework Public

    TypeScript

  3. cli cli Public

    TypeScript

  4. transformer transformer Public

    TypeScript

  5. template template Public

    TypeScript

  6. dev-server dev-server Public

    TypeScript

Repositories

Showing 10 of 13 repositories

Top languages

Loading…

Most used topics

Loading…