From badb2bb745bd0a06c233f099af3af01900a9aa29 Mon Sep 17 00:00:00 2001 From: abdfnx Date: Mon, 7 Feb 2022 21:34:46 +0300 Subject: [PATCH] update root command usage, update the tran README --- README.md | 114 ++++++++++++++++++++++++++++++++++++++++++++++- cmd/tran/root.go | 4 ++ 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c397535..8aba808 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,115 @@ -# Tran - under maintenance 🚧 +

+ +

+ + > 🖥️ Securely transfer and send anything between computers with TUI. + +## Installation + +
+ways + +### Using script + +* Shell + +``` +curl -fsSL https://cutt.ly/tran | bash +``` + +* PowerShell + +``` +iwr -useb https://cutt.ly/tran-win | iex +``` + +**then restart your powershell** + +### Homebrew + +```bash +brew install abdfnx/tap/tran +``` + +### Go package manager + +```bash +go install github.com/abdfnx/tran@latest +``` + +### GitHub CLI + +```bash +gh extension install abdfnx/gh-tran +``` +
+ +## Usage + +* Open Tran UI + +```bash +tran +``` + +* Open with specific path + +``` +tran --start-dir $PATH + +``` +* Send files to a remote computer +``` +tran send + +``` +* Receive files from a remote computer +``` +tran receive +``` + +### Tran Config file + +> tran config file is located at `~/.config/tran/tran.yml` | `$HOME/tran.yml` + +```yml +config: + borderless: false + editor: vim + enable_mousewheel: true + show_updates: true + start_dir: . +``` + +### Flags + +``` +--start-dir string Starting directory for Tran +``` + +### Shortkeys + +* tab: Switch between boxes +* up: Move up +* down: Move down +* left: Go back a directory +* right: Read file or enter directory +* V: View directory +* T: Go to top +* G: Go to bottom +* ~: Go to your home directory +* /: Go to root directory +* .: Toggle hidden files and directories +* D: Only show directories +* F: Only show files +* E: Edit file +* ctrl+s: Send files/directories to remote +* ctrl+r: Receive files/directories from remote +* ctrl+f: Find files and directories by name +* q/ctrl+q: Quit + +### License + +tran is licensed under the terms of [MIT](https://github.com/abdfnx/tran/blob/main/LICENSE) license. diff --git a/cmd/tran/root.go b/cmd/tran/root.go index 43ca11e..d7a7d3e 100755 --- a/cmd/tran/root.go +++ b/cmd/tran/root.go @@ -27,6 +27,10 @@ func Execute(f *factory.Factory, version string, buildDate string) *cobra.Comman # Open Tran UI tran + # Open with specific path + + tran --start-dir $PATH + # Send files to a remote computer tran send