Install
Requires Node.js 22.19 or later.Create a project
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: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: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.