README

tcmts.README · #3sdgbww6 · md file

tcm-ts

tcm, the TypeScript codebase manager: Unison's codebase model (its ucm) for plain TypeScript. Definitions are stored by the hash of their syntax tree, and names are only pointers to hashes. So renames are free, nothing gets rebuilt, and two versions of a dependency can live side by side. You don't need new syntax: any erasable TypeScript file works as input, and Node runs the result directly through its built-in type stripping.

Requires Node ≥ 22.18 (tested on 24.15). Everything else comes with it, or is installed when your code first needs it.

# tcm, as tcm's server runs it (binaries: tcm and tcm-ts)
curl -fsSLO https://tcm.codes/tcm-ts.tgz && npm install -g ./tcm-ts.tgz

mkdir demo && cd demo
tcm init          # .tcm/codebase.sqlite, package.json "#codebase" imports, tsconfig, scratch.ts
tcm               # watch: typecheck + hash scratch files, evaluate bare expressions
tcm add           # save new definitions from scratch.ts

What's in it

What it does away with (dead code, circular imports, package.json, monorepo tooling, version skew, rebuilding and retesting), each with where it stops and the test that proves it: what tcm does away with.

New here? Read the introduction, then follow the tutorials: your first codebase and your first web app. Or try the examples: polls, a React notes app, a local-first PWA, and packages with their releases and changelogs. To work on tcm itself: contributing.

All documentation: the docs site. Open items: limitations.