TypeScript SDK
Install and configure @rlp/sdk.
The TypeScript SDK is published as @rlp/sdk. It mirrors the official Daytona SDK's TypeScript surface (class names, method names, error types), so most Daytona code ports by changing the import. All methods are async and fully typed.
Install
Configure
Construct a Daytona client with an optional config object. Every field falls back to environment variables — an explicit config value wins, then RLP_*, then DAYTONA_* where a fallback exists.
| Field | Type | Default | Resolution order |
|---|---|---|---|
apiUrl | string | — (required) | config.apiUrl → RLP_API_URL → DAYTONA_API_URL |
apiKey | string | — (required) | config.apiKey → RLP_API_KEY → DAYTONA_API_KEY |
toolboxUrl | string | undefined | config.toolboxUrl → RLP_TOOLBOX_URL → the sandbox DTO's toolboxProxyUrl |
target | string | 'local' | config.target → RLP_TARGET → DAYTONA_TARGET → 'local' |
The constructor throws DaytonaValidationError if no API URL can be resolved, and DaytonaAuthenticationError if no API key can be resolved. If no toolbox URL is available from any source, sandbox operations that need it throw DaytonaValidationError at that point. API keys are covered under Authentication.
Quick example
Create a sandbox, run a command in it, then delete it:
See the quickstart for a longer walkthrough.
Reference pages
- Daytona (client) — sandbox CRUD, lifecycle helpers, service accessors
- Sandbox — lifecycle, fork, previews, VM-state snapshots
- Process — command execution, code runs, sessions
- FileSystem — file operations inside the sandbox
- Git — git operations inside the sandbox
- SnapshotService — image aliases and Dockerfile builds
- VolumeService — persistent volumes
- ObjectStoreService — S3-compatible bucket mounts
- SecretService — project secrets
- Errors — the error hierarchy