Autoactivator is a powerful tool designed to streamline your workflow when working with virtual environments. With Autoactivator, you can easily activate your virtual environments as soon as you enter a corresponding project directory, and stay activated for as long as you're working in that directory. Once you're done with the project and move out of the directory, Autoactivator automatically deactivates the virtual environment for you, ensuring that you don't accidentally use the wrong environment in future projects. This feature makes it easier for developers and programmers to manage multiple virtual environments without having to manually activate or deactivate them every time they switch projects.
Before installing AutoActivator, please ensure that you have the following dependencies installed on your system:
-
Git: AutoActivator relies on Git for cloning the repository and keeping it up to date with the latest changes. If you don't have Git installed, you can download it from the official website: Git Downloads.
-
cURL: cURL is used to download and execute the setup script for AutoActivator. It allows for a quick and convenient installation process. If you don't have
cURL
installed, you can install it by following the instructions for your operating system.-
For Ubuntu/Debian-based systems, run the following command:
sudo apt-get install curl
-
For macOS using Homebrew, run the following command:
brew install curl
-
These dependencies are essential for the proper installation and usage of AutoActivator. Please make sure they are installed before proceeding with the installation instructions mentioned below.
To install AutoActivator, you can use the following curl
command for a quick setup:
curl -sSL https://aymenkrifa.github.io/autoactivator/setup.sh | bash -s <shell1> <shell2> ...
Replace shell1
, shell2
, and so on with the shells you want to install. You can specify either zsh
, bash
, or both, in any order.
Here are a few examples:
-
To install AutoActivator with the
zsh
shell:curl -sSL https://aymenkrifa.github.io/autoactivator/setup.sh | bash -s zsh
-
To install AutoActivator with the
bash
shell:curl -sSL https://aymenkrifa.github.io/autoactivator/setup.sh | bash -s bash
-
To install AutoActivator with both
zsh
andbash
:curl -sSL https://aymenkrifa.github.io/autoactivator/setup.sh | bash -s zsh bash
Toggle to show commands in case the above installation method didn't work.
-
Clone the repository
git clone https://github.com/aymenkrifa/autoactivator.git
-
Navigate into the cloned directory
cd autoactivator
-
Run the installation script
sudo chmod +x ./setup.sh ./setup.sh <shell1> <shell2> ...
To apply the changes, restart your terminal or source your shell configuration file:
source ~/.bashrc # for Bash
source ~/.zshrc # for Zsh
To update AutoActivator to the latest version, you can use the autoactivator update
command. Follow the steps below:
-
Open your terminal.
-
Run the following command:
autoactivator update
To remove AutoActivator from your system, you can delete the cloned repository and remove the configuration from your shell configuration file. Follow the steps below:
# Delete the cloned repository
rm -rf ~/.autoactivator
Next, remove the configuration from your shell configuration file, it would typically be in ~/.bashrc
for Bash and ~/.zshrc
for Zsh. Open the file in a text editor and delete the following lines:
############################# AutoActivator #############################
source /home/user/.autoactivator/autoactivator_config.sh
#########################################################################
Optionally, you can get back your original shell configuration file by restoring it from the created backup file (~/.zshrc.pre-autoactivator
or ~/.bashrc.pre-autoactivator
). To do this, run the following command:
# For Zsh
mv ~/.zshrc.pre-autoactivator ~/.zshrc
# For Bash
mv ~/.bashrc.pre-autoactivator ~/.bashrc
Finally, restart your terminal or source your shell configuration file:
source ~/.bashrc # for Bash
source ~/.zshrc # for Zsh
Contributions are always welcome!
See contributing.md
for ways to get started.
Please adhere to this project's code of conduct
.