Skip to content

zi compile

Compile a plugin’s Zsh scripts to .zwc bytecode to speed up loading. Can target a single plugin or all managed plugins at once.

Terminal window
zi [options] compile {plg-spec}
OptionDescription
-a, --allCompile all managed plugins
-q, --quietSuppress build output
-h, --helpPrint usage

Zinit compiles plugin scripts using zcompile, producing .zwc files alongside the originals. Zsh loads .zwc files faster than raw .zsh files because the parser step is skipped. Compilation is normally done automatically by Zinit at load time, but the compile command lets you trigger it manually or in batch. The nocompile ice modifier disables automatic compilation for a specific plugin.

Terminal window
# Compile a single plugin
zi compile zsh-users/zsh-autosuggestions
# Compile all managed plugins quietly
zi compile --all --quiet
  • cmd-compiled
  • cmd-uncompile
  • cmd-self-update