Skip to main content
Yazi includes a built-in package manager that makes it easy to install, update, and manage plugins and themes from GitHub repositories.

Overview

The ya pkg command provides:
  • One-command installation - Install plugins and themes instantly
  • Automatic updates - Keep packages up to date with ya pkg upgrade
  • Version pinning - Lock packages to specific commits
  • Dependency tracking - Manage all packages in package.toml
  • Git-based - Packages hosted on GitHub or compatible services

Quick Start

Install a Plugin

Install a Theme

Update All Packages

List Installed Packages

Package URL Format

Packages are specified using GitHub repository URLs:

Examples

Package Installation

The installation process:
  1. Clone repository - Git clone from GitHub
  2. Extract package - Copy relevant files to config directory
  3. Track version - Record commit hash in package.toml
  4. Deploy files - Install to ~/.config/yazi/plugins/ or flavors/
Implementation in yazi-cli/src/package/install.rs:7:

Package Configuration

Installed packages are tracked in ~/.config/yazi/package.toml:
Structure from yazi-cli/src/package/package.rs:11:

Version Pinning

Pin packages to specific versions by prefixing the commit hash with =:
Implementation in yazi-cli/src/package/upgrade.rs:6:

Package Storage

Packages are stored in two locations:

Source Repository Cache

Git repositories are cloned here, where <hash> is the xxHash of the repository URL. This allows multiple packages from the same repository to share the clone.

Installed Packages

Files are deployed here for Yazi to load.

Package Structure

Plugin Packages

Plugins must include:
  • main.lua - Plugin entry point (required)
  • *.lua - Additional Lua modules
  • README.md - Documentation
  • LICENSE - License file
Example structure:

Flavor Packages

Themes must include:
  • flavor.toml - Theme definition (required)
  • tmtheme.xml - TextMate theme for syntax highlighting
  • preview.png - Theme preview image
  • README.md - Documentation
  • LICENSE - License file
  • LICENSE-tmtheme - TextMate theme license
Example structure:

Package Deployment

The deployment process copies files selectively:

Commands

ya pkg add

Add and install a package:
This:
  1. Parses package URL
  2. Clones repository (or pulls if exists)
  3. Deploys files to config directory
  4. Adds entry to package.toml
  5. Records commit hash

ya pkg install

Install all packages from package.toml:
Useful after:
  • Cloning your config to a new machine
  • Pulling config changes from Git
  • Manual package.toml edits

ya pkg upgrade

Upgrade all packages to latest versions:
Pinned packages (rev starting with =) are skipped.

ya pkg list

List installed packages:
Output:

ya pkg delete

Remove a package:
This:
  1. Removes files from ~/.config/yazi/
  2. Removes entry from package.toml
  3. Keeps Git repository cache (for fast reinstall)

Official Repositories

Yazi maintains official package repositories:

Plugins

github.com/yazi-rs/plugins Official plugins:
  • git.yazi - Git integration
  • full-border.yazi - Full border UI
  • max-preview.yazi - Maximize preview pane
  • chmod.yazi - Change file permissions
  • jump-to-char.yazi - Jump navigation
  • And more…

Themes

github.com/yazi-rs/flavors Official themes:
  • catppuccin-mocha.yazi
  • catppuccin-macchiato.yazi
  • tokyo-night.yazi
  • gruvbox-dark.yazi
  • And more…

Creating Packages

Plugin Package

  1. Create repository on GitHub:
  2. Add required files:
  3. Users install with:

Monorepo with Multiple Packages

  1. Create repository:
  2. Structure:
  3. Users install with:

Git Integration

The package manager uses Git commands directly:

Troubleshooting

Package Not Found

Check:
  • Repository exists and is public
  • Package name matches directory name
  • Directory has .yazi suffix

Git Authentication

For private repositories, set up Git credentials:

Conflicts

If manual changes conflict with package updates:

Stale Cache

Clear Git repository cache:

Best Practices

For Users

  1. Version control your config - Track package.toml in Git
  2. Pin critical packages - Use =hash for stability
  3. Regular updates - Run ya pkg upgrade periodically
  4. Test after upgrades - Verify plugins work after updating

For Package Authors

  1. Semantic versioning - Use Git tags for releases
  2. Document breaking changes - Note compatibility in README
  3. Test before release - Verify package installs correctly
  4. Keep dependencies minimal - Avoid external dependencies when possible

Future Enhancements

Planned features:
  • Package search command
  • Dependency resolution
  • Binary plugin support
  • Alternative Git hosting (GitLab, Gitea)
  • Package signing/verification

See Also