{"id":32595222,"url":"https://github.com/dipendrapant/dotenvcheck","last_synced_at":"2026-05-19T07:06:16.912Z","repository":{"id":320304765,"uuid":"1081485556","full_name":"dipendrapant/dotenvcheck","owner":"dipendrapant","description":"A package to cross-checks the environment variables used in your Python code against those declared in your .env and docker-compose.yml files.","archived":false,"fork":false,"pushed_at":"2025-10-23T03:30:15.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-23T04:14:20.031Z","etag":null,"topics":["docker-compose","environment","environment-variables","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dipendrapant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-22T21:12:53.000Z","updated_at":"2025-10-23T03:11:58.000Z","dependencies_parsed_at":"2025-10-23T04:14:36.172Z","dependency_job_id":"b0baf75d-93f8-4968-bdb1-c12695f45529","html_url":"https://github.com/dipendrapant/dotenvcheck","commit_stats":null,"previous_names":["dipendrapant/envguard"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dipendrapant/dotenvcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipendrapant%2Fdotenvcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipendrapant%2Fdotenvcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipendrapant%2Fdotenvcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipendrapant%2Fdotenvcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dipendrapant","download_url":"https://codeload.github.com/dipendrapant/dotenvcheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dipendrapant%2Fdotenvcheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33205557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","environment","environment-variables","python3"],"created_at":"2025-10-30T03:34:09.360Z","updated_at":"2026-05-19T07:06:16.907Z","avatar_url":"https://github.com/dipendrapant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"`dotenvcheck` cross-checks the environment variables used in your Python code against those declared in your `.env` and `docker-compose.yml` files.\nIt reports **unused**, **missing**, and **mismatched** variables — helping you keep your environment configuration clean and consistent.\n\nFor example, if you’ve ever had a project with 20 variables in `.env` but only 10 actually used, `dotenvcheck` instantly shows you which ones can be safely removed or fixed.\n\n---\n\n## Installation\n\n```bash\npip install dotenvcheck\n# or\npipx install dotenvcheck\n\n# with docker-compose support\npip install \"dotenvcheck[compose]\"\n```\n\n---\n\n## Usage\n\nFrom your project root (where `.env` lives):\n\n```bash\ndotenvcheck .\n```\n\nYou’ll get a report listing missing, unused, or suspicious environment variables.\n\nExample output:\n\n```\n== dotenvcheck report ==\nunused (2): DATABASE_URL, NOTUSEDAPI_KEY\n\nsources:\n  API_KEY: .env\n  DATABASE_URL: .env\n  DEBUG: .env\n  NOTUSEDAPI_KEY: .env\n```\n\n---\n\n## Configuration (optional)\n\nYou can configure defaults globally for your project via a `[tool.dotenvcheck]` section in your `pyproject.toml`.\n\n```toml\n[tool.dotenvcheck]\nexclude = [\".venv\", \"venv\", \"env\", \".git\", \"__pycache__\", \"dist\", \"build\", \"node_modules\"]\nfail_on = [\"missing\"]\ndotenv = \".env\"\ninclude = \"*.py\"\n```\n\n### Options\n\n| Key       | Type                      | Default                                                                            | Description                                                                                                          |\n| --------- | ------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |\n| `exclude` | list of strings           | `[\".venv\", \"venv\", \"env\", \".git\", \"__pycache__\", \"dist\", \"build\", \"node_modules\"]` | Directories or file patterns to ignore while scanning your code.                                                     |\n| `include` | string or list of strings | `\"*.py\"`                                                                           | Glob pattern(s) of files to include when scanning for environment variable usage.                                    |\n| `dotenv`  | string                    | `\".env\"`                                                                           | Path to your `.env` file used for validation.                                                                        |\n| `fail_on` | list of strings           | `[\"missing\"]`                                                                      | Determines which findings trigger a non-zero exit code. Options: `\"missing\"`, `\"typos\"`, `\"bad_values\"`, `\"unused\"`. |\n\n---\n\n## Behavior\n\n- Ignores common directories like `.venv`, `dist/`, `build/`, and `.git/` by default.\n- Command-line arguments always override `pyproject.toml`.\n- Works seamlessly across macOS, Linux, and Windows.\n- Fully supports Python 3.8 → 3.12+.\n\n---\n\n## Project structure\n\n```\ndotenvcheck/\n├─ src/\n│  └─ envguard/\n│     ├─ __init__.py\n│     ├─ __main__.py\n│     ├─ cli.py\n│     ├─ scanner.py\n│     ├─ dotenv.py\n│     ├─ compose.py\n│     └─ report.py\n├─ tests/\n├─ pyproject.toml\n├─ LICENSE\n├─ README.md\n└─ .github/\n   └─ workflows/\n      ├─ test.yml\n      └─ workflow.yml\n```\n\n---\n\n## License\n\n**MIT License** – feel free to use, modify, and contribute.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipendrapant%2Fdotenvcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdipendrapant%2Fdotenvcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdipendrapant%2Fdotenvcheck/lists"}