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)
CLI tool to show the current crypto balance

CryptoBoard The simple python CLI tool for one currency to show the current crypto balance yours purchases. That's all. Data source is from https://ww

John 2 Nov 18, 2021
MsfMania is a command line tool developed in Python that is designed to bypass antivirus software on Windows and Linux/Mac in the future

MsfMania MsfMania is a command line tool developed in Python that is designed to bypass antivirus software on Windows and Linux/Mac in the future. Sum

446 Dec 21, 2022
A CLI Spigot plugin manager that adheres to Unix conventions and Python best practices.

Spud A cross-platform, Spigot plugin manager that adheres to the Unix philosophy and Python best practices. Some focuses of the project are: Easy and

Tommy Dougiamas 9 Dec 02, 2022
ForX - get forex quotes from the terminal

A command line tool for checking exchange rates between currencies, both crypto and fiat.

Gabe Banks 52 Dec 10, 2022
CLI client for FerrisChat

A CLI Client for @FerrisChat using FerrisWheel

FerrisChat 2 Apr 01, 2022
The WalletsNet CLI helps you connect to WalletsNet

WalletsNet CLI The WalletsNet CLI helps you connect to WalletsNet. With the CLI, you can: Trigger webhook events or resend events for easy testing Tai

WalletsClub 8 Dec 22, 2021
🖍️This is a feature-complete clone of the awesome Chalk (JavaScript) library.

Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus. Highli

Fabian Keller 132 Dec 27, 2022
Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process of them.

Task Manager Automation Tool (TMAT) CLI Command Line (CLI) Application to automate creation of tasks in Redmine, issues on Github and the sync process

Tiamat 5 Apr 12, 2022
A webmining CLI tool & library for python.

minet is a webmining command line tool & library for python (= 3.6) that can be used to collect and extract data from a large variety of web sources

médialab Sciences Po 165 Dec 17, 2022
A CLI application for storing contacts as a csv file written in Python.

Contacter A CLI application for storing contacts as a csv file written in Python. You can use this to save your contacts with a special relations tag

nostalgicnerdpenguin 1 Oct 23, 2021
A simple CLI tool for converting logs from Poker Now games to other formats

🂡 Poker Now Log Converter 🂡 A command line utility for converting logs from Poker Now games to other formats. Introduction Poker Now is a free onlin

6 Dec 23, 2022
Python3 parser for Apple's crash reports

pyCrashReport in intended for analyzing crash reports from Apple devices into a clearer view, without all the thread listing and loaded images, just the actual data you really need to debug the probl

7 Aug 19, 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
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
Dynamically Generate GitHub Stats as like Terminal Interface

GitHub Stats Terminal Style Dynamically Generate GitHub Stats as like Terminal Interface Usage Create a New Repository using this Template or click he

YOGESHWARAN R 63 Jan 03, 2023
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
A powerful Minecraft command library.

Mecha A powerful Minecraft command library. from mecha import Mecha

32 Dec 10, 2022
Chat In Terminal - Chat-App in python

Chat In Terminal Hello all. 😉 Sockets and servers are vey important for connection and importantly chatting with others. 😂 😁 I have thought of maki

Shreejan Dolai 5 Nov 17, 2022
This is a Command Line program to interact with your NFTs, Cryptocurrencies etc

This is a Command Line program to interact with your NFTs, Cryptocurrencies etc. via the ThirdWeb Platform. This is just a fun little project that I made to be able to connect to blockchains and Web3

Arpan Pandey 5 Oct 02, 2022
Professor Wordlist is a free open source command line tool written in python

Professor Wordlist is a free open source command line tool written in python, With the aim of generating custom wordlists with a variety of unique parameters and functions providing many possibilitie

オークO A K Z E H オーク 1 Oct 28, 2021