Skip to content

code_env

code_env shows where an environment variable is defined (.env, docker-compose.yml, Dockerfile) and every place in the codebase that reads it (process.env.X, os.environ["X"]).

code_env(name="DATABASE_URL")
code_env(name="STRIPE_SECRET_KEY")
code_env()
ParameterTypeDefaultDescription
namestringEnvironment variable name; omit to list all
DATABASE_URL
Defined in:
.env.example DATABASE_URL=postgres://localhost:5432/myapp
docker-compose.yml DATABASE_URL=postgres://db:5432/myapp
Read in:
src/db/client.ts:3 process.env.DATABASE_URL
src/db/migrate.ts:7 process.env.DATABASE_URL
  • Audit all environment variables used in a project
  • Find every place a secret is accessed before rotating it
  • Verify a new variable is defined everywhere it needs to be
  • Onboarding — understand external configuration dependencies

code_env reads definitions from .env.example and config files — not from your actual .env (which is gitignored). It maps the structure of configuration, not the secret values.