Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Directory-based environments.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 tests
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.rst
Octocat-spinner-32 activate.sh
README.rst

Autoenv: Directory-based Environments

Magic per-project shell environments. Very pretentious.

What is it?

If a directory contains a .env file, it will automatically be excecuted when you cd into it.

This is great for...

Foreman env files are completely compatible.

You can also nest envs within eachother. How awesome is that!?

Usage

Follow the white rabbit:

$ touch project/.env
$ echo "echo 'woah'" > project/.env
$ cd project
woah
http://media.tumblr.com/tumblr_ltuzjvbQ6L1qzgpx9.gif

Install

Install it easily:

$ brew install autoenv

If you're on Linux, follow these simple steps:

$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc

Disclaimer

Autoenv overrides cd. If you already do this, invoke autoenv_init within your custom cd after sourcing activate.sh.

Testing

Install the test runner:

$ make
gem install dtf --version 0.1.2
Successfully installed dtf-0.1.2

Test:

$ make test
dtf tests/*
............
##### Processed commands 14 of 14, success tests 12 of 12.
Something went wrong with that request. Please try again.