Skip to main content

Install

Requires Node.js 22.19 or later.

Create a project

TypeScript starts in src/actor.ts. Python starts in src/actor.py. terse.config.json identifies the hosted project. For unattended setup, authenticate first:

Run locally

Run from the actor project:
The server watches your source. The default endpoint is http://127.0.0.1:7100/v1/projects/local/actors. Local state lives in .durable-actors/. Keep that directory to retain state.

Generate a client

Keep the actor server running. Run from your application project:
TypeScript defaults to src/terse.actors/. Python defaults to generated/. Python generation requires a pyproject.toml with a [project] table. TypeScript generation requires a compatible terse-sdk in the application. Generate TypeScript clients from TypeScript actors. Python actors currently expose Python client contracts. Use the matching language for the quickstart. Regenerate after changing public methods, state, or socket types. Keep generated files unchanged.

Deploy

Run from the actor project:
The CLI checks the actor contract and uploads source. Python definitions undergo strict mypy checks. TypeScript definitions undergo type checking. The CLI prints the hosted actor URL. Set that URL in the calling application. Set its TERSE_API_KEY. Regenerate the client against the hosted contract.

Secrets

add prompts for the value. --value-stdin reads it from standard input. Local sync writes the value to .env; --skip-local-sync disables that write. import --overwrite replaces existing server values. list --json lists names. Keep provider keys in the actor project. Keep Terse credentials in the calling backend. Keep both out of browser code.

Connection settings

Create an API token in the app under your profile menu → API tokens. Copy it into the backend’s TERSE_API_KEY. The CLI loads .env. Application backends must load their own environment. Saved CLI credentials can authorize hosted client generation; running applications still need TERSE_API_KEY.

Account and utilities

Run terse <command> --help for command options.