Skip to content

ENVP is cli wrapper that sets environment variables by profile when you execute the command line

License

Notifications You must be signed in to change notification settings

sunggun-yu/envp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENVP

GitHub release (latest SemVer) GitHub all releases test release CodeQL Go Report Card codecov

ENVP is a shell wrapper command-line tool for macOS and Linux that enables you to run commands or shells with specific environment variable configurations based on profiles. It also allows you to run scripts to set up these profiles. With ENVP, you can easily switch between different environment configurations, even simultaneously in different terminal windows. This tool provides a convenient way to manage and control your environment variables for various development and testing scenarios.

envp intro

Installation

brew:

brew install sunggun-yu/tap/envp

Quick Start

Config file

Location of config file is ~/.config/envp/config.yaml.

please create folder and config file if it is not created.

mkdir -p ~/.config/envp
vim ~/.config/envp/config.yaml

config file example:

default: ""
profiles:
  my-profile:
    desc: profile description
    env:
      - name: HTTPS_PROXY
        value: http://some-proxy:3128
      - name: MY_PASSWORD
        value: $(cat ~/.config/my-password-file)
    init-script:
      - run: |
          echo "this is init script 1"
      - run: |
          echo "this is init script 2"

Start new shell with profile

You can create new shell session with injected environment variable from your profile.

# start new shell session with specific profile
envp start my-profile