Skip to main content
Version: 0.1.22
Last Verified: 2025-01-27
Package: @hopx-ai/sdk on npm

Overview

The EnvironmentVariables resource (accessed via sandbox.env) provides methods for managing environment variables in sandboxes.

Methods

getAll

Get all environment variables.
Returns: Promise<Record<string, string>> - Dictionary of all environment variables

get

Get specific environment variable.
Returns: Promise<string | undefined> - Variable value or undefined

set

Set a single environment variable.

setAll

Replace all environment variables (destructive).
This replaces ALL existing environment variables. Use update() to merge instead.

update

Update environment variables (merge with existing).

delete

Delete a single environment variable.

See Also

Next Steps