envdoc
Scan your Python codebase for environment variable usage. Auto-generate
.env.exampleand a Markdown config reference.
Every project has undocumented environment variables. Someone runs it cold, nothing works, and
there's no .env.example to tell them what's missing. envdoc fixes that — it scans your code,
finds every os.getenv, os.environ, and common pattern, and writes the documentation for you.
$ envdoc scan ./src
Found 7 environment variables in 12 files
ANTHROPIC_API_KEY src/llm/client.py:14
DATABASE_URL src/db/connection.py:8
LOG_LEVEL src/app.py:22
PORT src/app.py:31
REDIS_URL src/cache.py:11
SECRET_KEY src/auth.py:9
SENTRY_DSN src/monitoring.py:4
Generated: .env.example
Install
pip install envdoc
Usage
# Scan and write .env.example
envdoc scan ./src
# Markdown config reference (for docs)
envdoc scan ./src --format markdown
# CI mode — exit 1 if .env.example is stale
envdoc scan ./src --check
# Write to a specific file
envdoc scan ./src --output docs/config.md --format markdown
CI integration
- name: Check .env.example is up to date
run: envdoc scan ./src --check
Any new env var added to the codebase without updating .env.example fails the build.
Roadmap
- Core scanner:
os.getenv,os.environ - #2 Pydantic
BaseSettingsdetection - #3
python-dotenvload_dotenvkey detection - #4 pre-commit hook integration
- #5 Nested env access in f-strings
- #6 GitHub Action wrapper
Contributing
See CONTRIBUTING.md.
License
MIT — see LICENSE.
Metadata
Release files for envdoc 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| envdoc-0.3.0.tar.gz | 13.7 kB | With provenance | Details for envdoc-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| envdoc-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for envdoc-0.3.0-py3-none-any.whl |
Total release size: 23.3 kB
Release files / envdoc-0.3.0.tar.gz
| Download URL | envdoc-0.3.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
190307b4ef65b6e80b786e88507b3780673876e654fb47a9bafb7b51d74f4f2b
|
|
BLAKE2b-256 checksum How to use checksums |
ca105162867a217da64464b624e27693f8379b6186cdd0cdbf11007730512b9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.
Transparency logRelease files / envdoc-0.3.0-py3-none-any.whl
| Download URL | envdoc-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
837b3efc0212fe8781787b2570e8272cd18af8a84771935f93cc748e59f9d1bf
|
|
BLAKE2b-256 checksum How to use checksums |
ac37e64a8d3c02272f4bb4feefc22fda361cdd684ae69c90e2caec358f2ad145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.
Transparency logSecurity for envdoc 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for envdoc-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.