ANTIDOTE(1)

πŸ“¦
version 2.3.0 Β· 4 versions
, in ubuntu stonking

πŸ’– ANTIDOTE(1) β€” the Antidote Manual πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about antidote β€” the cure to slow zsh plugin management, no cap. this is the ANTIDOTE(1) page and yes it's giving main character energy from the very first line. 🌸


✨ NAME ✨

antidote β€” literally the cure to slow zsh plugin management. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

antidote [-v | --version] [-h | --help] [--diagnostics] <command>
[<args> ...]

πŸ’… DESCRIPTION πŸ’…

so antidote is a Zsh plugin manager that was built from the ground up thinking about performance β€” like, from scratch scratch, not a glow-up of somebody else's codebase. πŸ‘‘

it's fast because it can do things concurrently, and it generates an ultra-fast static plugin file that you can just easily load from your Zsh config. iconic behavior honestly.

it's written natively in Zsh, it's well tested, and it picks up exactly where Antigen and Antibody left off. the torch has been passed, and she ate. πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows context-sensitive help for antidote. it knows where you are in the docs, which is lowkey so thoughtful.
  • -v, --version β€” shows the version of antidote you currently have installed. vibe check your install, bestie.
  • --diagnostics β€” shows antidote and system diagnostics. the full health checkup. 🩺

🌈 COMMANDS 🌈

  • help β€” show documentation. yes she has a help command, she's polite.
  • load β€” statically source all bundles from the plugins file. the classic.
  • bundle β€” clone bundle(s) and generate the static load script. two-for-one, we love efficiency.
  • install β€” clone a new bundle and add it to your plugins file. one command, fully adopted. 🫢
  • update β€” update antidote and its cloned bundles.
  • purge β€” remove a cloned bundle. it's not you it's the disk space. 😭
  • home β€” print where antidote is cloning bundles.
  • list β€” list cloned bundles.
  • path β€” print the path of a cloned bundle.
  • snapshot β€” save, restore, or list bundle snapshots.
  • init β€” initialize the shell for dynamic bundles.

🧚 EXAMPLES 🧚

A Simple Config 🌷

make yourself a .zsh_plugins.txt file with a list of the plugins you want:

# ${ZDOTDIR:-$HOME}/.zsh_plugins.txt
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-history-substring-search
zsh-users/zsh-autosuggestions

now, simply load your newly created static plugins file in your .zshrc. that's it. that's the whole thing.

# ${ZDOTDIR:-$HOME}/.zshrc
source /path/to/antidote/antidote.zsh
antidote load

A More Advanced Config 🌺

your .zsh_plugins.txt file supports annotations. annotations tell antidote how to do things like load plugins from alternate paths. this lets you use plugins from popular frameworks like Oh-My-Zsh:

# ${ZDOTDIR:-$HOME}/.zsh_plugins.txt
ohmyzsh/ohmyzsh path:lib
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/magic-enter
etc...

Dynamic Bundling πŸ’«

if you're familiar with legacy plugin managers like Antigen, you might prefer to use dynamic bundling. with dynamic bundling you avoid having separate plugin files. to use dynamic bundling, we need to change how antidote bundle handles your plugins. we do this by sourcing the output from antidote init.

each antidote bundle line caches its generated load script in a file under antidote home, so after the first run new shells load the cache instead of regenerating. set zstyle ':antidote:dynamic' zcompile 'yes' to zcompile those cache files. the cache refreshes automatically when antidote or your config changes, when ':antidote:*' zstyles change, or after antidote purge or antidote update.

an example config might look like this:

source /path/to/antidote/antidote.zsh
source <(antidote init)
antidote bundle zsh-users/zsh-autosuggestions
antidote bundle ohmyzsh/ohmyzsh path:lib
antidote bundle ohmyzsh/ohmyzsh path:plugins/git

instead of calling antidote bundle over and over, you might prefer to load bundles with a HEREDOC. so clean, so tidy:

source /path/to/antidote/antidote.zsh
source <(antidote init)
antidote bundle <<EOBUNDLES
    zsh-users/zsh-syntax-highlighting         # regular plugins
    ohmyzsh/ohmyzsh path:lib                  # directories
    ohmyzsh/ohmyzsh path:plugins/magic-enter  # frameworks
    https://github.com/zsh-users/zsh-history-substring-search  # URLs
EOBUNDLES

Installation πŸ“

to install antidote you can clone it with git:

git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-$HOME}/.antidote

then, simply add the following snippet to your .zshrc:

source ${ZDOTDIR:-$HOME}/.antidote/antidote.zsh
antidote load

and boom. you're done. go touch grass. 🌱


πŸ’œ CUSTOMIZATION πŸ’œ

