01Precedence per frameworkاولویت برای هر فریمورک
From each vendor's documentation: Vite (process > .env.[mode].local > .env.[mode] > .env.local > .env), Next.js and CRA, plain dotenv (process wins unless override) and Docker Compose (environment: beats env_file:).از مستندات هر فروشنده: Vite (process > .env.[mode].local > .env.[mode] > .env.local > .env)، Next.js و CRA، dotenv ساده (پروسه برنده است مگر override) و Docker Compose (environment: از env_file: قویتر است).
02The edit that is ignoredویرایشی که نادیده گرفته میشود
SHADOWED is a confirmed case: your edit to .env.local is ignored because the shell already exports the variable, with the exact unset command for bash, PowerShell or cmd.SHADOWED یعنی مورد تأییدشده: ویرایش شما در .env.local نادیده گرفته میشود چون شل از قبل متغیر را export کرده، با دستور دقیق unset برای bash، PowerShell یا cmd.
03Who exported the old valueچه کسی مقدار قدیمی را export کرده
Best effort: ~/.bashrc, ~/.profile, /etc/profile.d and .envrc in the project and its parents; on Windows the user and machine registry keys. Reported as "probably set at" because whyenv cannot see the process that did it.تا حد ممکن: ~/.bashrc، ~/.profile، /etc/profile.d و .envrc در پروژه و پوشههای بالاتر؛ در ویندوز کلیدهای رجیستری کاربر و ماشین. با عبارت «احتمالاً در اینجا تنظیم شده» گزارش میشود چون whyenv فرایندی را که این کار را کرده نمیبیند.
04Traps around the valueتلههای اطراف مقدار
A missing VITE_ or NEXT_PUBLIC_ prefix, a build directory older than .env, an empty value that wins, a similarly named variable, BOM, CRLF, spaces around =, inline #, duplicate keys, unterminated quotes, a container that was not recreated.پیشوند VITE_ یا NEXT_PUBLIC_ جاافتاده، پوشهٔ بیلد قدیمیتر از .env، مقدار خالیِ برنده، متغیری با نام مشابه، BOM، CRLF، فاصله دور =، علامت # وسط خط، کلیدهای تکراری، نقلقول بستهنشده، کانتینری که دوباره ساخته نشده.
05Secrets stay hiddenرمزها پنهان میمانند
Names containing KEY, SECRET, TOKEN, PASS and similar are shown as hidden with only a length; --show-values is explicit. It reads files and the Windows registry, never sends anything over the network and never writes.نامهای شامل KEY، SECRET، TOKEN، PASS و مانند آن فقط با طول و بهصورت پنهان نشان داده میشوند؛ --show-values صریح است. فایلها و رجیستری ویندوز را میخواند، چیزی را روی شبکه نمیفرستد و چیزی نمینویسد.
06For humans and agentsبرای آدمها و ایجنتها
--json for scripts, exit code 1 on a confirmed shadowed value and 2 when the variable is defined nowhere, and a snippet for AGENTS.md / CLAUDE.md so an assistant runs whyenv instead of editing .env in circles.خروجی --json برای اسکریپت، کد خروج ۱ برای مقدار تأییدشدهٔ shadowed و ۲ وقتی متغیر هیچجا تعریف نشده، و یک snippet برای AGENTS.md / CLAUDE.md تا دستیار بهجای چرخیدن دور .env از whyenv استفاده کند.