zpm
is a plugin manager for zsh
designed to be fast and easy to
configure.
This tool was designed after seeing other plugin managers as slow or/and inconvenient. Primary design goals when developing this tool were:
- Make it fast;
- Allow to configure it with some conventional format;
- Keep
.zshrc
clean; - Be able to work with Oh My Zsh plugins;
- Work with updates;
- Make it easily extensible.
This project is largely influenced by Antigen and Antibody.
On macOS you can use Homebrew: brew install eugene-babichenko/tap/zpm
Go to the Releases section and download a binary or a
package (.deb
or .rpm
).
Packages can be installed with:
dpkg -i package-file.deb
rpm -i package-gile.rpm
You will need go
1.12 or higher to build this project, so please install it
and configure Go environment variables. You can follow
the official guide.
- Download this repository:
git clone https://github.com/eugene-babichenko/zpm.git
- Go to the repository directory:
cd zpm
- Checkout the latest stable version:
git checkout v0.3.0
- Run
make install
. This is required to set the correct version inside the app.
Just add this line after you add the directory containing your zpm
installation ($GOPATH/bin
) into the PATH
variable and after you load any
completions into the shell.
# Load plugins into the shell
source <(zpm load)
The configuration is located in ~/.zpm.yaml
and will be created automatically
on the first run. You can change the location of your configuration file using
the --config
argument.
The default configuration file will be generated on the first run of any zpm
command.
Here is an example configuration:
plugins:
- github.com/zsh-users/zsh-autosuggestions
- github.com/mafredri/zsh-async
- github.com/sindresorhus/pure
- oh-my-zsh/plugin/colored-man-pages
You can specify a plugin version if required. Branch names, tags and commit
hashes are acceptable. This is available for plugins installed from GitHub and
for "oh-my-zsh"
plugin line (not for "oh-my-zsh/plugin/*"
and
"oh-my-zsh/theme/*"
!):
plugins:
- github.com/marzocchi/zsh-notify@v1.0
- oh-my-zsh@ea3e666e04bfae31b37ef42dfe54801484341e46
Possible patterns for adding the plugins are:
github.com/username/repo
for adding plugins from GitHub repositories;dir://path/to/plugin
for adding local plugins. Note that the path must be relative to thezsh
plugins directory (see Configuration).oh-my-zsh
to load Oh My Zsh from GitHub (it is treated specially);oh-my-zsh/plugin/*
to load one of the plugins bundled with Oh My Zsh;oh-my-zsh/themes/*
to load one of the themes bundled with Oh My Zsh;
After a plugin has been added to the configuration file, you should run
zpm update
to download it. This command will also update other plugins. You
can run zpm check
to check for updates without installing them.
This section contains the list of available configuration keys.
plugins
([string]
) - the list of plugin specifications. The format for specifications is described in Configuring plugins.logging_level
(string
) - logging level. Valid values aredebug
,info
,error
andfatal
. The default value isinfo
.on_load.check_for_updates
(bool
) - whether to check for updates a new shell loads. This is done in the background and does not hit the performance. The default value istrue
.on_load.update_check_period
(string
) defines the minimal period between the updates checks that are run when a new shell loads (valid whenon_load.check_for_updates
is set totrue
).Valid examples are3h
,30m
,5h30m20s
. The default value24h
.on_load.install_missing_plugins
(bool
) - whether to install plugins, that are specified in the config byt are not installed, when a new shell loads. The default value istrue
.
Run zpm help
to get the full list of available commands and their flags.
I appreciate any help! You can submit your questions, proposals and bugs found to the GitHub Issues.