跳到主要内容

⚡️ 安装

Quick setup

~/.zshrc
source <(curl -sL https://git.io/zi-loader); zzinit

Reload shell with exec zsh and run zi -h for usage information.

Automated setup

提示

If required append -b <tag> or -b <branch> e.g:

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -i skip -b main

Minimal configuration

sh -c "$(curl -fsSL https://git.io/get-zi)" --

Only update / install repository

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -i skip

Minimal configuration + annexes

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -a annex

Minimal configuration + annexes + zdharma/zunit

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -a zunit

Minimal configuration with loader

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -a loader

The installer will download loader and add snippet below to the .zshrc file.

if [[ -r "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" ]]; then  source "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" && zzinitfi
提示

The loader can be manually fetched from available links to any location on the system, and sourced from .zshrc or as shown in the quick-setup.

Then reload shell with: exec zsh. All done!

Manual Setup

Setup directory

typeset -Ag ZIexport ZI[BIN_DIR]="${HOME}/.zi/bin"command mkdir -p "$ZI[BIN_DIR]"

Clone repository

command chmod g-rwX "$ZI[BIN_DIR]"command git clone https://github.com/z-shell/zi.git "$ZI[BIN_DIR]"

Enable ZI

Source zi.zsh in your .zshrc from previously created directory:

typeset -A ZIZI[BIN_DIR]="${HOME}/.zi/bin"source "${ZI[BIN_DIR]}/zi.zsh"

Enable completions:

信息

The next two lines must be below the above two:

autoload -Uz _zi(( ${+_comps} )) && _comps[zi]=_zi

Post-install

After a fresh install, recommended to reload the shell with exec zsh and compile ZI with zi self-update. Run zi -h to see all available commands. Increase ZI functionality, performance or get started by exploring the wiki.

If you have any issue or need help 🤦‍♂️, lets discuss it or open an issue in any language.

It helps us to improve and make ZI better. Don't forget to help the project: share, contribute, or translate 🌐 🥰 🤓.

Let's glue everything together to create a toolchain that works for US 🚀.

Have ideas?

Suggest your configuration: z-shell/playground

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -a ???

Need warm-up?

Docker Alpine

docker run --rm -it ghcr.io/z-shell/zd:latest

Turbo ZI in Docker

If you create a Docker image that uses ZI, install Turbo-loaded plugins before the shell starts interactively, with the @zi-scheduler function in such a way, that it:

  • installs plugins without waiting for the prompt (i.e. it's script friendly),
  • installs all plugins instantly, without respecting the wait'' argument.

To accomplish this, use burst argument and call @zi-scheduler function:

RUN zsh -i -c -- '@zi-scheduler burst || true'

Build ZI Module

Without ZI

sh -c "$(curl -fsSL https://git.io/get-zi)" -- -a zpmod

With ZI

信息

ZI has to be installed to build the module. Module repository: z-shell/zpmod

zi module build

To enable debug messages from the module set:

typeset -g ZI_MOD_DEBUG=1

Status page: ✔️

Installer

域名URL
Redirect:https://get.zshell.dev
IPFShttps://ipfs.zshell.dev/sh/install.sh
Direct:https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh

Loader

域名URL
Redirect:https://init.zshell.dev
IPFShttps://ipfs.zshell.dev/zsh/init.zsh
Direct:https://raw.githubusercontent.com/z-shell/zi-src/main/lib/zsh/init.zsh