Feature Request: generate a template from an env file

Đang mở
#618 8 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
8.9k
Fork
581
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của theskumar/python-dotenv

Tất cả issue của theskumar/python-dotenv

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.