Skip to content

Set Up your local environment

A Leverage project is managed via our Leverage CLI, which in turn, makes use of a couple of applications that should be installed in your system beforehand, as is explained in the pre-requisites.

So first, make sure these are installed in your system and the Docker daemon is up and running.

Install Leverage CLI

As previously stated, to manage a Leverage project and operate the whole Leverage stack you will need to install Leverage CLI. Binbash distributes Leverage CLI as a python package, so you can install it via pip.

pip install leverage

For more detailed information in installing Leverage CLI: 📚 Install Leverage CLI

Verify your Leverage CLI installation

Verify that your Leverage CLI installation was successful by running

leverage --help
Usage: leverage [OPTIONS] COMMAND [ARGS]...

  Leverage Reference Architecture projects command-line tool.

Options:
  -f, --filename TEXT  Name of the build file containing the tasks
                       definitions.  [default: build.py]
  -l, --list-tasks     List available tasks to run.
  -v, --verbose        Increase output verbosity.
  --version            Show the version and exit.
  -h, --help           Show this message and exit.

Commands:
  credentials  Manage AWS cli credentials.
  project      Manage a Leverage project.
  run          Perform specified task(s) and all of its dependencies.
  terraform    Run Terraform commands in a custom containerized...
  tf           Run Terraform commands in a custom containerized...

Enable tab completion

If you use Bash, Zsh or Fish, you can enable shell completion for Leverage commands.

Add to ~/.bashrc:

eval "$(_LEVERAGE_COMPLETE=bash_source leverage)"

Add to ~/.zshrc:

eval "$(_LEVERAGE_COMPLETE=zsh_source leverage)"

Add to ~/.config/fish/completions/leverage.fish:

eval (env _LEVERAGE_COMPLETE=fish_source leverage)

Now you need to restart your shell.

Next steps

Now you have your system completely configured to work on a Leverage project.

Next, you will setup and create your Leverage project.