Core variables
Setting variables
- macOS / Linux
- Windows
- Docker
- .env File
Add the following lines to your shell profile (After editing the file, reload your shell:To set a variable only for the current terminal session (without persisting it), run the
~/.zshrc, ~/.bashrc, or ~/.bash_profile) to make the variables available in every terminal session:export commands directly in your terminal.Loading in Python
Use the built-inos module to read environment variables, and python-dotenv to load a .env file during local development.
Loading in Node.js
Useprocess.env to access variables and the dotenv package to load a .env file.
CI/CD
Keep secrets out of your code and CI configuration files by using your platform’s native secret management:GitHub Actions
Store your API key in Settings > Secrets and variables > Actions as a repository secret named
PORTRIX_API_KEY. Reference it in your workflow:Vercel
Add
PORTRIX_API_KEY under Project Settings > Environment Variables in the Vercel dashboard. Select which environments (Production, Preview, Development) should receive the variable. Vercel injects it automatically at build and runtime.