autoenv automatically executes code when you cd into a directory with a .env file. You can use it to automatically activate a project's virtual environment.
Autoenv alternatives and similar packages
Based on the "Environment Management" category.
Alternatively, view Autoenv alternatives based on common mentions on social networks and blogs.
pyenv9.7 9.6 Autoenv VS pyenvSimple Python version management
Pipenv9.6 7.5 Autoenv VS PipenvPython Development Workflow for Humans.
Poetry9.6 9.8 Autoenv VS PoetryPython packaging and dependency management made easy
virtualenv8.2 9.3 L1 Autoenv VS virtualenvVirtual Python Environment builder
rez5.0 8.3 Autoenv VS rezAn integrated package configuration, build and deployment system for software
Pew4.7 0.0 L5 Autoenv VS PewA tool to manage multiple virtual environments written in pure python
p4.1 0.0 Autoenv VS p:snake: Python Version Management Made Simple
virtualenvwrapperA set of extensions to virtualenv.
venv(Python standard library in Python 3.3+) Creating lightweight virtual environments.
Write Clean Python Code. Always.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Autoenv or a related project?
Autoenv: Directory-based Environments
Magic per-project shell environments
What is it?
If a directory contains a
.env file, it will automatically be executed
cd into it. When enabled (set
AUTOENV_ENABLE_LEAVE to a
non-null string), if a directory contains a
.env.leave file, it will
automatically be executed when you leave it.
This is great for...
- auto-activating virtualenvs
- auto-deactivating virtualenvs
- project-specific environment variables
- making millions
You can also nest envs within each other. How awesome is that!?
When executing, autoenv, will walk up the directories until the mount
point and execute all
.env files beginning at the top.
Follow the white rabbit:
$ echo "echo 'whoa'" > project/.env $ cd project whoa
Install it easily:
MacOS using Homebrew
$ brew install autoenv $ echo "source $(brew --prefix autoenv)/activate.sh" >> ~/.bash_profile
$ git clone https://github.com/hyperupcall/autoenv ~/.autoenv $ echo "source ~/.autoenv/activate.sh" >> ~/.bashrc
Download the @hyperupcall/autoenv package
$ npm install -g '@hyperupcall/autoenv' $ echo "source \"\$(npm root -g)/@hyperupcall/autoenv/activate.sh\"" >> ~/.bashrc
Before sourcing activate.sh, you can set the following variables:
AUTOENV_AUTH_FILE: Authorized env files, defaults to
~/.autoenv_authorizedif it exists; otherwise,
AUTOENV_ENV_FILENAME: Name of the
.envfile, defaults to
AUTOENV_LOWER_FIRST: Set this variable to a non-empty string to flip the order of
AUTOENV_ENV_LEAVE_FILENAME: Name of the
.env.leavefile, defaults to
AUTOENV_ENABLE_LEAVE: Set this to a non-empty string in order to enable source env when leaving
AUTOENV_ASSUME_YES: Set this variable to a non-empty string to silently authorize the initialization of new environments
AUTOENV_VIEWER: Program used to display env files prior to authorization. Default:
autoenv is tested on:
- Fish is supported by autoenv_fish
- More to come
direnv is an excellent alternative to autoenv, and includes the ability to unset environment variables as well. It also supports the Fish terminal.
cd. If you already do this, invoke
autoenv_init within your custom
cd after sourcing
Autoenv can be disabled via
unset cd if you experience I/O issues with certain file systems, particularly those that are FUSE-based (such as
Autoenv was originally created by @kennethreitz. Later, ownership was transfered to @inishchith. As of August 22nd, 2021, Edwin Kofler (@hyperupcall) owns and maintains the project