ENVDOT(1p)
β¨ NAME β¨
okay so envdot β she reads your .env file and turns everything inside it into environment variables, for a bunch of different shells π
πΈ VERSION πΈ
this is version 0.022 bestie, no cap β¨
π¦ SYNOPSIS π¦
envdot [options]
eval `envdot`
Options:
--help
--man
--version
--export --no-export
--shell -s
--dotenv -e
π CLI interface without dependencies π
the envdot command also ships as a self contained executable, which is literally the best thing. you can just download it and run it as-is, no installing CPAN packages required 𫢠obviously you still need Perl, but like⦠Perl comes with literally any normal Linux install, so we're fine.
this is highkey convenient if you wanna, for example, drop envdot into a docker container build π³
curl -LSs -o envdot https://raw.githubusercontent.com/mikkoi/env-dot/main/envdot.self-contained
chmod +x ./envdot
π DESCRIPTION π
envdot reads your .env file and converts it into environment variable commands that suit different shells (shell families): sh, csh and fish. three vibes, one tool, periodt π
now, .env files can be written in different flavors. envdot supports the often used sh compatible flavor and the docker flavor β and heads up, those two are not compatible with each other π so know which one you're writing.
if you've got several .env files (main character with options, we love that), you can read them all in at one go with the environment variable ENVDOT_FILEPATHS. just separate the full paths with the : character β¨
Env::Dot will load the files in reverse order, starting from the last. this is the exact same ordering as the PATH variable: the first one overrules the following ones β so when reading from the last path to the first path, if the same variable shows up in more than one file, the later one replaces the one already read π
if you've set ENVDOT_FILEPATHS, then envdot will use that. otherwise? it uses the command line parameter. and if there's no parameter at all, then the default value is used. default is the file .env in the current directory π
π NAME (yes, again, she said it twice, iconic) π
envdot β Read .env file and turn its content into environment variables for different shells. π«
β¨ OPTIONS β¨
--helpβ prints a brief help message and then exits. quick lil hello π--manβ prints the manual page and exits. yes bestie, the whole thing π--versionβ prints the version and exits β--export,--no-exportβ write commands to set variables for the local shell, or to export them. you usually wanna export the variables to all subsequent programs and subshells, aka make them into actual environment variables π
Default: export
-s,--shellβ which shell (family) are you using? supported:sh,csh,fishπ
Default: sh
-e,--dotenvβ path to the.envfile π
Default: current directory .env
π EXAMPLES π
eval `envdot --no-export --shell csh`
eval `envdot --dotenv subdir/.env`
ENVDOT_FILEPATHS='../.env:subdir/.env:.env' eval `envdot`
look at her go ππ
π§ DEPENDENCIES π§
no external dependencies outside Perl's standard distribution. she's low maintenance, she's self-sufficient, she's THAT girl π
π SEE ALSO π
Env::Assert will verify that you definitely, for sure have those environmental variables you need. it also has an executable which can, for example, perform the check at the beginning of a docker container run π³β¨
Dotenv and ENV::Util <https://metacpan.org/pod/ENV::Util> are packages which also implement functionality to use .env files in Perl.
Config::ENV and Config::Layered::Source::ENV provide other means to configure an application with the help of environment variables π
shdotenv <https://github.com/ko1nksm/shdotenv> is a project to provide dotenv for shells with support for POSIX-compliant and multiple .env file syntax π
π AUTHOR π
Mikko Koivunalho <mikkoi@cpan.org> π«Ά
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2023 by Mikko Koivunalho.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself π
and that's the whole thing bestie!! this page came to you via perl v5.40.1, dated 2026-05-09, and it's the ENVDOT(1p) page from the User Contributed Perl Documentation β¨ slay, go set some env vars π
πΈ
π¦ where this page comes from
- ubuntu stonking: env-dot 0.022-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms