dir2sh

Crates.iodir2sh
lib.rsdir2sh
version0.1.1
created_at2025-05-09 18:30:45.496221+00
updated_at2025-05-23 17:12:32.10862+00
descriptionThis Rust tool simplifies copying a folder to a remote Linux machine by generating shell commands.
homepage
repositoryhttps://github.com/772/dir2sh
max_upload_size
id1667480
size57,209
Armin Schaefer M.Sc. (772)

documentation

README

Logo

What is dir2sh?

This Rust tool simplifies copying a folder to a remote Linux machine by generating shell commands.

Designed for graphical environments (Linux/Windows), it bypasses the need for manual scp/sftp/git workflows by copying terminal commands directly to your clipboard.

Usage

  1. Navigate to the folder you want to copy.
  2. Run dir2sh (no parameters or configuration needed).
  3. Paste the generated shell commands on the remote machine.

Example clipboard output:

set +o history
mkdir -p "hello_world"
printf '%s' 'W3BhY2thZ2VdCm5hbWUgPSAiaGVsbG9fd29ybGQiCnZlcnNpb24gPSAiMC4xLjAiCmVkaXRpb24gPSAiMjAyNCIKCltkZXBlbmRlbmNpZXNdCg==' | base64 -d > "hello_world/Cargo.toml"
mkdir -p "hello_world/src"
printf '%s' 'Zm4gbWFpbigpIHsKICAgIHByaW50bG4hKCJIZWxsbywgd29ybGQhIik7Cn0K' | base64 -d > "hello_world/src/main.rs"
set -o history

Installation

After installing Rust (https://rustup.rs/) you can install this minimalistic tool via:

cargo install dir2sh

Info

  • This tool is for small folders. Pasting a folder with 100 kilobytes takes around six seconds. You should use cargo clean before copying Rust projects with this tool e.g.
  • It won't destroy your .bash_history because of set +o history.
Commit count: 17

cargo fmt