the location where antidote clones repositories can be customized by setting $ANTIDOTE_HOME:

ANTIDOTE_HOME=/path/to/my/repos

the bundle directory naming style in ANTIDOTE_HOME can be controlled with the following zstyle:

zstyle ':antidote:bundle' path-style full     # github.com/owner/repo (default)
zstyle ':antidote:bundle' path-style short    # owner/repo
zstyle ':antidote:bundle' path-style escaped  # https-COLON--SLASH--SLASH-github.com-SLASH-owner-SLASH-repo

bundles are cloned shallow so the first run is fast, then deepened by a background fetch that nothing waits on. to hold a bundle at its shallow clone and skip that fetch:

zstyle ':antidote:bundle:*' shallow yes                       # every bundle
zstyle ':antidote:bundle:foo/bar' shallow yes                 # just one

the default is no. setting min-age on a bundle overrides it, since searching history for a commit old enough needs the full clone. see antidote-bundle(1).

the default bundle file is ${ZDOTDIR:-$HOME}/.zsh_plugins.txt. this can be overridden with the following zstyle:

zstyle ':antidote:bundle' file /path/to/my/bundle_file.txt

the default static file is ${ZDOTDIR:-$HOME}/.zsh_plugins.zsh. this can be overridden with the following zstyle:

zstyle ':antidote:static' file /path/to/my/static_file.zsh

the default options used by romkatv/zsh-defer can be changed with the following zstyle:

zstyle ':antidote:bundle:*' defer-options '-a'
zstyle ':antidote:bundle:foo/bar' defer-options '-p'

bundles can be held back from freshly pushed commits with the following zstyle, which takes a number of days:

zstyle ':antidote:bundle:*' min-age 7
zstyle ':antidote:bundle:zsh-users/zsh-autosuggestions' min-age 30

it defaults to unset, and holding bundles back costs a full-history clone. a plugin with no commit that old is still installed at its latest commit, so min-age never blocks a new plugin. since commit dates are set by whoever writes the commit, min-age is a cushion rather than a guarantee. see antidote-bundle for the details, and use pin: when you need a commit fixed for certain.

bundles can be Zsh compiled with the following zstyle:

zstyle ':antidote:bundle:*' zcompile 'yes'

or, if you only want to zcompile specific bundles, you can set those individually:

zstyle ':antidote:bundle:*' zcompile 'yes'
zstyle ':antidote:bundle:zsh-users/zsh-syntax-highlighting' zcompile 'no'

the static file can be Zsh compiled with the following zstyle:

zstyle ':antidote:static' zcompile 'yes'

or, to Zsh compile everything, static file and all bundles:

zstyle ':antidote:*' zcompile 'yes'

by default, antidote appends to the end of your $fpath. this is highly recommended, however if you really want to change that behavior, there's a zstyle for that:

zstyle ':antidote:fpath' rule 'prepend'

by default, antidote uses romkatv/zsh-defer for deferred plugins. if there's a fork you'd prefer to use, you can specify that with this zstyle:

zstyle ':antidote:defer' bundle 'getantidote/zsh-defer'

🌟 CONTROLLING OUTPUT 🌟

output in antidote can be customized as well.

colorization of certain output is supported in antidote. a terminal is taken as color capable when terminfo says it has at least 8 colors, when COLORTERM says truecolor or 24bit, or when TERM names a color or rxvt terminal. output also has to be going to a terminal rather than a pipe or a file.

to override that detection, use the usual variables, most explicit first:

NO_COLOR πŸ™ˆ

set 'NO_COLOR=1' to disable color in output.

FORCE_COLOR πŸ”₯

set 'FORCE_COLOR=1' to force color, or '0' to disable it.

CLICOLOR_FORCE ⭐

set 'CLICOLOR_FORCE=1' to force color even when output is not a terminal.

CLICOLOR πŸ’€

set 'CLICOLOR=0' to opt out of color. a force variable still wins over it.

additionally, JSON Lines (JSONL) output is supported for certain commands such as 'antidote list'. if you need JSONL support, look for this flag: -j, --jsonl:: Output in JSONL.


πŸ‘‘ SEE ALSO πŸ‘‘

for more information, visit https://antidote.sh β€” go, read, obsess. πŸ¦‹


πŸ› BUGS πŸ›

see GitHub Issues: https://github.com/mattmc3/antidote/issues


πŸ’– AUTHORS πŸ’–


πŸ“œ LICENSE πŸ“œ

MIT


and that's the whole page, bestie!! πŸ’…πŸ«Ά this was antidote, page ANTIDOTE(1), from the Antidote Manual, dated 1970-01-01 β€” yeah the date is a whole vibe of its own, don't ask, it's iconic. slay, stay fast, and go antidote load something. βœ¨πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from