A simple file transfer tools, similar to rz / sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar

Overview

trzsz

MIT License PyPI trzsz

A simple file transfer tools, similar to rz/sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar.

Why?

I love to use iTerm2 integrating with tmux to manage terminal sessions.

Sometimes, I need to transfer some files between my laptop and the remote server.

Considering laptop --> hostA --> hostB --> docker --> tmux , using scp to transfer files is inconvenience.

Tmux is not going to support rz/sz ( 906, 1439 ), and I found out that creating a new file transfer tools is much easier than patching tmux.

Additionally, iTerm2-zmodem is not supporting a progress bar. Is there something wrong happened or just need more time?

Requirements

Installation

Server side

  • Install trzsz-svr
    • python3 -m pip install --upgrade trzsz-svr

Client side

  • Install trzsz-iterm2

    • python3 -m pip install --upgrade trzsz-iterm2
  • Install iTerm2 and create a Trigger as follows.

    Name Value
    Regular Expression :(:TRZSZ:TRANSFER:[SR]:\d+\.\d+\.\d+)
    Actions Run Silent Coprocess
    Parameters /usr/local/bin/trzsz-iterm2 \1
    Enabled

  • Optional install zenity for a nice progress bar.

    • should be placed at /usr/local/bin/zenity

Manual

  • trz upload files to remote server

    usage: trz [-h] [-v] [path]
    
    Receive file(s), similar to rz but compatible with tmux (control mode).
    
    positional arguments:
      path           Path to save file(s). (default: current directory)
    
    optional arguments:
      -h, --help     show this help message and exit
      -v, --version  show program's version number and exit
    
  • tsz download files from remote server

    usage: tsz [-h] [-v] file [file ...]
    
    Send file(s), similar to sz but compatible with tmux (control mode).
    
    positional arguments:
      file           File(s) to be sent.
    
    optional arguments:
      -h, --help     show this help message and exit
      -v, --version  show program's version number and exit
    

Screenshot

  • Upload files to remote server.

    Upload files looks good

  • Download files from remote server.

    Download files looks good

Contact

Feel free to email me [email protected] (same as my PayPal account, just in case you want to deduct 🤑 ).

