Skip to content

Instantly share code, notes, and snippets.

@olets
Last active February 20, 2025 15:22
Show Gist options
  • Save olets/06009589d7887617e061481e22cf5a4a to your computer and use it in GitHub Desktop.
Save olets/06009589d7887617e061481e22cf5a4a to your computer and use it in GitHub Desktop.
zsh plugin manager cross-reference

Instructions for installing zsh plugins, for a variety of plugin managers

  • Antibody:

    ⚠️ Deprecated. Official recommendation is to use Antidote instead

    Add <owner>/<repo> to your plugins file. If you use static loading, run the update command.

  • Antidote: Add <owner>/<repo> to your plugins file. If you generate your static plugins file manually, run the bundle command.

  • Antigen:

    ⚠️ Not actively maintained. Antibody was its spiritual successor.

    Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory:

      git clone --recurse-submodules https://github.com/<owner>/<repo>.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/<repo>
    • Add to the OMZ plugins array in your .zshrc:

      plugins=( [plugins...] <repo>)
  • prezto:

    • Clone the plugin repo to either ~/.zprezto/modules or to some other directory of your choosing. If you choose a directory other than ~/.zprezto/modules tell prezto to look for modules in that directory: add zstyle ':prezto:load' pmodule-dirs <dir path> to your .zpreztorc file (replace <dir path> with the path to your directory).

      git clone --recurse-submodules https://github.com/<owner>/<repo>.git ~/.zprezto/modules/<repo>
    • Load the plugin by adding it to the .zpreztorc file's pmodule list. The list will look something like

      zstyle ':prezto:load' pmodule 'repo'
  • sheldon: Modify your ~/.config/sheldon/plugins.toml:

    [plugins.<repo>]
    github = "<owner>/<repo>"
  • zcomet: add zcomet load <owner>/<repo> to your .zshrc

  • zed: add zed load <tld>.com/<owner>/<repo> to your .zshrc between the one zed init and the one zed done.

  • zgem:

    ⚠️ may not be actively maintained

    For plugins distributed as Git repos, add a line like this to your .zshrc

    zgem bundle '<repo url>' from:git use:'<main>.zsh'
  • zgen

    ⚠️ as of this writing, not actively maintained

    add zgen load <owner>/<repo>, zgen load <owner>/<repo> . <branch> if the default branch is not master, to your .zshrc

  • zgenom

    a maintained fork of zgen

    Modify your .zshrc:

    if ! zgenom saved; then
      zgenom load <owner>/<repo>
      zgenom load <owner>/<another repo>
      zgenom save
      zgenom compile .zshrc
    fi

    You may need to run zgenom load <owner>/<repo> once outside of the condition.

  • zi:

    ⚠️ This author recommends steering clear of zi, and z-shell (not to be confused with zsh). zi is a rebranded copy of zinit/zplugin. If you use or are considering using zi, I recommend zinit instead. Read https://www.reddit.com/r/zsh/comments/sqsni7/comment/hwodbgv/ for an explanation.

  • zim add

    zmodule <owner>/<repo>

    to your .zimrc (see homepage for other options). You may need to run

    zimfw install
  • zinit (formerly zplugin):

    ⚠️ zinit is not generally recommended except for existing zinit/zplugin users. Read https://www.reddit.com/r/zsh/comments/qinb6j/httpsgithubcomzdharma_has_suddenly_disappeared_i/ for some history. As of this writing the original owner's repo is deleted and the project can be found at https://github.com/zdharma-continuum/zinit

    simplest option is to add this to your .zshrc:

    zinit light <owner>/<repo>

    zinit has a wide range of options for optimizing performance. If you notice the plugin impacting the performance of new terminals, and if you don't need the plugin to be available the moment you're able to type at a prompt, a good place to start is

    zinit ice wait lucid
    zinit light <owner>/<repo>

    That will silently delay loading the plugin until after the shell has started up.

  • zit: Add zit-install "<repo url>[#<branch if not 'master'>]" ".<repo>" to your .zshrc.

  • znap:

    Run

    znap clone <url>

    and then add to .zshrc

    znap source <owner>/<repo>
  • zplug:

    ⚠️ Not actively maintained.

    Add zplug "<owner>/<repo>" to your .zshrc (see homepage for other options).

  • zpm: For GitHub-hosted plugins, zpm load <owner>/<repo> to your .zshrc (see docs for other options).

  • zr: In your .zshrc's zr call, add <owner>/<repo>

    zr […other plugins] <owner>/<repo>
  • zsh4humans:

    ⚠️ Does not support repos' submodules.

    z4h install <owner>/<repo> || return
    z4h load <owner>/<repo>
  • zsh_unplugged: in your .zshrc, add <owner>/<repo> to your repos array.

Then restart zsh:

exec zsh
@jmfederico
Copy link

Antibody is deprecated. Maybe mark Antidote as the one to use?

@olets
Copy link
Author

olets commented Nov 18, 2024

Thanks for catching that, moved the deprecation notice from Antidote to Antibody

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment