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)
Seamlessly run Python code in IPython from Vim

Seamlessly run Python code from Vim in IPython, including executing individual code cells similar to Jupyter notebooks and MATLAB. This plugin also supports other languages and REPLs such as Julia.

Hans Chen 269 Dec 20, 2022
Regis-ltmpt-auto - Program register ltmpt 2022 automatis

LTMPT Register Otomatis 2022 Program register ltmpt 2022 automatis dibuat untuk

1 Jan 13, 2022
A dec-bin converter uses 2's complement.

2's Complement Dec-Bin Converter A dec-bin converter uses 2's complement. Visit my Medium Post. What is 2's complement? Two's complement is the most c

Khaw Chi Hun (Jacky) 9 Mar 01, 2022
Use case: quick JSON processing/restructuring with jq without terminal

alfred-jq Alfred workflow to conveniently process JQ on clipboard based on a jq query Also available at: packal/jq Use case: quick JSON processing/res

T on Meta Mode 5 Sep 30, 2022
keep your machine's shell history synchronize

SyncShell Yet another tool for laziness Keep your machine's shell history synchronize Get SyncShell Currently, SyncShell is just available on PyPi and

Masoud Ghorbani 53 Dec 12, 2022
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
Analyzing the most strategic words to guess on Wordle, based on letter frequency distributions

wordle-analysis Evaluating different heuristics to determine the most effective solving strategy and building an AI-powered assistant tool to help you

Sejal Dua 9 Feb 27, 2022
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 5.1k Jan 05, 2023
Shellmon is a tool used to create and control a webshell remotely, created using the Python3

An Simple PHP Webshell Manager Description Shellmon is a tool used to create and control a webshell remotely, created using the Python3 programming la

22XploiterCrew 12 Dec 30, 2022
topalias - Linux alias generator from bash/zsh command history with statistics, written on Python.

topalias topalias - Linux alias generator from bash/zsh command history with statistics, written on Python. Features Generate short alias for popular

Sergey Chudakov 38 May 26, 2022
A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

Glenn Musa 1 Feb 03, 2022
moviepy-cli: Command line interface for MoviePy.

Moviepy-cli is designed to apply several video editing in a single command with Moviepy as an alternative to Video-cli.

Kentaro Wada 23 Jun 29, 2022
A simple CLI tool for tracking Pikud Ha'oref alarms.

Pikud Ha'oref Alarm Tracking A simple CLI tool for tracking Pikud Ha'oref alarms. Polls the unofficial API endpoint every second for incoming alarms.

Yuval Adam 24 Oct 10, 2022
Unconventional ways to save an Image

Unexpected Image Saves Unconventional ways to save an image 😄 Have you ever been bored by the same old .png, .jpg, .jpeg, .gif and all other image ex

Eric Mendes 15 Nov 06, 2022
Command-line search tool for GitHub

cligh is a command-line search tool for GitHub.

1 Oct 02, 2022
CLI Web-CAT interface for people who use VIM.

CLI Web-CAT CLI Web-CAT interface. Installation git clone https://github.com/phuang1024/cliwebcat cd cliwebcat python setup.py bdist_wheel sdist cd di

Patrick 4 Apr 11, 2022
pwy - A simple weather tool.

A simple weather tool. I made this as a way for me to learn Python, API, and PyPi packaging. Name changed from wwy to pwy.

Clint 105 Dec 31, 2022
googler is a power tool to Google (web, news, videos and site search) from the command-line.

googler is a power tool to Google (web, news, videos and site search) from the command-line.

Terminator X 5.9k Jan 04, 2023
commandpack - A package of modules for working with commands, command packages, files with command packages.

commandpack Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayPal:

4 Sep 04, 2021
CLI tool to computes CO2 emissions of HPC computations following green-algorithms.org methodology

gqueue gqueue is a CLI (command line interface) tool that computes carbon footprint of HPC computations on clusters running slurm. It follows the meth

4 Dec 10, 2021