Netlify
Environment Commands
Manage environment variables for your Netlify sites. Set build-time and runtime variables, manage secrets, and configure different values per deploy context.
9 commands
Pro Tips
Use 'netlify env:set KEY value --context production' to set variables for specific deploy contexts.
Run 'netlify env:list' to see all environment variables and which contexts they apply to.
Use 'netlify dev' to pull remote env vars locally — no need to maintain a separate .env file.
Common Mistakes
Environment variables set via CLI are visible in the Netlify dashboard to all team members with access.
Variables prefixed with NEXT_PUBLIC_ or VITE_ are embedded in client-side bundles. Never use these for secrets.