Comments
  • About  common soft-chain for Mac Client

    About common soft-chain for Mac Client

    Mac Client needs to make a soft chain to work, otherwise it will be prompted: /usr/local/bin/trzsz-Iterm2 not found.


    Mac Client side

    sudo python3 -m pip install --upgrade trzsz-libs trzsz-iterm2
    ln -sv /Library/Frameworks/Python.framework/Versions/3.9/bin/trzsz-iterm2 /usr/local/bin/
    ls -lh /usr/local/bin/trzsz-iterm2
    brew install ncruces/tap/zenity
    

    Good Job, thanks!

    documentation 
    opened by garywu520 4
  • 拖拽报错

    拖拽报错

    usage: trzsz-iterm2 [-h] [-v] [-p {text,zenity}] [-d DESTPATH] mode

    trzsz-iterm2: error: unrecognized arguments: /Users/keeyu/Downloads/quic协议研究/quic协议研究.md

    opened by keeYuc 3
  • Python3 tsz Error

    Python3 tsz Error

    Python3 tsz comman Error

    Traceback (most recent call last):
    
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trzsz/iterm2/main.py", line 245, in main
    
        download_files(args, loop, session)
    
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trzsz/iterm2/main.py", line 80, in download_files
    
        send_action(True, __version__)
    
    TypeError: send_action() missing 1 required positional argument: 'remote_is_windows'
    
    
    
    During handling of the above exception, another exception occurred:
    
    
    
    Traceback (most recent call last):
    
      File "/Library/Frameworks/Python.framework/Versions/3.9/bin/trzsz-iterm2", line 8, in <module>
    
        sys.exit(main())
    
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trzsz/iterm2/main.py", line 252, in main
    
        fail_exit(e, False)
    
    NameError: name 'fail_exit' is not defined
    
    opened by garywu520 2
  • 无法正确显示zenity进度条

    无法正确显示zenity进度条

    m2 macbook air,调用 zenity --info --text=\"test\" 可以正确弹出对话框,但trzsz不行。

    版本:

    • zenity v0.9.0 darwin/arm64
    • tsz (trzsz) py 1.1.0
    • iterm2 Build 3.4.16
    opened by paulzhn 2
  • 使用 brew 安装失败

    使用 brew 安装失败

    %> brew install trzsz
    Running `brew update --preinstall`...
    Warning: No available formula with the name "trzsz". Did you mean lrzsz?
    ==> Searching for similarly named formulae...
    This similarly named formula was found:
    lrzsz
    To install it, run:
      brew install lrzsz
    ==> Searching for a previously deleted formula (in the last month)...
    Error: No previously deleted formula found.
    ==> Searching taps on GitHub...
    Error: No formulae found in taps.
    
    opened by hotmanga 2
  • Documentation bug: new homebrew path location

    Documentation bug: new homebrew path location

    On Monterey on Apple Silicon, the files installed by Homebrew are in /opt/homebrew instead of /usr/local. This means the trzsz-iterm2 binary is in /opt/homebrew/bin/trzsz-iterm2. Please update documentation and screenshots accordingly.

    opened by tidux 2
  • mac m1安装失败

    mac m1安装失败

    brew install ncruces/tap/zenity Updating Homebrew... Warning: You are using macOS 12. We do not provide support for this pre-release version. You will encounter build failures with some formulae. Please create pull requests instead of asking for help on Homebrew's GitHub, Twitter or any other official channels. You are responsible for resolving any issues you experience while you are running this pre-release version.

    ==> Installing zenity from ncruces/tap ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/go-1.16.5.arm64_big_sur.bottle.tar.gz curl: (22) The requested URL returned error: 404

    Warning: Bottle missing, falling back to the default domain... ==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.16.5 Already downloaded: /Users/kevin/Library/Caches/Homebrew/downloads/6cb2b73427bbc8aaa8c6e36b3ed5c1e05c36e2f7ff7dd024fe6823e4d21bb124--go-1.16.5.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:dde21eedfa67da23db70cf977ae82c0cadd5acf2a326cb91853ff54d0cf5886f Already downloaded: /Users/kevin/Library/Caches/Homebrew/downloads/43084dae667d24344f85e66b006a6bdcd465a27844a1bb454ef15aaebb8d054f--go--1.16.5.arm64_big_sur.bottle.tar.gz ==> Downloading https://github.com/ncruces/zenity/archive/refs/tags/v0.7.12.tar.gz Already downloaded: /Users/kevin/Library/Caches/Homebrew/downloads/d7901e2cde038f248801cd283ed6a60e843ed7af07fdb2ac7e83674b5a011657--zenity-0.7.12.tar.gz ==> Installing dependencies for ncruces/tap/zenity: go ==> Installing ncruces/tap/zenity dependency: go ==> Pouring go-1.16.5.arm64_big_sur.bottle.tar.gz tar: Error opening archive: Failed to open '/Users/kevin/Library/Caches/Homebrew/downloads/63622908e08faac855f0fbc37ebb565ab403dc651f7587014e0d8727093e5d1c--go-1.16.5.arm64_big_sur.bottle.tar.gz' Error: Failure while executing; tar --extract --no-same-owner --file /Users/kevin/Library/Caches/Homebrew/downloads/63622908e08faac855f0fbc37ebb565ab403dc651f7587014e0d8727093e5d1c--go-1.16.5.arm64_big_sur.bottle.tar.gz --directory /private/tmp/d20211225-51941-1v4zqji exited with 1. Here's the output: tar: Error opening archive: Failed to open '/Users/kevin/Library/Caches/Homebrew/downloads/63622908e08faac855f0fbc37ebb565ab403dc651f7587014e0d8727093e5d1c--go-1.16.5.arm64_big_sur.bottle.tar.gz'

    documentation 
    opened by awklinux 2
  • tsz Error

    tsz Error

    I got error like this. How to slove it?

    Traceback (most recent call last): File "/home/huangjiahong.dracu/.local/bin/tsz", line 8, in sys.exit(main()) File "/home/huangjiahong.dracu/.local/lib/python3.5/site-packages/trzsz/svr/send.py", line 56, in main file_list = check_paths_readable(args.file, args.directory) NameError: name 'check_paths_readable' is not defined

    opened by aijianiula0601 1
  • trz文件发生 Receive data timeout

    trz文件发生 Receive data timeout

    版本:

    • 本地Mac
      • MacOS Monterey(12.5)
      • iterm2 3.4.16
      • Python 3.10.6
    • 远程服务器
      • Ubuntu 18.04.6
      • Python 3.6.9

    现象: 从mac传文件(trz)到服务器 文件大小28M 服务器显示:Receive data timeout

    opened by Light-Towers 1
  • Not supported in Konsole

    Not supported in Konsole

    trzsz seems not supported in Konsole (Debian tesing, KDE). anybond konw how to have the same experience on Linux just like Xshell on win10? I desire quickly download and upload file between remote server and local PC only by terminal.

    opened by xubooo2 1
Releases(v1.1.1)
Owner
null
Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Alacritty terminal used with Bash, Tmux, Vim, Mutt, Lynx, etc. and the many different additions added to each configuration file

Carter 19 Aug 24, 2022
A new kind of Progress Bar, with real time throughput, eta and very cool animations!

A new kind of Progress Bar, with real time throughput, eta and very cool animations!

Rogério Sampaio de Almeida 4.1k Jan 8, 2023
Loading animation; a progress bar

Loading animation; a progress bar. When you know the remaining time or task completion percentage, then you’re able to show an animated progress bar:

Goldy 1 Jan 23, 2022
iTerm2 Shell integration for Xonsh shell.

iTerm2 Shell Integration iTerm2 Shell integration for Xonsh shell. Installation To install use pip: xpip install xontrib-iterm2 # or: xpip install -U

Noorhteen Raja NJ 6 Dec 29, 2022
:computer: tmux session manager. built on libtmux

tmuxp, tmux session manager. built on libtmux. We need help! tmuxp is a trusted session manager for tmux. If you could lend your time to helping answe

python utilities for tmux 3.6k Jan 1, 2023
Tmux Based Dropdown Dashboard For Python

sextans It's a private configuration and an ongoing experiment while I use Archlinux. A simple drop down dashboard based on tmux. It includes followin

秋葉 4 Dec 22, 2021
Very nice SMS & Mail Bomber for Termux and Linux.

Very nice SMS & Mail Bomber for Termux and Linux. Coded with love)))

nordbearbot.dev 5 Nov 6, 2022
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

null 1 Feb 5, 2022
Run an FFmpeg command and see the percentage progress and ETA.

Run an FFmpeg command and see the percentage progress and ETA.

null 25 Dec 22, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
Borderless-Window-Utility - Modifies window style to force most applications into a borderless windowed mode

Borderless-Window-Utility Modifies window style to force most applications into

null 8 Oct 22, 2022
Multifunctional library for creating progress bars.

?? Content Installation Using github Using pypi Quickstart Flags Useful links Documentation Pypi Changelog TODO Contributing FAQ Bar structure ⚙️ Inst

DenyS 27 Jan 1, 2023
A python package to display progress of loops to the user

ProgressBars A python package to display progress of loops to the user. Installation This package can be installed using pip. pip install progressbars

Matthias 3 Jan 16, 2022
Squirrel - A cli program to track writing progress

Squirrel Very much a WIP project squirrel is a command line program that tracks you writing progress and gives you useful information and cute and pic

null 3 Mar 23, 2022
🏃 Python3 Solutions of All Problems in GCJ 2022 (In Progress)

GoogleCodeJam 2022 Python3 solutions of Google Code Jam 2022. Solution begins with * means it will get TLE in the largest data set. Total computation

kamyu 12 Dec 20, 2022
Python implementation of SSH file transfer across servers.

SSH Transfer Python implementation of SSH file transfer across servers. Requirements paramiko=2.7.2 Usage Config Preparation Configure some informatio

Zhe Kong 1 Nov 23, 2021