Installation
Get JustScale installed in your project
Quick Setup
The fastest way to start a new JustScale project is the installer. It detects your environment (package manager, IDE, CI provider) and scaffolds everything:
npx create-justscaleThis creates a project with justscale.config.ts, two entry modes (HTTP and CLI), TypeScript configuration, and IDE/CI setup โ ready to run with just dev.
Manual Setup
If you prefer to set things up yourself, or are adding JustScale to an existing project:
Requirements
- Node.js 18 or later
- TypeScript 5.0 or later
- A package manager (pnpm, npm, yarn)
Install Core
pnpm add @justscale/coreInstall a Transport
Choose how your application communicates with the outside world:
# HTTP (REST APIs)
pnpm add @justscale/http
# WebSocket (real-time)
pnpm add @justscale/websocket
# gRPC / RPC
pnpm add @justscale/rpcTip
@justscale/core โ no separate package needed. Use import { Cli } from '@justscale/core/cli'.Install the Compiler
JustScale ships a custom TypeScript compiler that enables durable processes. Install it as a dev dependency:
pnpm add --save-dev @justscale/typescriptThis provides ptsc (the compiler) and ptscserver(the language service). Your IDE picks it up automatically if you use the installer โ otherwise point your IDE's TypeScript service to node_modules/@justscale/typescript.
TypeScript Configuration
JustScale requires strict TypeScript settings for full type safety:
{
"compilerOptions": {
"strict": true,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}Optional Packages
Install additional packages based on your needs:
# PostgreSQL adapter
pnpm add @justscale/postgres
# Testing utilities
pnpm add --save-dev @justscale/testing
# Authentication feature
pnpm add @justscale/auth
# OpenTelemetry observability
pnpm add @justscale/feature-otel