Skip to main content

A simple CLI for swapping between .env files

Project description

Swap Env

swap-env is a simple CLI for swapping between different .env files.

demo

Requirements

python >= 3.10

Installation

  • with pipx (recommended):
$ pipx install swap-env
  • with pip:
$ pip install swap-env

Usage

Save any .env files you regularly use to ~/.swap-env/. Name them .env.<name> and you'll access them via <name> in swap-env.

$ ls -A1 ~/.swap-env
.env.dev
.env.test

Then simply run swap-env and select the file you want to use. A symlink will be created at ./.env to that file.

$ swap-env
? Select a .env file:
❯ dev
  test
  
? Select a .env file: dev

$ ls -l .env
... .env@ -> ~/.swap-env/.env.dev

If you have a local .env file (not a symlink), you will be prompted whether to save it first.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swap_env-0.2.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

swap_env-0.2.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page