Skip to content

M-A-D-A-R-A/vmfile-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VM File Downloader CLI

A Go-based cli tool to fetch files from a remote VM using SSH/SFTP.
Supports Oracle ADE views for file searching (/scratch/<user>/view_storage/<adeView>).
Mostly used for personal use for someone who like to use terminal for most of things


Installation

Clone and build:

git clone <your-repo-url> vmfile-cli
cd vmfile-cli

# build CLI binary
go build -o vmfile-cli

Usage

1. Interactive mode

run:

./vmfile-cli

You will be asked step by step:

Enter method (ssh/sftp): sftp/ssh
Enter host: 20.40.202.16
Enter username: myuser
Enter password: ********
Enter ADE view: ade_view_name
Enter remote file name: filename.txt
Enter local download folder (default ./): ./downloads

Found matches:
[1] /scratch/myuser/view_storage/nandoriy_backport_38118743_25D/fusionapps/prc/nandoriy_rfi_backport_38118743_11.13.25.10.0.log
Choose file number: 1Downloaded: ./downloads/nandoriy_rfi_backport_38118743_11.13.25.10.0.log

2. Config file mode

create config.json file

{
  "method": "sftp",
  "host": "20.40.202.16",
  "port": "22",
  "username": "myuser",
  "password": "mypassword",
  "local_dir": "./downloads"
}

run with:

./vmfile-cli --config config.json

output:

✅ Loaded config.json successfully
Enter your ADE lsview name: nandoriy_backport_38118743_25D
Enter remote file path or filename: nandoriy_rfi_backport_38118743_11.13.25.10.0.log

Found matches:
[1] /scratch/myuser/view_storage/nandoriy_backport_38118743_25D/fusionapps/prc/nandoriy_rfi_backport_38118743_11.13.25.10.0.log
Choose file number: 1
✅ Download completed: ./downloads/nandoriy_rfi_backport_38118743_11.13.25.10.0.log

About

VM File Downloader CLI

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages