A friendly command-line SFTP client with reusable profiles.
Project description
🚀 SFTP Client CLI
A sleek and user-friendly command-line tool to upload, download, and manage files on a remote SFTP server. Configure reusable profiles, automate transfers, and even explore directories — all from your terminal.
✨ Features
- 🔐 Persistent profile-based SFTP configuration
- 📤 Upload files or entire directories
- 📥 Download remote files with ease
- 📂 Remote directory exploration (tree/list)
- 🧱 Remote file and folder management (mkdir, rmdir, remove, rename, exists)
- 🔄 Rename files/folders on the remote server
- ⚙️ Easy to extend and customize
📦 Installation
git clone https://github.com/sachin-acharya-projects/sftp-cli.git
cd sftp-cli
pip install -r requirements.txt
Python 3.7+ required
🚀 Quick Start
1. Configure a Connection Profile
python sftpcli.py configure --host sftp.example.com --port 22 --username user --password pass --upload_dir /uploads --profile myserver
2. Upload Files
python sftpcli.py upload file1.txt file2.txt -P myserver
3. Download Files
python sftpcli.py download remote1.txt remote2.txt -P myserver
4. Test Connection
python sftpcli.py connect myserver
📚 Full Command List
| Command | Description |
|---|---|
configure |
Save SFTP connection details as a reusable profile |
upload |
Upload local files to the remote server |
download |
Download files from the remote server |
listdir |
List contents of remote directories |
mkdir |
Create directories on the remote server |
rmdir |
Remove remote directories (must be empty) |
remove |
Delete specific files from the remote server |
rename |
Rename a file or folder on the remote server |
exists |
Check if files or directories exist on the remote |
tree |
Display a tree view of a remote directory |
connect |
Test connection to a configured SFTP profile |
🛠️ Example Usages
Upload files to a subdirectory
python sftpcli.py upload file.txt -d /custom/path -P myserver
View a tree of a remote folder
python sftpcli.py tree /uploads -P myserver
Delete remote files
python sftpcli.py remove /uploads/old1.txt /uploads/old2.txt -P myserver
Rename a remote file
python sftpcli.py rename /uploads/oldname.txt /uploads/newname.txt -P myserver
📁 Profiles
Use --profile or -P to specify which SFTP profile to use. If omitted, the default profile is used.
Example:
python sftpcli.py upload file.txt -P work-server
🧪 Development
Feel free to modify, extend, or integrate into your own automation workflows!
Run Locally
python sftpcli.py <command> [options]
Example Test Command
python sftpcli.py connect default
💡 Tips
-
Use
--helpwith any command to see available options:python sftpcli.py upload --help
-
Profile configuration is saved for reuse. No need to re-enter credentials each time.
📜 License
MIT License. Use freely, modify responsibly.
🤝 Contributing
Have ideas? Found a bug? PRs and issues are welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sftpcli-0.0.1.tar.gz.
File metadata
- Download URL: sftpcli-0.0.1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f0bb2483ef3023e4a74860267af04267850b835a4ea63832a790ab3501acd6f
|
|
| MD5 |
f62f000635edc4052e45e7bff738ce77
|
|
| BLAKE2b-256 |
a1aa5d37b3da76011970b8997d4a0388f542b260a2a8514eaad98ab42634c1b0
|
File details
Details for the file sftpcli-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sftpcli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f6b39a9b2dc53caf93f9824d1ef197e5859e8727720bb6116906f45ee1c01dc
|
|
| MD5 |
7e5697ead520e3b66999c5b5585149ad
|
|
| BLAKE2b-256 |
c12e40cb48ab86ca1843681de6720d8c44f13855f7f012f27d685e7b37a7000e
|