Git Product home page Git Product logo

enve's Introduction

Enve devel PkgGoDev

Run a program in a modified environment providing a .env file.

Enve is a cross-platform tool that can load environment variables from a .env file and execute a given command. It also can output environment variables in text, json or xml format.

It can be considered as a counterpart of GNU env command.

Install

  • Platforms supported: linux, darwin, windows, freebsd, openbsd
  • Architectures supported: amd64, 386, arm, arm64, ppc64le
curl -sSL \
   "https://github.com/joseluisq/enve/releases/download/v1.4.2/enve_v1.4.2_linux_amd64.tar.gz" \
   | sudo tar zxf - -C /usr/local/bin/ enve

Using Go:

go install github.com/joseluisq/enve@latest

Release binaries also available on joseluisq/enve/releases

Usage

By default, enve will print all environment variables like env command.

enve
# Or its equivalent
enve --output text

Executing commands

By default, an optional .env file can be loaded from the current working directory.

enve test.sh

However it's possible to specify a custom .env file using the --file or -f flags.

enve --file dev.env test.sh

Printing environment variables

enve supports text, json and xml formats.

enve --output text # or just `enve`
enve --output json
enve --output xml

Options

$ enve 1.4.2
Run a program in a modified environment using .env files

USAGE:
   enve [OPTIONS] COMMAND

OPTIONS:
   -f --file      Load environment variables from a file path (optional) [default: .env]
   -o --output    Output environment variables using text, json or xml format [default: text]
   -h --help      Prints help information
   -v --version   Prints version information

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in current work by you, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions.

Feel free to send some Pull request or file an issue.

License

This work is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

© 2020-present Jose Quintana

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.