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)
Command line interface for unasync

CLI for unasync Command line interface for unasync Getting started Install Run the following command to install the package with pip: pip install unas

Leynier Gutiérrez González 3 Apr 04, 2022
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.

A command line stock market / portfolio tracker originally insipred by Ericm's Stonks program, featuring unicode for incredibly high detailed graphs even in a terminal.

Conrad Selig 51 Nov 29, 2022
Pequeno joguinho pra você rodar no seu terminal

JokenPython Pequeno joguinho pra você rodar no seu terminal Olá! Joguinho legal pra vc rodar no seu terminal!! (rode no terminal, pra melhor experienc

Scott 4 Nov 25, 2021
The most comprehensive, exhaustive, parameterized command-line wordle solver.

Wordle Solver The most comprehensive, exhaustive, parameterized command-line wordle solver. Wordle is a real

Debarghya Das 27 Nov 21, 2022
Simple command line tool to train and deploy your machine learning models with AWS SageMaker

metamaker Simple command line tool to train and deploy your machine learning models with AWS SageMaker Features metamaker enables you to: Build a dock

Yasuhiro Yamaguchi 5 Jan 09, 2022
A Hikari command handler for people who love ducks.

duckari A Hikari command handler made with love by ducks. Currently Duckari is work in progress. Documentation is WIP. The wiki is no longer used as d

2 Oct 09, 2022
CLI tool to develop StarkNet projects written in Cairo

OpenZeppelin Nile ⛵ Navigate your StarkNet projects written in Cairo. Getting started Create a folder for your project and cd into it: mkdir myproject

OpenZeppelin 305 Dec 30, 2022
Bonjour Software pypahe is a Python Package Helper command-line tool.

pypahe Bonjour Software pypahe is a Python Package Helper command-line tool. Requirements Docker runtime Usage print the latest available version of a

Bonjour Software 0 Aug 10, 2021
An question and answer shell environment based on xonsh using ansible for setup

An question and answer shell environment based on xonsh using ansible for setup

Steven Hollingsworth 2 Jan 11, 2022
Fylm is a wonderful automated command line app for organizing your film media.

Overview Fylm is a wonderful automated command line app for organizing your film media. You can pronounce it Film or File 'em, whichever you like! It

Brandon Shelley 30 Dec 05, 2022
Apple Silicon 'top' CLI

asitop pip install asitop What A nvtop/htop style/inspired command line tool for Apple Silicon (aka M1) Macs. Note that it requires sudo to run due to

Timothy Liu 1.2k Dec 31, 2022
Wordle for CLUE - WORDLE clone for Adafruit Clue

Wordle_for_CLUE This project is a clone of the very popular word solving puzzle

Michael Lacock 4 Feb 15, 2022
Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process.

docker-image-size-limit Limit your docker image size with a simple CLI command. Perfect to be used inside your CI process. Read the announcing post. I

wemake.services 102 Dec 14, 2022
Tstock - Check stocks from the terminal

tstock - Check stocks from the terminal! 📈 tstock is a tool to easily generate stock charts from the command line. Just type tstock aapl to get a 3 m

Gabe Banks 502 Dec 30, 2022
A simple CLI productivity tool to quickly display the syntax of a desired piece of code

Iforgor Iforgor is a customisable and easy to use command line tool to manage code samples. It's a good way to quickly get your hand on syntax you don

Solaris 21 Jan 03, 2023
dotfilery, configuration, environment settings, automation, etc.

┌┬┐┌─┐┌─┐┌─┐┬ ┬┌┬┐┬ ┬┬┌─┐ │││├┤ │ ┬├─┤│ │ │ ├─┤││ :: bits & bobs, dots & things. ┴ ┴└─┘└─┘┴ ┴┴─┘┴ ┴ ┴ ┴┴└─┘ @megalithic 🚀 Instal

Seth Messer 89 Dec 25, 2022
An awesome Python wrapper for an awesome Docker CLI!

An awesome Python wrapper for an awesome Docker CLI!

Gabriel de Marmiesse 303 Jan 03, 2023
A very simple python script to encode and decode PowerShell one-liners.

PowerShell Encoder A very simple python script to encode and decode PowerShell one-liners. I used Raikia's PowerShell encoder ALOT, but one day it wen

John Tear 5 Jul 29, 2022
This a simple tool to query the awesome ippsec.rocks website from your terminal

ippsec-cli This a simple tool to query the awesome ippsec.rocks website from your terminal Installation and usage cd /opt git clone https://github.com

stark0de 5 Nov 26, 2022
A curated list of awesome things related to Textual

Awesome Textual | A curated list of awesome things related to Textual. Textual is a TUI (Text User Interface) framework for Python inspired by modern

Marcelo Trylesinski 5 May 08, 2022