theskumar / theskumar/python-dotenv

Feature Request: Generating .env.example file from a .env file

Open
#354 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.9k
Forks
581
PR merge metrics
No merged PRs in 30d

Description

Hi,

Sometimes we can not share .env file. However it would be useful if we could generate a .env.example from it which contains all the comments and keys name in it. For example, suppose .env has the following content,

# this is comment
API_SECRET_KEY=some-value

Then generated .env.example file has the following content,

# this is comment
API_SECRET_KEY=

It would be useful if a CLI command is provided for it.

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the project's CLI entry point and the code that parses .env files. Check how comments and key names are currently represented, then define completion around a command that produces .env.example with comments preserved and values removed; verify the behavior against the example in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.