#env #dotenv #switcher #change

app vnetod

Are you still switching sections in your dotenv file manually? Try this dotenv section switcher

9 unstable releases (3 breaking)

0.4.0 Nov 12, 2022
0.3.3 Sep 18, 2022
0.3.2 Aug 2, 2022
0.2.2 Jul 31, 2022
0.1.0 Jul 29, 2022

#528 in Configuration

Download history 1/week @ 2023-11-13 10/week @ 2023-11-20 20/week @ 2023-11-27 9/week @ 2023-12-04 9/week @ 2023-12-11 18/week @ 2023-12-25 9/week @ 2024-01-08 12/week @ 2024-01-15 2/week @ 2024-01-22 18/week @ 2024-01-29 2/week @ 2024-02-05 44/week @ 2024-02-12 171/week @ 2024-02-19

235 downloads per month


424 lines


* inverted word "dotenv"

Are you still switching sections in your dotenv file manually? Try this dotenv section switcher!

You can create many sections in your .env and switch between them.


  • Section name starts on a new line with ### symbols (Ex. ### local)
  • Section can contain multiple comma-separated names (Ex. ### local,staging)
  • Each section name may specify a namespace (Ex. ### debug:on,dev:on). If a section doesn't contain a namespace, it's a global namespace.
  • Section ends if line is empty or contains a new section name.

You can see the full example.


Basic usage

cp .env.example .env
vnetod local        # enable local section
vnetod staging      # enable staging section
vnetod local debug  # enable local and debug sections
vnetod              # disable all sections

This tool uses .env from your current location, but you can change this behavior with the -f (--file) flag.

cp .env.example .env.properties
vnetod -f .env.properties local

And you can also change the output file with the -o (--output) flag, if you don't want to overwrite the input file.

vnetod -f .env.example -o .env local

You can also use variables from namespaces

vnetod db:staging debug:off

You can switch between states and overwrite from namespaces at the same time.

vnetod local db:staging debug:off

For more information, see the help.

vnetod --help



cargo install vnetod


docker run --rm -it -v $PWD:/data pleshevskiy/vnetod --help


nix run git+https://git.pleshevski.ru/pleshevskiy/vnetod -- --help

Contact me


GNU General Public License v3.0 or later

See COPYING to see the full text.


~59K SLoC