freshenv
is a command line application to provision and manage local developer environments. Build and develop your projects in completely isolated environments. Save, switch and restart your environments. Choose from a wide variety of flavours to get the developer tools you need.
This is a solution to a problem I have always had. I like my system to be clean, minimal and structured.
It gets quite tricky to manage multiple projects on my on machine, projects tend to gather and are placed everywhere.
Overtime managing system wide dependencies becomes a problem. It is quite easy to mess up a system setting or to
keep track of a package I wont need tomorrow. This is why I built freshenv
. It is a command line application
which helps developers in running and managing completely isolated developer environments locally.
It fetches and lets you run environment flavours in the form of docker containers
which are preconfigured with tools and packages developer needs everyday. Read about the usage below.
I imagine it would help developers like me. I hope you like it.
freshenv flavours
are different configurations for freshenv environments. You choose a flavour and provision it as an environment. A flavour can be a combination of operating systems, language packs, tools and application bundles. By default freshenv provisions you with a base
flavour which runs ubuntu 18.04 and has packages like wget git python3-pip curl zsh wget nano zsh
and more. The base flavour is a 260mb environment when provisioned. There are bigger flavours like devenv
which runs on the latest ubuntu and has been loaded and configured with docker (run docker inside your freshenv environment), golang, python, node, java, a vscode server, build-essential automake make cmake sudo g++ wget git python3-pip curl zsh wget nano nodejs npm fonts-powerline
and more. This environment is around 1.6gb large. Freshenv also gives you the option to provision a language based environment which contains necessary developer tools for that language. Checkout the usage section below on the flavours command to see a list of flavours available.
Freshenv depends on docker and python. You must have docker
and python3.6+
installed to be able to use the cli.
I recommend using the snap package manager to install freshenv.
snap install freshenv
snap connect freshenv:docker docker:docker-daemon # give it access to the docker interface
If you dont have or use snap, install the freshenv python package from pypi.
pip install freshenv
I would recommend using pipx instead of pip to install cli applications on you machine.
I am trying to get freshenv on homebrew-core but I need more stars on the repository for them to accept my pull request. The self hosted tap is available on the repo raiyanyahya/homebrew-freshenv. Install the freshenv python package from a self hosted homebrew tap.
brew tap raiyanyahya/freshenv
brew install freshenv
Usage: fr [OPTIONS] COMMAND [ARGS]...
A cli to provision and manage local developer environments.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
check Check system compatibility for running freshenv.
clean Remove all freshenv flavours and environments.
flavours Show all available flavours for provisioning.
provision Provision a developer environment.
remove Remove a freshenv environment.
start Resume working in an environment.
view View local freshenv managed environments.
flavours
Usage: fr flavours [OPTIONS]
Show all available flavours for provisioning.
Options:
--help Show this message and exit.
provision
Usage: freshenv provision [OPTIONS]
Provision a developer environment.
Options:
-f, --flavour TEXT The flavour of the environment. [default: base]
-c, --command TEXT The command to execute at startup of environment.[default: zsh]
-p, --ports INTEGER List of ports to forward. [default: 3000]
-n, --name TEXT Name of your environment.
--help Show this message and exit.
start
Usage: freshenv start [OPTIONS] NAME
Resume working in an environment.
Options:
--help Show this message and exit.
remove
Usage: freshenv remove [OPTIONS] NAME
Remove a freshenv environment.
Options:
-f, --force Force remove an environment.
--help Show this message and exit.
view
Usage: freshenv view [OPTIONS]
View local freshenv managed environments.
Options:
--help Show this message and exit.
check
Usage: freshenv check [OPTIONS]
Check system compatibility for running freshenv.
Options:
--help Show this message and exit.
clean
Usage: fr clean [OPTIONS]
Remove all freshenv flavours and environments.
Options:
-f, --force Force remove freshenv flavours and environments.
--help Show this message and exit.
Contributions are always welcome!
See contributing.md
for ways to get started. Please adhere to this project's code of conduct
.
Contact me through email at contact@freshenv.io