Skip to content

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:

Bash
npx create-justscale

This 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

Bash
pnpm add @justscale/core

Install a Transport

Choose how your application communicates with the outside world:

Bash
# HTTP (REST APIs)
pnpm add @justscale/http

# WebSocket (real-time)
pnpm add @justscale/websocket

# gRPC / RPC
pnpm add @justscale/rpc
๐Ÿ’ก

Tip

CLI commands are built into @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:

Bash
pnpm add --save-dev @justscale/typescript

This 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:

JSON
{
  "compilerOptions": {
    "strict": true,
    "target": "ES2022",
    "module": "NodeNext",
    "moduleResolution": "NodeNext"
  }
}

Optional Packages

Install additional packages based on your needs:

Bash
# 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