This repo has some helpers (mainly python related) to avoid writting boilerplate code.
-
inside a desired directory clone the repo:
git clone https://github.com/KantiCodes/mac-bash-commands.git
-
setup environmental variables inside
.../mac-bash-commands/env-varsfile, for example:PROJ_PATH=~/Desktop/Projects/mac-bash-commands # Location where you cloned the repo GOTO_PATH=~/Desktop/Projects/ # Default Directory of goto function with all of you repositories -
To use my tool edit the
~/.zprofileso that it runsmain.sh.-
run
nano ~/.zprofile -
paste the following line to it (replace the location of the repo)
source /location-of-the-repo/mac-bash-commands/main.sh -
finally re-open the terminal
This will allow you to access the tool's functionality from your terminal. Please note that you can also add this line to other shell initialization files such as
.zshenvor.bashrc, depending on your preference and setup.It's important to note that .zshenv, .zprofile, and other shell initialization files are used by the shell to set up the environment and define various system and user settings. While it's beyond the scope of this readme to explain each file in detail, I encourage you to read more about them and their purpose. By doing so, you can gain a better understanding of how your shell environment is set up and configured.
-
project navigator that allows you to quickly navigate to one of your repositories inside GOTO_PATH
Helper aliasing some of the boilerplate commands when handling python environments such as creating venvs, compiling requirements.in, installing reqreuiemnts etc. See pvenv --help for all functionality
Examples:
-
pvenv -m 3.10will run:python3.10 -m venv .venv: source .venv/bin/activate python -m pip install pip-tools -
pvenv -if/--install-filewill run:python -m pip install -r requirements.txt -
pvenv -if something/requirements.txtpython -m pip install -r something/requirements.txt