trzsz-go is the go version of trzsz, makes all terminals that support local shell to support trzsz ( trz / tsz ).
trzsz-go is the go version of trzsz, makes all terminals that support local shell to support trzsz ( trz / tsz ).
trzsz-go is a CLI tool that enables native trzsz (trz / tsz) file transfer support in terminals with local shell support. It can also be embedded into Go-based terminal applications to provide native trzsz integration.
⭐ It's recommended to use the go version of trzsz on the server, use trzsz-ssh ( tssh ) on local.
Please check https://trzsz.github.io/py for more information about trzsz ( trz / tsz ).
Install with apt on Ubuntu
sudo apt install trzsz
sudo apt update && sudo apt install software-properties-common
sudo add-apt-repository ppa:trzsz/ppa && sudo apt update
sudo apt install trzszInstall with apt on Debian
sudo apt install trzsz
sudo apt install curl gpg
curl -s 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x7074ce75da7cc691c1ae1a7c7e51d1ad956055ca' \
| gpg --dearmor -o /usr/share/keyrings/trzsz.gpg
echo 'deb [signed-by=/usr/share/keyrings/trzsz.gpg] https://ppa.launchpadcontent.net/trzsz/ppa/ubuntu jammy main' \
| sudo tee /etc/apt/sources.list.d/trzsz.list
sudo apt update
sudo apt install trzszInstall with dnf on Fedora / CentOS / RHEL
sudo dnf install trzsz
sudo dnf copr enable @trzsz/trzsz
sudo dnf install trzszInstall with yum on Legacy CentOS / RHEL
sudo yum install trzsz
Install with gemfury repository.
echo '[trzsz]
name=Trzsz Repo
baseurl=https://yum.fury.io/trzsz/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/trzsz.repo
sudo yum install trzszInstall with wlnmp repository. It's not necessary to configure the epel repository for trzsz.
curl -fsSL "https://sh.wlnmp.com/wlnmp.sh" | bash
sudo yum install trzszInstall with yay on ArchLinux
yay -S trzsz
yay -Syu
yay -S trzszInstall with Homebrew on MacOS
brew install trzsz-go
brew install trzsz-goInstall with Chromebrew on ChromeOS
crew install trzsz
crew install trzszInstall with scoop / winget / choco on Windows
scoop install trzsz / winget install trzsz / choco install trzsz
scoop install trzszwinget install trzszchoco install trzszInstall with pixi / conda / mamba from conda-forge
pixi global install trzsz / conda install trzsz / mamba install trzsz
pixi global install trzszconda install -c conda-forge trzszmamba install -c conda-forge trzszInstall with Go ( Requires go 1.25 or later )
go install github.com/trzsz/trzsz-go/cmd/...@latest
# latest release
go install github.com/trzsz/trzsz-go/cmd/trz@latest
go install github.com/trzsz/trzsz-go/cmd/tsz@latest
go install github.com/trzsz/trzsz-go/cmd/trzsz@latest
# latest development version (main branch)
go install github.com/trzsz/trzsz-go/cmd/trz@main
go install github.com/trzsz/trzsz-go/cmd/tsz@main
go install github.com/trzsz/trzsz-go/cmd/trzsz@mainThe binaries are usually located in ~/go/bin/ ( C:\Users\your_name\go\bin\ on Windows ).
Build from source ( Requires go 1.25 or later )
sudo make install
git clone --depth 1 https://github.com/trzsz/trzsz-go.git
cd trzsz-go
make
sudo make installDownload from the GitHub Releases and install locally
download and install locally
sudo apt install /tmp/trzsz_*.deb
sudo dpkg -i /tmp/trzsz_*.deb
sudo dnf install /tmp/trzsz_*.rpm
sudo yum install /tmp/trzsz_*.rpm
sudo rpm -i /tmp/trzsz_*.rpm
tar zxvf trzsz_*.tar.gz && sudo cp trzsz_*/t* /usr/bin/Add trzsz before the shell to support trzsz ( trz / tsz ), e.g.:
trzsz bash
trzsz PowerShell
trzsz ssh x.x.x.xAdd trzsz --dragfile before the ssh to enable drag files and directories to upload, e.g.:
trzsz -d ssh x.x.x.x
trzsz --dragfile ssh x.x.x.xIf using tmux on the jump server, use trzsz --relay ssh to login to the remote server, e.g.:
trzsz ssh jump_server
tmux
trzsz --relay ssh remote_serverSimilar to lrzsz ( rz / sz ), command trz to upload files, command tsz /path/to/file to download files.
For more information, check the website of trzsz: https://trzsz.github.io/py. 中文文档:https://trzsz.github.io/cn/py
It is recommended to set alias ssh="trzsz ssh" for convenience, alias ssh="trzsz -d ssh" for dragging files to upload.
If using tmux on the local computer, run tmux ( without trzsz ) first, then trzsz ssh to login.
Use -z or --zmodem to enable the rz / sz feature. e.g., trzsz -z ssh remote_server.
lrzsz needs to be installed on the client ( local computer ). e.g., brew install lrzsz, apt install lrzsz, etc.
trzsz --zmodem ssh xxx is not supported on Windows. You can use trzsz-ssh ( tssh ) instead, tssh --zmodem xxx.
About the progress, the transferred and speed are not precise, there will be some deviation. It just indicating that the transfer is in progress.
Use -o or --osc52 to enable the clipboard integration feature. e.g., trzsz -o ssh remote_server.
Clipboard integration allows remote servers to write to the local clipboard via OSC52 sequences.
On Linux, clipboard integration requires xclip or xsel command to be installed.
trzsz looks for configuration at ~/.trzsz.conf ( C:\Users\your_name\.trzsz.conf on Windows ), e.g.:
DefaultUploadPath =
DefaultDownloadPath = /Users/username/Downloads/
AllowedAutoUploadDirs = ~/Downloads/ '/Users/username/My Documents/'
DragFileUploadCommand = trz -y
ProgressColorPair = B14FFF 00FFA3If the DefaultUploadPath is not empty, the path will be opened by default while choosing upload files.
If the DefaultDownloadPath is not empty, downloading files will be saved to the path automatically instead of asking each time.
The AllowedAutoUploadDirs configures the directories allowed for automatic upload (without popping up a file selection dialog). You can configure one or multiple paths separated by spaces. If a path contains spaces, wrap the entire path in single or double quotes. The configured paths must be absolute paths or start with ~/.
⚠️ Security Warning: Please use this feature with caution. If you log into a malicious server, the server could stealthily steal all files under the configured directories without your confirmation.
The default value of DragFileUploadCommand is trz, configure it to trz -y if you want to overwrite the existing files, configure it to rz if you want to use rz to upload.
The ProgressColorPair configures the color of the progress bar. You need to configure 2 colors and do not include #. The progress bar will gradient from the first color to the second color.
If using MSYS2 or Git Bash on windows, and getting an error The handle is invalid.
pacman -S winpty in MSYS2.Git Bash should have winpty installed, no need to install it manually.winpty before trzsz, e.g.: winpty trzsz ssh x.x.x.x.The /usr/bin/ssh in MSYS2 and Cygwin is not supported yet, use the OpenSSH instead.
MSYS2, e.g.: winpty trzsz /c/Windows/System32/OpenSSH/ssh.exe x.x.x.x.Cygwin, e.g.: trzsz "C:\Windows\System32\OpenSSH\ssh.exe" x.x.x.x.tssh is same as trzsz ssh.Dragging files doesn't upload?
--dragfile option. e.g.: trzsz -d ssh x.x.x.x.trz in one of the PATH directory on the server.Administrator on the title.cmd and PowerShell only support draging one file into it.Paste path to file.Want to write your own ssh client that supports trzsz? Please check the go ssh client example.
Feel free to email the author , or create an issue. Welcome to join the QQ group: 318578930.
❤️ Sponsor trzsz ❤️, buy the author a drink ? Thank you for your support!
No open issues yet, or sync has not completed.