theskumar / theskumar/python-dotenv

Feature Request: generate a template from an env file

Aperta
#618 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
8.9k
Fork
581
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.