Installation
Atlas requires Node 24 LTS, which runs .ts files natively. The core has zero runtime dependencies; pg and express are optional peer dependencies used only by their adapters.
Add the dependency
Section titled “Add the dependency”Atlas is published on npm as @ts-atlas/core:
npm install @ts-atlas/coreTo work against a sibling checkout instead, point the dependency at it (a symlink):
// package.json of the app"dependencies": { "@ts-atlas/core": "file:../atlas" }Run the CLI only after installing: npx atlas … resolves the atlas bin of the installed package, while the unscoped atlas name on npm is an unrelated package.
The published package already ships dist/ (JavaScript and .d.ts); a file: checkout builds it through Atlas’s prepare script on npm install. Node does not strip types of .ts files under node_modules, so the package ships compiled entry points. Atlas itself is developed in .ts with no build step; after changing a file: checkout, run npm run build in it to refresh dist/.
For the adapters, add their peer dependencies to the app:
npm install pg expressEntry points
Section titled “Entry points”| Import | What |
|---|---|
@ts-atlas/core/runtime |
capability, t, q, time, createRuntime, createMemoryStore, SYSTEM, rejection, retryDelay and their types. Capability files import only this. |
@ts-atlas/core/system |
loadSystem(dir): the capabilities of a folder (the composition root). |
@ts-atlas/core/express |
atlasRouter, statusOf, unauthenticated, isUnauthenticated (needs express). |
@ts-atlas/core/postgres |
createPostgresStore, migrate, dropViews (pass a pg pool). |
The CLI
Section titled “The CLI”The package ships the atlas bin. It loads the app’s .ts capability files, which live outside node_modules, so Node runs them natively:
npx atlas check --dir src/capabilitiesEvery command accepts --dir <folder>. Inside the Atlas repository the same commands run as node bin/atlas.ts <command>. See the CLI reference.