org.projectfile.env
Declares the environment variable contract for the project: required and optional vars with descriptions, examples, and allowed-value lists. Replaces .env.example; tooling can validate a running environment or populate secret stores. Variables marked secret=true are omitted from generated .env.example files.
- Namespace:
org.projectfile.env - Owner: projectfile.org (community-maintained)
- Status: proposed
Illustrative fragment — not a complete projectfile document. Consumers MUST round-trip unknown namespaces even when no shape is published.
---# SPDX-FileCopyrightText: 2026 Damián Búho <damian.buho@proton.me>## SPDX-License-Identifier: CC-BY-4.0# SPDX-License-Identifier: MIT
# Shape: org.projectfile.env extension namespace# Illustrative fragment — not a complete projectfile document.# See registry.yaml for ownership and status.
org: projectfile: env: required: - name: DATABASE_URL # REQUIRED variable name description: PostgreSQL connection DSN # OPTIONAL example: "postgres://user:pass@localhost:5432/mydb" # OPTIONAL non-sensitive example secret: false # OPTIONAL omit from .env.example - name: API_KEY secret: true # value is sensitive — omit from .env.example
optional: - name: LOG_LEVEL # REQUIRED variable name default: info # OPTIONAL value when unset values: [debug, info, warn, error] # OPTIONAL closed enum of allowed values[[org.projectfile.env.required]]name = "DATABASE_URL"description = "PostgreSQL connection DSN"example = "postgres://user:pass@localhost:5432/mydb"secret = false
[[org.projectfile.env.required]]name = "API_KEY"secret = true
[[org.projectfile.env.optional]]name = "LOG_LEVEL"default = "info"values = [ "debug", "info", "warn", "error" ]{ "org": { "projectfile": { "env": { "required": [ { "name": "DATABASE_URL", "description": "PostgreSQL connection DSN", "example": "postgres://user:pass@localhost:5432/mydb", "secret": false }, { "name": "API_KEY", "secret": true } ], "optional": [ { "name": "LOG_LEVEL", "default": "info", "values": [ "debug", "info", "warn", "error" ] } ] } } }}