Guides
Environment Variables
How to pass sensitive information like API keys to Tools
Overview
Environment variables are managed per ToolSet. Safely pass sensitive information like API keys to Tools.
Configuration
Add variables in the "Environment Variables" section of the ToolSet screen.
Secret vs Non-secret
| Type | Display | Export |
|---|---|---|
| Secret | Masked | Key only |
| Non-secret | Value shown | Key and value |
All variables are stored with AES encryption.
Using in Code
Python
import os
api_key = os.environ["API_KEY"]
log_level = os.environ.get("LOG_LEVEL", "info")TypeScript
const apiKey = process.env.API_KEY!;
const logLevel = process.env.LOG_LEVEL ?? "info";Import/Export
Environment variables are included in the ZIP file's toolset.yml.
env:
- key: API_KEY
secret: true # No value on export
- key: LOG_LEVEL
value: debug # Value included on exportSecret variables export key only. Set values via Web UI after import.