Configs2026年7月20日·1 分钟阅读

antigen — Plugin Manager for Zsh Inspired by Vundle

A lightweight Zsh plugin manager that loads bundles from GitHub repositories, Oh My Zsh, and local directories with a simple declarative syntax.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
antigen Zsh Plugin Manager
先审查命令
npx -y tokrepo@latest install 772545fa-8419-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

antigen is a plugin manager for Zsh modeled after Vundle for Vim. It provides a simple way to manage shell plugins, themes, and completions by declaring bundles that are automatically cloned from GitHub or loaded from Oh My Zsh. It handles sourcing, updating, and caching so users can compose their shell environment declaratively.

What antigen Does

  • Loads Zsh plugins from GitHub repositories with a single bundle command
  • Integrates with Oh My Zsh to cherry-pick individual plugins and themes
  • Caches loaded bundles for fast shell startup after first load
  • Provides commands to list, update, and clean installed plugins
  • Supports loading plugins from local directories and custom URLs

Architecture Overview

antigen clones Git repositories into a cache directory (~/.antigen/bundles) on first use. When the shell starts, it reads bundle declarations, checks the cache, and sources the appropriate plugin files. The antigen apply command finalizes the setup and generates a static cache file to speed up subsequent shell starts. Internally it manages a list of active bundles and their source locations.

Self-Hosting & Configuration

  • Download the single antigen.zsh file and source it in your .zshrc
  • Declare plugins with antigen bundle OWNER/REPO or Oh My Zsh plugin names
  • Set themes with antigen theme THEME_NAME
  • Run antigen update to pull the latest changes for all bundles
  • Customize the cache directory with the ANTIGEN_CACHE environment variable

Key Features

  • Single-file installation with no dependencies beyond Zsh and Git
  • Declarative bundle syntax that reads like a package list
  • First-class Oh My Zsh integration for themes and plugins
  • Static caching for fast shell startup times
  • Simple update and cleanup commands for bundle management

Comparison with Similar Tools

  • Oh My Zsh — full framework with bundled plugins; antigen lets you pick only what you need
  • zplug — more features like conditional loading and parallel installs but heavier
  • zinit — fastest startup with turbo mode but steeper learning curve
  • Antibody — static plugin loading written in Go; faster but less flexible at runtime
  • sheldon — Rust-based manager with TOML config; newer but smaller ecosystem

FAQ

Q: Is antigen compatible with Oh My Zsh plugins? A: Yes. Use antigen use oh-my-zsh to enable the Oh My Zsh framework, then load individual plugins.

Q: Does antigen slow down shell startup? A: First load clones repositories, but subsequent starts use cached bundles. Running antigen apply generates a static cache for speed.

Q: Can I use antigen with Prezto? A: Yes. antigen supports Prezto modules with antigen use prezto.

Q: How do I remove an unused plugin? A: Remove the bundle line from .zshrc and run antigen cleanup to delete orphaned repositories.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产