A blazing fast, flexible archive plugin for Yazi
Effortlessly compress your files and folders with style!
- ποΈ Multi-format support: zip, 7z, rar, tar, tar.gz, tar.xz, tar.bz2, tar.zst, tar.lz4, tar.lha
- π Cross-platform: Works on Unix & Windows
- π Password protection: Secure your archives (zip/7z/rar)
- π‘οΈ Header encryption: Hide file lists (7z/rar)
- β‘ Compression level: Choose your balance of speed vs. size
- π Overwrite safety: Never lose files by accident
- π― Seamless Yazi integration: Fast, native-like UX
| Extension | Default Command | 7z Command | Bsdtar Command (Win10+ & Unix) |
|---|---|---|---|
.zip |
zip -r |
7z a -tzip |
tar -caf |
.7z |
7z a |
7z a |
|
.rar |
rar a |
||
.tar |
tar rpf |
tar rpf |
|
.tar.gz |
tar rpf + gzip |
7z a -tgzip |
tar -czf |
.tar.xz |
tar rpf + xz |
7z a -txz |
tar -cJf |
.tar.bz2 |
tar rpf + bzip2 |
7z a -tbzip2 |
tar -cjf |
.tar.zst |
tar rpf + zstd |
tar --zstd -cf |
|
.tar.lz4 |
tar rpf + lz4 |
||
.tar.lha |
tar rpf + lha |
# Unix
git clone https://github.com/KKV9/compress.yazi.git ~/.config/yazi/plugins/compress.yazi
# Windows (CMD, not PowerShell!)
git clone https://github.com/KKV9/compress.yazi.git %AppData%\yazi\config\plugins\compress.yazi
# Or with yazi plugin manager
ya pkg add KKV9/compressTo enable additional compression formats and features on Windows, follow these steps:
-
Install 7-Zip:
AddC:\Program Files\7-Zipto yourPATH.
This enables support for.7zarchives and password-protected.zipfiles. -
Alternative: Install Nanazip:
A modern alternative to 7-Zip with similar functionality and extra features. -
Install WinRAR:
AddC:\Program Files\WinRARto yourPATH.
This enables support for.rararchives. -
Install Additional Tools:
To use formats likelha,lz4,gzip, etc., install their respective tools and ensure they are added to yourPATH.
Add this to your keymap.toml:
[[mgr.prepend_keymap]]
on = [ "c", "a", "a" ]
run = "plugin compress"
desc = "Archive selected files"
[[mgr.prepend_keymap]]
on = [ "c", "a", "p" ]
run = "plugin compress -p"
desc = "Archive selected files (password)"
[[mgr.prepend_keymap]]
on = [ "c", "a", "h" ]
run = "plugin compress -ph"
desc = "Archive selected files (password+header)"
[[mgr.prepend_keymap]]
on = [ "c", "a", "l" ]
run = "plugin compress -l"
desc = "Archive selected files (compression level)"
[[mgr.prepend_keymap]]
on = [ "c", "a", "u" ]
run = "plugin compress -phl"
desc = "Archive selected files (password+header+level)"- Select files/folders in Yazi.
- Press c a to open the archive dialog.
- Choose:
- a for a standard archive
- p for password protection (zip/7z/rar)
- h to encrypt header (7z/rar)
- l to set compression level (all compression algorithims)
- u for all options together
- Type a name for your archive (or leave blank for suggested name).
- Enter password and/or compression level if prompted.
- Overwrite protect if a file already exists, the new file will be given a suffix _#.
- Enjoy your shiny new archive!
- Combine flags for more power!
- when separating flags with spaces, make sure to single quote them (eg.,
'-ph rar') -pPassword protect (zip/7z/rar)-hEncrypt header (7z/rar)-lSet compression level (all compression algorithims)<extention>Specify a default extention (eg.,7z,tar.gz)
[[mgr.prepend_keymap]]
on = [ "c", "a", "7" ]
run = "plugin compress '-ph 7z'"
desc = "Archive selected files to 7z (password+header)"
[[mgr.prepend_keymap]]
on = [ "c", "a", "r" ]
run = "plugin compress '-p -l rar'"
desc = "Archive selected files to rar (password+level)"- The file extension must match a supported type.
- The required compression tool must be installed and in your
PATH(7zip/rar etc.). - If no extention is provided, the default extention (zip) will be appended automatically.
Made with β€οΈ for Yazi by KKV9. Contributions are welcome! Feel free to submit a pull request.