env command. List, get, set, and delete environment variables to configure execution environments.
Command Syntax
Subcommands
list
List all environment variables in a sandbox.
Syntax:
SANDBOX_ID- Sandbox ID (required)
--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error4- Sandbox not found
get
Get the value of a specific environment variable.
Syntax:
SANDBOX_ID- Sandbox ID (required)VARIABLE- Environment variable name (required)
0- Success3- Authentication error4- Sandbox or variable not found
set
Set one or more environment variables.
Syntax:
SANDBOX_ID- Sandbox ID (required)KEY- Environment variable name (optional, use with--envfor multiple)VALUE- Environment variable value (optional, use with--envfor multiple)
--env, -e TEXT- Environment variable in KEY=VALUE format (repeatable)--env-file PATH- Load environment variables from file
0- Success3- Authentication error4- Sandbox not found
delete
Delete an environment variable.
Syntax:
SANDBOX_ID- Sandbox ID (required)VARIABLE- Environment variable name to delete (required)
0- Success3- Authentication error4- Sandbox or variable not found
Shell Scripting Examples
Configure Environment for Code Execution
Load Environment from File
Conditional Environment Setup
List and Export Variables
Related
- CLI Quickstart - Get started with CLI
- Sandbox Commands - Manage sandboxes
- Code Execution - Execute code with environment variables
- Shell Commands - Run commands with environment variables
- Python SDK: Environment Variables - Python SDK environment management
- JavaScript SDK: Environment Variables - JavaScript SDK environment management
- API: Environment Variables - REST API endpoints
Next Steps
- Learn about Code Execution to use environment variables in code
- Explore Shell Commands to run commands with environment variables
- Review Sandbox Management to create sandboxes with initial environment variables

