It's a file that contains secrets that a program uses, like passwords and API keys.
Edit: I wasn't sure if this was a joke or a serious question. Now that I think of it, the joke could be that the secrets are being hard coded into the source code.
More broadly, a .env file does not only contain secrets (though this is the reason why you wouldn't want to share it), but also application configuration values. It's called a .env file because it is for storing environment variables (values a process are provided) and the dot makes the file "hidden" on Linux systems. It is very commonly used because services running in containers, like Docker and Kubernetes, can be configured by passing values in by setting environment variables.
A developer working locally might have values in their .env file for using development environments, local containers, or mock services. In production, different values will be used and kept secret to ensure people can't know how to do things like access the production database. So, just to make things clear, a .env file is one way of providing environment variables to a program, but there are also other ways not using this file.
Imagine you have a mobile app. Usually you need external information, like images, numbers, videos, or others, and for that you want the app to access a site or a server. The app can access any of those ususally with an API, which requires a password.
Anyone can access a API if they got the codes. Lets say i got a stock app, and put the .env in chatgpt. Chatgpt will now recomend to other users to use that API to get access to stocks information, which the programmer may not want everyone to get access to (because information costs money).
the fact that that's the goto approach and not just having a variable dump outside the directory and the agents just have to assume what the labels are by some convention, but never actually read the content.
They aren't but they never forget , it's just a bad practice and shouldn't ever be incourage at all
And who knows if an ai breach happens (which will happen , tho luckily these companies are good enough to not be stupid, yet if it happens.who's api are gona be sold for money ??
Oh nicee , I didn't knew about anthropic, lokey that's great ngl , i mean it makes sense then and prolly the team wouldn't fire the dude if he did that in anthropic cuz as u said it's safe :)
Tho i don't use any ai and others , ie online friends used chatgpt and grock and free soo yeah , thanks for telling me about it
Funny story from about 20 minutes ago, had an env variable error so I open the file to fix it. Copilot automatically suggested keys, 2 prompts later I see codex just "Checking .env for incorrect keys", it's all in the gitignore...
Its fine because all of them are dummy keys anyways, but... yea, they do not ignore the .env even if its in .gitignore :)
Have you ever heard about copper wiring as a memory cells? No? Well than -- you are a compiler monkey! Duh, these kiddos with their "assembly", or COBOL just can't do anything themselves....
You defined vibe-coders -- they are non-programmers mostly. And, it seems, you are either a Neo-Luddite, or Gate-Keeper, or 15 y.o. Edge Lord.
LLMs are here to stay. LLMs write mostly useless code. Programmers are bootstrapping their skills by using LLMs as an extremely powerful knowledge tool.
Yes, programmers also use LLMs for copypasting chunks of the code -- we, living beings, are LAZY -- when you developing for 4 billion years in cluster-fuck called "biosphere" with constant shit-storm from space, sun or earth itself, you develop small thing -- efficiency, energy preservation. Cost effectiveness in other words. If you are not cost-effective -- you are dead. At least this was the way for the last 4 billion years.
Using brain is extremely cost-ineffective. This is why we created computing machines! To make our lives more cost-effective! To make our daily lives EASIER.
And, this is why programmers now use LLMs not only to bootstrap their knowledge, but to copy-paste chunks of code. To think of something more, than "hmm, how do I write this HEAP Sort..."
And this will stay, like it or not. New tool -- adapt or die. Modus vivendi and Modus operandi of all life on Earth.
Why you can't comprehend this, if you are SO proficient in programming IDK, but don't be silly. For someone like Zuse you are compiler monkey, who can't create his own CPU.
The AI worshippers think a chatbot is gonna save them from learning how a computer works. They didnât give humanity ChatGPT on Mount Sinai. They gave us commandments. You people copy-paste code from a robot trained on other peopleâs bugs and call it programming.
âAdapt or dieâ is what the Java demons said before they filled the world with 8 gigabytes of dependencies to print âHello World.â
You say programmers are lazy. Thatâs true. Thatâs why half the internet is Electron apps eating 3 GB of RAM to display a button.
We built computers because there werenât any computers. Youâre asking a computer how to write a computer program. Thatâs like hiring a taxi to walk your dog.
If the AI writes the code, debugs the code, designs the code, and explains the code, congratulations: youâre not a programmer anymore. Youâre middle management for a stochastic parrot.
The compiler monkey insult is funny. At least compiler monkeys know what a pointer is other than most AI programmers who âuse AI to debugâ when you know they are just using it to write your code.
Why you are bombarding me with this.. slop I also dunno =)
People, who can't comprehend trivial concepts as "thermodynamics of life on Earth" should question their life choices well before ranting about pointers lol.
You wrote a wall of text on why lazy evolution is okay. I wrote a wall of text disproving that entirely. Guess which one actually helps the computer run? The LLM or the programmer?
CBRAM is completely irrelevant to the fact that programmers are using AI.
AneoEngine, my operating system, was written primarily in AneoC and standalone C. No COBOL was ever used. x86 assembly was used for both bootloaders and the disk saving.
I wrote a compiler, what are you talking about??? My compiler is completely independent and doesnât use any external sources. It is its own compiler, linker, and ELF creator.
36
u/Cheap-Helicopter-225 Jun 22 '26
YOU DID WHATT đđ„
26
u/dashinyou69 Jun 22 '26
chill i added a .env.md in my agent folder which is in already in .gitignore đ„
18
u/Confident-Ad5665 Jun 22 '26
Looks legit
16
u/jakeStacktrace Jun 22 '26
Well we did put a dot at the beginning of the file name to make it "hidden" so I guess we did all we can.
11
u/MonkInevitable1087 Jun 22 '26
Whats a .env? Im 14 and dumb
3
u/MakimaHancock69 Jun 23 '26
I know this is bad in theory, is it really that bad in practice? Are these companies really exploiting API keys?
2
u/dtb1987 Jun 22 '26
2
u/Ill_Jaguar_2147 Jun 22 '26
r/firstweekcoderhumour
2
u/nullpotato Jun 22 '26
Vibing coworkers are the best at finding repos that don't have .env in the gitignore.
Sure glad it is super easy to purge files from git history sobs
1
u/SirCokaBear Jun 24 '26
Stop putting secrets in .env files
1
u/Melodic-Ebb-7781 Jun 24 '26
Just ask claude to add it as a memory, then you can delete it.
1
u/EdgeCaseHuman404 Jun 25 '26
Youâre cooked đ
1
u/YourMomsDumpTruck69 Jun 25 '26
Funny story from about 20 minutes ago, had an env variable error so I open the file to fix it. Copilot automatically suggested keys, 2 prompts later I see codex just "Checking .env for incorrect keys", it's all in the gitignore...
Its fine because all of them are dummy keys anyways, but... yea, they do not ignore the .env even if its in .gitignore :)
-6
u/rocco_himel Jun 22 '26
âProgrammerâ humor.
The programmer used to write code.
Now he writes prompts asking a robot to write code.
You arenât âprogrammingâ anything.