Yazi includes a built-in package manager that makes it easy to install, update, and manage plugins and themes from GitHub repositories.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sxyazi/yazi/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Theya 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:- Clone repository - Git clone from GitHub
- Extract package - Copy relevant files to config directory
- Track version - Record commit hash in
package.toml - Deploy files - Install to
~/.config/yazi/plugins/orflavors/
yazi-cli/src/package/install.rs:7:
Package Configuration
Installed packages are tracked in~/.config/yazi/package.toml:
yazi-cli/src/package/package.rs:11:
Version Pinning
Pin packages to specific versions by prefixing the commit hash with=:
yazi-cli/src/package/upgrade.rs:6:
Package Storage
Packages are stored in two locations:Source Repository Cache
<hash> is the xxHash of the repository URL. This allows multiple packages from the same repository to share the clone.
Installed Packages
Package Structure
Plugin Packages
Plugins must include:main.lua- Plugin entry point (required)*.lua- Additional Lua modulesREADME.md- DocumentationLICENSE- License file
Flavor Packages
Themes must include:flavor.toml- Theme definition (required)tmtheme.xml- TextMate theme for syntax highlightingpreview.png- Theme preview imageREADME.md- DocumentationLICENSE- License fileLICENSE-tmtheme- TextMate theme license
Package Deployment
The deployment process copies files selectively:Commands
ya pkg add
Add and install a package:- Parses package URL
- Clones repository (or pulls if exists)
- Deploys files to config directory
- Adds entry to
package.toml - Records commit hash
ya pkg install
Install all packages frompackage.toml:
- Cloning your config to a new machine
- Pulling config changes from Git
- Manual
package.tomledits
ya pkg upgrade
Upgrade all packages to latest versions:=) are skipped.
ya pkg list
List installed packages:ya pkg delete
Remove a package:- Removes files from
~/.config/yazi/ - Removes entry from
package.toml - 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 integrationfull-border.yazi- Full border UImax-preview.yazi- Maximize preview panechmod.yazi- Change file permissionsjump-to-char.yazi- Jump navigation- And more…
Themes
github.com/yazi-rs/flavors Official themes:catppuccin-mocha.yazicatppuccin-macchiato.yazitokyo-night.yazigruvbox-dark.yazi- And more…
Creating Packages
Plugin Package
-
Create repository on GitHub:
-
Add required files:
-
Users install with:
Monorepo with Multiple Packages
-
Create repository:
-
Structure:
-
Users install with:
Git Integration
The package manager uses Git commands directly:Troubleshooting
Package Not Found
- Repository exists and is public
- Package name matches directory name
- Directory has
.yazisuffix
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
- Version control your config - Track
package.tomlin Git - Pin critical packages - Use
=hashfor stability - Regular updates - Run
ya pkg upgradeperiodically - Test after upgrades - Verify plugins work after updating
For Package Authors
- Semantic versioning - Use Git tags for releases
- Document breaking changes - Note compatibility in README
- Test before release - Verify package installs correctly
- 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
- Plugin Development - Creating plugins
- Theme Development - Creating themes
- Official Plugins
- Official Themes