The dotenv utility reads a file (by default .env in the current directory) and loads the environment variables from it. It then executes the specified

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-04-28 20:30:02

The dotenv utility reads a file (by default .env in the current directory) and loads the environment variables from it. It then executes the specified program with the loaded environment variables. If no dotenv file is found, it will execute the program with the current environment.

The file format is a list of key-value pairs, one per line. The key and value are separated by an equal sign. Whitespaces around keys and values are ignored. A line is terminated by a newline character or a carriage return. Comments can be added using a hash sign (#) either at the start of a line or inline. For values that contain a hash sign, the value must be quoted. Values can be optionally quoted with single or double quotes. If quoted, the following escape sequences are supported:

Leave a Comment