2 releases
Uses new Rust 2024
| 0.1.1 | May 23, 2025 |
|---|---|
| 0.1.0 | May 9, 2025 |
#646 in FFI
72 downloads per month
23KB
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
- Navigate to the folder you want to copy.
- Run
dir2sh(no parameters or configuration needed). - 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 cleanbefore copying Rust projects with this tool e.g. - It won't destroy your
.bash_historybecause ofset +o history.
Dependencies
~0.3–16MB
~176K SLoC