Home

Awesome

EnvStatus

Build Status Release Hackage Hackage

Why???

All of this means that I wanted a tool that could accept a list of commands, organized in a nice little template, and that would render the template efficiently. Efficiently means basically that all commands are run in parallel, meaning that the time it takes to render the template is basically the time it takes to execute the longest command.

This is what envstatus is.

Install

Whichever way you install envstatus, don't forget to complete the Setup

Mac OSX with brew (soon)

brew tap gbataille/homebrew-gba
brew install envstatus

With Cabal

envstatus is available on hackage. Therefore just get it as usual

cabal install envstatus

Setup

The first thing to do is build a configuration file. There is one example in this repo. envstatus searches for a .envstatusrc file in your home directory

This file is in "key: value" format and should contain:

Example

The following config

# For multiline strings, just go to the line and indent the content. If there are several lines,
# make sure the indentation is consintent. It will be stripped in the produced output.
# TEMPLATE
output_template: venv: {{virtualenv}}
   python: {{python}}
   rvm: {{rvm}}
   nvm: {{nvm}}
   Terraform: {{tf}}
# COMMANDS
virtualenv: bash -c "echo $VIRTUAL_ENV"
rvm: bash -c "echo $RUBY_VERSION"
nvm: node --version
tf: terraform workspace show
python: python --version

outputs

venv:
python:  Python 3.5.4
rvm:  ruby-2.5.1
nvm:  v8.10.0
Terraform:  default

in about 200 ms (on my old macbook)

Contributing

Running the tests

Simply call ./scripts/test.sh