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)
A command line tool to remove background from video and image

A command line tool to remove background from video and image, brought to you by BackgroundRemover.app which is an app made by nadermx powered by this tool

Johnathan Nader 1.7k Jan 01, 2023
: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 01, 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
Create animated ASCII-art for the command line almost instantly!

clippy Create and play colored 🟥 🟩 🟦 or colorless ⬛️ ⬜️ animated, or static, ASCII-art in the command line! clippy can help if you are wanting to;

Connor 10 Jun 26, 2022
a-shell: A terminal for iOS, with multiple windows

a-shell: A terminal for iOS, with multiple windows

Nicolas Holzschuch 1.7k Jan 02, 2023
Fetch is use to get information about anything on the shell using Wikipedia.

Fetch Search wikipedia article on command line [Why This?] [Support the Project] [Installation] [Configuration] Why this? Fetch helps you to quickly l

Yash Singh 340 Dec 18, 2022
Get COVID-19 vaccination schedules from booking.moh.gov.ge in the CLI

vaccination.py Get COVID-19 vaccination schedules from booking.moh.gov.ge in the CLI. Installation $ pip install vaccination Usage Make sure the Pytho

Temuri Takalandze 11 Dec 08, 2021
pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget

Currently, all the work is being done inside the refactoring branch. pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget P

Everton Correia 45 Dec 11, 2022
A Python module and command-line utility for converting .ANS format ANSI art to HTML

ansipants A Python module and command-line utility for converting .ANS format ANSI art to HTML. Installation pip install ansipants Command-line usage

4 Oct 16, 2022
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
Conditional Transformer Language Model for Controllable Generation

CTRL - A Conditional Transformer Language Model for Controllable Generation Authors: Nitish Shirish Keskar, Bryan McCann, Lav Varshney, Caiming Xiong,

Salesforce 1.7k Jan 05, 2023
Universal Command Line Interface for Amazon Web Services

This package provides a unified command line interface to Amazon Web Services.

Amazon Web Services 13.3k Jan 07, 2023
Urial (URI Addition tooL) intelligently updates URIs stored in Finder comments of macOS files

Urial Urial (URI addition tool) is a simple but intelligent command-line tool to add or replace URIs found inside macOS Finder comments. Table of cont

Mike Hucka 3 Sep 14, 2022
Play Wordle Bot - Wordle Bot written in python

Wordle Bot A Bot written in python with a CL Interface to guess adn solve Wordle

Prashant 1 Feb 25, 2022
Calculator for CLI. Made with Python

Calculator for CLI. Made with Python

Brandon Arreguin 2 Jan 07, 2022
🐾 Get the nftables counters easier to read

nft-stats Get the nftables counters easier to read It kind of hard to read the output of nft list ruleset so there is a small program parcising the ou

7 Oct 08, 2022
pls is a better ls for developers, pronounced /pliːz/ as in 'please'

pls is a better ls for developers. The "p" stands for ("pro" as in "professional"/"programmer") or "prettier". It works in a manner similar to ls, in

Dhruv Bhanushali 572 Dec 28, 2022
Python and data science snippets on the command line

Python Snippet Tool A tool to get Python and data science snippets at Data Science Simplified on the command line. You can read my article to learn ho

Khuyen Tran 19 Dec 21, 2022
Themes for Windows Terminal

Windows Terminal Themes Preview and copy themes for the new Windows Terminal. Use the project at windowsterminalthemes.dev How to use the themes This

Tom 1.1k Jan 03, 2023
Postgres CLI with autocompletion and syntax highlighting

A REPL for Postgres This is a postgres client that does auto-completion and syntax highlighting. Home Page: http://pgcli.com MySQL Equivalent: http://

dbcli 10.8k Jan 02, 2023