Wrangle environment variables.

Shello Desktop App Screehshot with example environmentDownload Shello on the Mac App Store
Shello - Wrangle environment variables | Product Hunt

Setup shello cli

For shello environments to be useful, their variables need to be exported into your terminal session. This can be achieved by adding the following to your .zshrc, or .bash_profle, or whatever file you use to source your shell.

1. Add to your source file

## shello -- for managing environment variables
shello () {

  ## first clear the current environment's variables

  if [ -f "$currentPath" ]; then
      while IFS= read -r line || [[ -n "$line" ]]; do
          key=$(echo "$line" | cut -d '=' -f1)

          unset "$key"
      done < "$currentPath"


  # Check if the file exists
  if [ -f "$envFilePath" ]; then
      # Read each line from the file and set environment variables
      while IFS= read -r line || [[ -n "$line" ]]; do
          # Split line into KEY and VALUE
          key=$(echo "$line" | cut -d '=' -f1)
          value=$(echo "$line" | cut -d '=' -f2-)

          # Set the environment variable
          export "$key"="$value"

          # echo "Setting $key from shello 🐚"
      done < "$envFilePath"

      export "SHELLO_CURRENT_ENV"="$1"
      echo "🐚 shello env --> $1"
      echo "File not found: $envFilePath"


2. Pick a default env (optional)

Optionally, you can load a default environment every time a terminal session is created.


3. Try it out

Start a new terminal session and run the following command

shello {YOUR_ENV_NAME}
Made with ❤️ in Dallas, TX.