Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 78 additions & 41 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ A lightweight CLI tool for establishing SSH connections using password or privat

---

## 🎯 Project Overview

SSH File Explorer allows users to connect to remote servers via SSH and interact with their file systems from the comfort of their terminal. With support for both password and private key authentication, this tool aims to reduce the friction in secure file access and manipulation.

> Goal: Provide a cross-platform, intuitive, and scriptable tool for managing files over SSH using a CLI-first approach.

---

## 🚀 Features

- [x] Connect to any SSH server via CLI
Expand All @@ -13,9 +21,9 @@ A lightweight CLI tool for establishing SSH connections using password or privat
- [x] File exploration on remote server
- [x] Download files from remote server
- [x] Interactive prompts using `inquirer`
- [X] Colored CLI output using `chalk`
- [x] Colored CLI output using `chalk`
- [x] Robust error handling and logging
- [X] Cross-platform support (Linux, macOS, Windows)
- [x] Cross-platform support (Linux, macOS, Windows)

---

Expand Down Expand Up @@ -56,7 +64,17 @@ node index.js --host your.server.com --port 22 --username youruser --privateKeyP
| `--username` | SSH login username |
| `--password` | Password for authentication |
| `--privateKeyPath` | Path to private key file for key-based auth |
| `--authMethod` | `'password'` or `'privateKey'` |
| `--authMethod` | 'password' or 'privateKey' |

---

## 📚 Common Use Cases

- Backup remote files to your local machine
- Inspect directories on a Linux server without needing a GUI
- Avoid GUI-based SFTP clients in headless environments
- Simplify DevOps workflows via terminal
- Test server access and structure during CI/CD

---

Expand All @@ -73,10 +91,10 @@ node index.js --host 192.168.1.10 --port 22 --username admin --authMethod privat
```
/project-root
├── src
├── connect-ssh.js # SSH Authenticator is implemented here
├── file-and-folder-ssh.js # Helper code for handling File and Folder download and traversal
── helper.js # Helper code for project
├── index.js # The main execution js file
├── connect-ssh.js # SSH connection logic
├── file-and-folder-ssh.js # File/folder traversal & download
── helper.js # General helper functions
├── index.js # Entry point
├── package.json
└── README.md
```
Expand All @@ -85,64 +103,83 @@ node index.js --host 192.168.1.10 --port 22 --username admin --authMethod privat

## 🤩 Dependencies

- [commander](https://www.npmjs.com/package/commander) (or `yargs`) for CLI parsing
- [node-ssh](https://www.npmjs.com/package/ssh2`) or other SSH client lib
- [chalk](https://www.npmjs.com/package/chalk) for colored CLI output _(planned)_
- [inquirer](https://www.npmjs.com/package/inquirer) for interactive prompts
- [password-prompt](https://www.npmjs.com/package/password-prompt) for getting password in cli
- commander (or yargs) — for CLI parsing
- node-ssh — for SSH connections
- chalkfor colored output
- inquirerfor interactive CLI UX
- password-promptfor password input

---

## 📖 Development Timeline

### Week 1: Project Setup and Basic SSH Connection

- [x] Initialize Node.js project with `npm init`
- [x] Install `commander` and `node-ssh`
- [x] Initialize project
- [x] Install commander & node-ssh
- [x] Implement basic SSH connection
- [x] Test SSH connectivity
- [x] Add basic CLI commands (connect/disconnect)
- [x] Test connectivity
- [x] Add CLI flags

### Week 2: File Exploration and Downloading

- [x] List directories/files on remote server
- [x] Navigate remote directories via CLI
- [x] Download files from remote to local
- [x] Show download progress indicators
- [x] Test and debug file features
- [x] List remote directories/files
- [x] Navigate directories
- [x] Download files
- [x] Add progress indicators
- [x] Debug and improve UX

### Week 3: Enhancements and Documentation

- [x] Add colored output using `chalk`
- [x] Add interactive prompts via `inquirer`
- [x] Implement robust error handling
- [x] Write detailed documentation with examples
- [x] Colored output with chalk
- [x] Add inquirer prompts
- [x] Handle errors gracefully
- [x] Write docs and examples

### Week 4: Final Testing and Optimization
- [x] Test on Linux, macOS, Windows
- [x] Windows terminal crash (inquirer bug) — resolved
- [x] Optimize SSH logic
- [x] Final review & polish

- [X] Test on Linux, macOS, Windows
- [X] Known issue with Windows terminals: Some terminals may crash due to a known bug in the inquirer library.
- [X] Issue was fixed by Inquirer.js team some times back.
- [x] Optimize SSH connection & file operations
- [x] Final code/documentation review
- [x] Prepare for deployment/personal use
### Week 5: If I ever get time
- [ ] Remove password-prompt dependency

### Week 5: If I ever get time.
- [ ] Remove password-prompt Dependency.
---

## 📄 License
## 🔍 Roadmap / To-Do

MIT License — free to use, modify, and distribute.
- [ ] Recursive folder download
- [ ] Upload files to server
- [ ] Server bookmarking
- [ ] Support `.ssh/config` parsing

---

## 🙌 Contributing
## 🤝 Contributing

We welcome contributions!

Have suggestions or improvements? Fork the repo and submit a pull request!
### Contribution Steps
1. Fork the repo
2. Create a feature branch
3. Write your changes
4. Commit with meaningful messages
5. Push and open a pull request

### Code of Conduct
- Be kind and respectful
- Provide constructive feedback
- Assume positive intent

---

## 📄 License

MIT License — free to use, modify, and distribute.

---

## 📞 Contact

For support, open an issue or email [sangleshubham9@gmail.com].
For support, open an issue or email:

📧 sangleshubham9@gmail.com
🌐 github.com/sangleshubham