Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
Zinit
https://github.com/zdharma-continuum/zinit
Admin
🌻 Flexible and fast ZSH plugin manager
Tokens:
66,342
Snippets:
620
Trust Score:
8
License:
MIT
Update:
2 days ago
Context
Chat
Benchmark
75.96
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Install exa Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the exa ls replacement. ```zsh zi for \ atclone'cp -vf completions/exa.zsh _exa' \ from'gh-r' \ sbin'**/exa -> exa' \ ogham/exa ``` -------------------------------- ### Install jq with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for installing jq as a binary or compiling from source. ```zsh zi for \ from'gh-r' \ sbin'* -> jq' \ nocompile \ @jqlang/jq ``` ```zsh zinit for \ configure'--with-oniguruma=builtin' \ make \ jqlang/jq ``` -------------------------------- ### Install fd Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the fd find alternative. ```zsh zi for \ from'gh-r' \ lbin'!' \ id-as \ null \ @sharkdp/fd ``` -------------------------------- ### Install Docker buildx Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the Docker buildx CLI plugin with completions. ```zsh zi for \ as'completions' \ atclone'buildx* completion zsh > _buildx' \ from"gh-r" \ sbin'!buildx-* -> buildx' \ @docker/buildx \ ``` -------------------------------- ### Zinit Plugin and Binary Configuration Examples Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/zinit.1 Examples for loading themes, using the for-syntax, managing binary releases from GitHub, and compiling source code. ```zsh # Load the pure theme, with zsh-async library that's bundled with it. zinit ice pick"async.zsh" src"pure.zsh" zinit light sindresorhus/pure # A glance at the new for-syntax – load all of the above # plugins with a single command. For more information see: # https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/ zinit for \ light-mode zsh-users/zsh-autosuggestions \ light-mode zdharma-continuum/fast-syntax-highlighting \ zdharma-continuum/history-search-multi-word \ light-mode pick"async.zsh" src"pure.zsh" \ sindresorhus/pure # Binary release in archive, from GitHub-releases page. # After automatic unpacking it provides program "fzf". zinit ice from"gh-r" as"program" zinit light junegunn/fzf # One other binary release, it needs renaming from `docker-compose-Linux-x86_64`. # This is done by ice-mod `mv'{from} -> {to}'. There are multiple packages per # single version, for OS X, Linux and Windows – so ice-mod `bpick' is used to # select Linux package – in this case this is actually not needed, Zinit will # grep operating system name and architecture automatically when there's no `bpick'. zinit ice from"gh-r" as"program" mv"docker* -> docker-compose" bpick"*linux*" zinit load docker/compose # Vim repository on GitHub – a typical source code that needs compilation – Zinit # can manage it for you if you like, run `./configure` and other `make`, etc. stuff. # Ice-mod `pick` selects a binary program to add to $PATH. You could also install the # package under the path $ZPFX, see: https://zdharma-continuum.github.io/zinit/wiki/Compiling-programs zinit ice as"program" atclone"rm -f src/auto/config.cache; ./configure" \ atpull"%atclone" make pick"src/vim" zinit light vim/vim # Scripts that are built at install (there's single default make target, "install", # and it constructs scripts by `cat'ing a few files). The make'' ice could also be: # `make"install PREFIX=$ZPFX"`, if "install" wouldn't be the only, default target. zinit ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" zinit light tj/git-extras # Handle completions without loading any plugin, see "clist" command. # This one is to be ran just once, in interactive session. zinit creinstall %HOME/my_completions ``` -------------------------------- ### Install cmatrix Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs cmatrix by compiling from source. ```zsh zi for \ as'program' \ atclone"./configure --prefix=$ZPFX > /dev/null" \ atpull'%atclone' \ make"-j PREFIX=${ZPFX} install > /dev/null" \ pick"cmatrix" \ abishekvashok/cmatrix ``` -------------------------------- ### Install direnv Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs direnv and hooks it into Zsh. ```zsh zi for \ as"program" \ atclone'./direnv hook zsh > zhook.zsh' \ from"gh-r" \ light-mode \ mv"direnv* -> direnv" \ src'zhook.zsh' \ direnv/direnv ``` -------------------------------- ### Install checkmake Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the checkmake Makefile linter. ```zsh zi for \ from'gh-r' \ lbin'!checkmake* -> checkmake' \ id-as \ null \ @mrtazz/checkmake ``` -------------------------------- ### Install delta Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the delta syntax-highlighting pager. ```zsh zi for \ from'gh-r' \ sbin'**/delta -> delta' \ dandavison/delta ``` -------------------------------- ### Install Docker credential helpers Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs Docker credential helpers for platform keystores. ```zsh zi for \ from"gh-r" \ sbin'!* -> docker-credential-desktop' \ @docker/docker-credential-helpers ``` -------------------------------- ### Install golangci-lint with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the golangci-lint Go linter. ```zsh zinit for \ atclone'golangci-lint completion zsh > _golangci-lint' \ from'gh-r' \ sbin'golangci-lint' \ @golangci/golangci-lint ``` -------------------------------- ### Install bat Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the bat cat clone. ```zsh zi for \ from'gh-r' \ lbin'!' \ id-as \ null \ @sharkdp/bat ``` -------------------------------- ### Install hyperfine with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the hyperfine benchmarking tool. ```zsh zi for \ from'gh-r' \ sbin'**/h*e -> hyperfine' \ @sharkdp/hyperfine ``` -------------------------------- ### Install kubectx with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the kubectx and kubens tools. ```zsh zi for \ bpick'kubectx;kubens' \ from'gh-r' \ sbin'kubectx;kubens' \ ahmetb/kubectx ``` -------------------------------- ### compinit Source: https://github.com/zdharma-continuum/zinit/blob/main/README.md Refreshes installed completions. ```APIDOC ## compinit ### Description Refreshes installed completions. ### Command `zinit compinit` ### Parameters None. ``` -------------------------------- ### Install procs with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the procs process viewer. ```zsh zi for \ from'gh-r' \ sbin'**/procs -> procs' \ dalance/procs ``` -------------------------------- ### Example configuration for plugins and snippets Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/zinit.1 A sample configuration showing how to load plugins with and without tracking, and how to load a snippet from a URL. ```zsh # Plugin history-search-multi-word loaded with tracking. zinit load zdharma-continuum/history-search-multi-word # Two regular plugins loaded without tracking. zinit light zsh-users/zsh-autosuggestions zinit light zdharma-continuum/fast-syntax-highlighting # Snippet zinit snippet https://gist.githubusercontent.com/hightemp/5071909/raw/ ``` -------------------------------- ### Load Plugins and Themes with Zinit Source: https://github.com/zdharma-continuum/zinit/blob/main/README.md Examples of loading themes like pure, using the for-syntax to load multiple plugins, and managing binary releases from GitHub. ```zsh # Load the pure theme, with zsh-async library that's bundled with it. zi ice pick"async.zsh" src"pure.zsh" zi light sindresorhus/pure # A glance at the new for-syntax – load all of the above # plugins with a single command. For more information see: # https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/ zinit for \ light-mode \ zsh-users/zsh-autosuggestions \ light-mode \ zdharma-continuum/fast-syntax-highlighting \ zdharma-continuum/history-search-multi-word \ light-mode \ pick"async.zsh" \ src"pure.zsh" \ sindresorhus/pure # Binary release in archive, from GitHub-releases page. # After automatic unpacking it provides program "fzf". zi ice from"gh-r" as"program" zi light junegunn/fzf # One other binary release, it needs renaming from `docker-compose-Linux-x86_64`. # This is done by ice-mod `mv'{from} -> {to}'. There are multiple packages per # single version, for OS X, Linux and Windows – so ice-mod `bpick' is used to # select Linux package – in this case this is actually not needed, Zinit will # grep operating system name and architecture automatically when there's no `bpick'. zi ice from"gh-r" as"program" mv"docker* -> docker-compose" bpick"*linux*" zi load docker/compose # Vim repository on GitHub – a typical source code that needs compilation – Zinit # can manage it for you if you like, run `./configure` and other `make`, etc. # Ice-mod `pick` selects a binary program to add to $PATH. You could also install the # package under the path $ZPFX, see: https://zdharma-continuum.github.io/zinit/wiki/Compiling-programs zi ice \ as"program" \ atclone"rm -f src/auto/config.cache; ./configure" \ atpull"%atclone" \ make \ pick"src/vim" zi light vim/vim # Scripts built at install (there's single default make target, "install", # and it constructs scripts by `cat'ing a few files). The make'' ice could also be: # `make"install PREFIX=$ZPFX"`, if "install" wouldn't be the only default target. zi ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" zi light tj/git-extras # Handle completions without loading any plugin; see "completions" command. # This one is to be ran just once, in interactive session. zi creinstall %HOME/my_completions ``` -------------------------------- ### Install neofetch with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the neofetch system information tool. ```zsh zinit make for @dylanaraps/neofetch ``` -------------------------------- ### Import Prezto modules Source: https://github.com/zdharma-continuum/zinit/blob/main/README.md Example of importing environment and terminal Prezto modules using different Zinit syntax styles. ```zsh ## Prezto Setting zstyle ':prezto:load' pmodule 'environment' 'terminal' ## Zinit Setting # Raw Syntax zi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/environment/init.zsh zi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/terminal/init.zsh # PZT Shorthand Syntax zi snippet PZT::modules/environment zi snippet PZT::modules/terminal # PZTM Shorthand Syntax zi snippet PZTM::environment zi snippet PZTM::terminal ``` -------------------------------- ### Install fnm Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the fnm Node.js version manager. ```zsh zinit for \ as'completion' \ atclone"./fnm completions --shell zsh > _fnm.zsh" \ atload'eval $(fnm env --shell zsh)' \ atpull'%atclone' \ blockf \ from'gh-r' \ nocompile \ sbin'fnm' \ @Schniz/fnm ``` -------------------------------- ### Install dust Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs the dust disk usage tool. ```zsh zi for \ from'gh-r' \ lbin'!' \ id-as \ null \ @bootandy/dust ``` -------------------------------- ### Import Oh-My-Zsh Library Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/zinit.1 Examples of importing standard Oh-My-Zsh library files using raw URLs or shorthand syntax. ```zsh # Raw Syntax zinit snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh zinit snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh # OMZ Shorthand Syntax zinit snippet OMZ::lib/clipboard.zsh zinit snippet OMZ::lib/termsupport.zsh # OMZL Shorthand Syntax zinit snippet OMZL::clipboard.zsh zinit snippet OMZL::termsupport.zsh ``` -------------------------------- ### Install Argo CD Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs Argo CD with Zsh completions. ```zsh zi for \ as'completions' \ atclone' ./argocd* completion zsh > _argocd' \ atpull'%atclone' \ from'gh-r' \ if'[[ "$(uname -m)" == x86_64 ]]' \ sbin'argocd* -> argocd' \ argoproj/argo-cd ``` -------------------------------- ### Install git-mkver with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the git-mkver semantic versioning tool. ```zsh zi for \ from'gh-r' \ sbin'**/git-mkver' \ idc101/git-mkver ``` -------------------------------- ### Setup Zinit Annex Bin Gem Node Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Add this as the first plugin in your Zinit configuration. ```zsh zinit light-mode for zdharma-continuum/zinit-annex-bin-gem-node ``` -------------------------------- ### Automatic Installation Script Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/zinit.1 The recommended method to install Zinit by executing a shell command. ```sh sh -c "$(curl -fsSL https://git.io/zinit-install)" ``` -------------------------------- ### Automatic Zinit Installation Source: https://github.com/zdharma-continuum/zinit/blob/main/README.md Executes the installation script to set up Zinit in ~/.local/share/zinit/zinit.git and updates .zshrc. ```bash bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)" ``` -------------------------------- ### Install fogg with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for managing the fogg infrastructure-as-code tool. ```zsh zi for \ from'gh-r' \ lbin'!' \ id-as \ null \ @chanzuckerberg/fogg ``` -------------------------------- ### Install Zunit and Revolver Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/HACKING.md Use Zinit to install the Zunit testing framework and the Revolver progress indicator. ```zsh zinit for \ as"program" \ atclone"ln -sfv revolver.zsh-completion _revolver" \ atpull"%atclone" \ pick"revolver" \ @molovo/revolver \ as"completion" \ atclone"./build.zsh; ln -sfv zunit.zsh-completion _zunit" \ atpull"%atclone" \ sbin"zunit" \ @zunit-zsh/zunit ``` -------------------------------- ### Build documentation in container Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/HACKING.md Run the documentation build process inside a Docker or Podman container from the repository root. ```makefile make doc-container ``` -------------------------------- ### Install stow with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs stow using Zinit's 'build' modifier with the 'for' syntax. ```zsh zinit build for @aspiers/stow ``` -------------------------------- ### Manual Installation Commands Source: https://github.com/zdharma-continuum/zinit/blob/main/doc/zinit.1 Commands to clone the Zinit repository into the local data directory. ```sh ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" mkdir -p "$(dirname $ZINIT_HOME)" git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" ``` -------------------------------- ### Install gh with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the GitHub CLI tool. ```zsh zi for \ from'gh-r' \ sbin'**/gh' \ cli/cli ``` -------------------------------- ### Install tmux with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs tmux, a terminal multiplexer, using Zinit's 'for' syntax with 'configure' and 'make' options. ```zsh zinit for \ configure'--disable-utf8proc' \ make \ @tmux/tmux ``` -------------------------------- ### Install tokei with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs tokei, a program that displays statistics about your code, using Zinit's 'for' syntax with 'from' and 'sbin' options. ```zsh zi for \ from'gh-r' \ sbin'**/tokei -> tokei' \ XAMPPRocky/tokei ``` -------------------------------- ### Install neovim with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Configuration for the Neovim text editor, using the nightly build. ```zsh zi for \ from'gh-r' \ sbin'**/nvim -> nvim' \ ver'nightly' \ neovim/neovim ``` -------------------------------- ### Install shfmt with Zinit Source: https://github.com/zdharma-continuum/zinit/wiki/Recipes-for-popular-programs Installs shfmt, a shell parser, formatter, and interpreter, using Zinit's 'for' syntax with 'from' and 'sbin' options. ```zsh zi for \ from'gh-r' \ sbin'**/sh* -> shfmt' \ @mvdan/sh ```