Skip to content

JayJamieson/envrun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envrun

Run any binary with a preconfigured set of environment variables where that binary becomes the main process (via execve/syscall.Exec).

envrun --env=HTTPS_PROXY=https://proxy:8080 /bin/bash

/bin/bash (or any binary you name) becomes the process — envrun is gone from the process table the moment exec succeeds.

Usage reference

envrun [OPTIONS] <command> [args...]

OPTIONS:
  --env=KEY=VALUE    Set an environment variable (repeatable)
  --clean            Start with an empty environment (no inherited vars)
  --help             Show this help

EXAMPLES:
  # Run bash with a proxy environemnt variable set
  envrun --env=HTTPS_PROXY=https://proxy:8080 /bin/bash

  # Run curl with forced proxy and no inherited env
  envrun --clean --env=HTTPS_PROXY=https://proxy:8080 --env=HOME=/tmp /usr/bin/curl https://example.com

About

Utility to easily run commands in clean or with custom environment variables

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages