Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/dotenv/mod.ts

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
import * as mod from "https://deno.land/std@0.224.0/dotenv/mod.ts";

Parses and loads environment variables from a .env file into the current process, or stringify data into a .env file format.

Classes

Error thrown in load and loadSync when required environment variables are missing.

Functions

Load environment variables from a .env file. Loaded variables are accessible in a configuration object returned by the load() function, as well as optionally exporting them to the process environment using the export option.

Works identically to load, but synchronously.

Parse .env file output in an object.

Stringify an object into a valid .env file format.

Interfaces

Options for load and loadSync.