theskumar / theskumar/python-dotenv

Feature Request: generate a template from an env file

Offen
#618 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
8.9k
Forks
581
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello,

Similar to the template support provided by dotenv in Ruby, it would be very helpful to have a CLI command that can generate an environment template file directly from an existing .env.

The goal is to make it easier to keep an environment template file up to date automatically.

For example:

# .env
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE

Could generate:

# .env.template
S3_BUCKET=S3_BUCKET
SECRET_KEY=SECRET_KEY

This command could be integrated into a pre-commit hook to ensure the template always reflects the current set of environment variables.

Additionally, it would be helpful to support a configuration option to preserve selected variables as-is or to exclude them from the generated template.

Thank you for considering this feature.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

No files or tests are named in the issue. Start by reviewing the existing CLI commands and .env parsing behavior, then define how template generation, preserving selected variables, and exclusions should work. Done means a CLI command can generate the shown template while supporting those configuration options and keeping the template aligned with the source .env.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.