.env.example generator prompt for any project
Paste your code and get a documented .env.example file listing every environment variable it uses, safe to commit.
متى تستخدم هذا البرومبت
- When onboarding a new developer who needs to know which env vars to set.
- When a project has grown env vars organically with no central list.
- When preparing a repo for open-sourcing.
نص البرومبت
Generate a .env.example file for a {{language}} project using {{framework}}, based on the environment variables referenced in this code. Add a one-line comment explaining each variable.
{{CLIPBOARD}}{{language}}{{framework}}{{CLIPBOARD}}الكتلة {{CLIPBOARD}} تُستبدل تلقائياً بما نسخته قبل الضغط على «نسخ».
كيف تستخدمه
- انسخ البرومبت بالزر أو املأ المتغيرات أولاً.
- الصقه في ChatGPT أو Claude أو Gemini.
- عدّل النتيجة أو أعد الطلب بتغيير المتغيرات.
مثال على النتيجة
# Database connection string, e.g. postgres://user:pass@localhost:5432/db DATABASE_URL= # Secret used to sign JWTs, generate with openssl rand -hex 32 JWT_SECRET= # Optional: set to debug for verbose logging, defaults to info LOG_LEVEL=info
نصائح للاستخدام
- Paste multiple files if env vars are read in several places, so none are missed.
- Never include real secret values, only variable names and safe example/placeholder formats.
- Ask it to group variables by category (database, auth, third-party APIs) if the list is long.
أسئلة شائعة
- Will it accidentally include real secret values from my code?
- No, it only lists variable names with placeholder or example values; double-check before committing regardless.
- Can it find env vars used indirectly, like in a config loader?
- Paste the config loader file too; it can only detect variables visible in the code you provide.