Last Verified: 2025-01-27
Package:
@hopx-ai/sdk on npm
Overview
TheEnvironmentVariables resource (accessed via sandbox.env) provides methods for managing environment variables in sandboxes.
Methods
getAll
Get all environment variables.
Promise<Record<string, string>> - Dictionary of all environment variables
get
Get specific environment variable.
Promise<string | undefined> - Variable value or undefined
set
Set a single environment variable.
setAll
Replace all environment variables (destructive).
update
Update environment variables (merge with existing).
delete
Delete a single environment variable.
Related Classes
See Also
- Core Concepts: Environment Variables - Learn about environment configuration
- Sandbox Class - Access env via
sandbox.env
Related
- Python SDK: Environment Variables - Python SDK environment management
- Getting Environment Variables - Learn about getting env vars
- Setting Environment Variables - Learn about setting env vars
Next Steps
- Learn about Getting Environment Variables to read values
- Explore Setting Environment Variables to configure environment
- Review Updating Environment Variables for batch updates
- CLI Environment Variables - Manage env vars from CLI

