Code Activator provides fast project navigation in the terminal through both an API and CLI.
See our contributing guide and code of conduct.
- install dependencies junegunn/fzf and stedolan/jq
- clone this repo, and source the
activator.plugin.zsh
in yourzshrc
:
# replace <path-to>/code-activator with the appropriate path
git clone https://github.com/w0ryn/code-activator-zsh.git <path-to>/code-activator
echo 'source <path-to>/code-activator' >> $HOME/.zshrc
By default, Code Activator looks for projects in ~/Projects/GitHub
and ~/Projects/BitBucket
, but you can configure* this in your ~/.config/code-activator-zsh/settings.zsh
.
It is highly recommended that, if nothing else, you configure CA__DIRS
to group your projects as you please.
*the configuration file is created the first time Code Activator is sourced
Code Activator commands can be invoked one of three ways:
- directly (
code-activator
; intended for use as an API) - through an alias (
lkj
by default) - through a shortcut (
CTRL+SPACE
by default; creates a zsh-plugin)
With no argument, Code Activator provides a list of all available projects. Select one to activate it's environment and jump to the project's root.
If your first argument to Code Activator is a project name, the specified project will be activated.
You can also deactivate
an activated project, clone
an existing project, or create a new
project (with the appropriate command).
Although not exactly a virtual environment, Code Activator creates a custom-env
for projects where you can set project-specific environment variables or shell functions.
It also provides a __RESTORE__
syntax to allow safe manipulation of PATH
or other variables when activating a project.
See the custom-env template for more details.