Feature Request: generate a template from an env file

Abierto
#618 8 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
8.9k
Forks
581
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de theskumar/python-dotenv

Todos los issues de theskumar/python-dotenv

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.