Environment

Environment variables.

dhaupin 6ce4dab 804 B Updated

File contents

Environment

Environment variables.


When To Use

  • Config secrets
  • API keys
  • Environment-specific settings

What To Do

1. Files

File What
.env Local (gitignore)
.env.local Local override
.env.production Production

2. Syntax

API_KEY=secret123
DATABASE_URL=postgres://localhost
DEBUG=true

3. Load

// Node
require('dotenv').config()
process.env.API_KEY

# Python
from dotenv import load_dotenv
load_dotenv()
os.environ['API_KEY']

4. Best Practice

  • Never commit secrets
  • Use different values per env
  • Validate required vars

Role: Environment Manager
Input: .env files
Output: Config

Secrets.

dhaupin/vant/tree/main/models/public/skills/vant-skill-environment commit 6ce4dabd71

Frequently asked questions

npx skillmds@latest add dhaupin/environment