https://github.com/christian-byrne/comfy-org-file-server-cli

https://github.com/christian-byrne/comfy-org-file-server-cli

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: christian-byrne
  • Language: Rust
  • Default Branch: main
  • Size: 93.8 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 11 months ago · Last pushed 11 months ago
Metadata Files
Readme

README.md

Comfy-FS

A high-performance, user-friendly command-line interface for the company file server. Built with Rust for maximum performance and reliability, designed to be accessible to both technical and non-technical users.

alt text

Features

  • Multi-Protocol Support: SMB and FTP with automatic fallback
  • Parallel Downloads: High-speed concurrent file transfers
  • Interactive TUI: Beautiful terminal interface for file browsing
  • Wildcard Support: Download multiple files with patterns (*.pdf, test*, etc.)
  • Bidirectional Sync: Keep local and remote directories synchronized
  • Progress Bars: Real-time transfer progress visualization
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Comprehensive Testing: 45+ unit and integration tests

Quick Start

Installation

```bash

Clone the repository

git clone cd comfy-fs

Build the project

cargo build --release

Add to PATH (optional)

cp target/release/comfy-fs /usr/local/bin/ ```

First-Time Setup

When you run comfy-fs for the first time, it will guide you through the configuration:

```bash $ comfy-fs list /

🚀 Welcome to Comfy File Server CLI! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This tool helps you access the company file server easily. For detailed setup instructions, visit:

📖 https://www.notion.so/comfy-org/File-Server-Guide-2436d73d3650803f8aedcb7d2177d347

Let's configure your connection settings:

Server IP address: 192.168.1.100 Username: myusername Password: **** Preferred protocol (1=SMB, 2=FTP) [default: 1]: 1

✅ Configuration complete! ```

To reconfigure later, run:

bash comfy-fs config

Usage

Basic Commands

List files on the server:

bash comfy-fs list / comfy-fs list /documents --sort name --reverse

Browse files interactively:

bash comfy-fs browse comfy-fs browse /documents

Download files:

```bash

Single file

comfy-fs download /path/to/file.pdf ./downloads/

Multiple files with wildcards

comfy-fs download "/documents/.pdf" ./downloads/ comfy-fs download "/reports/2024" ./reports/ ```

Upload files:

```bash

Single file

comfy-fs upload document.pdf --dest /documents/

Multiple files

comfy-fs upload *.jpg report.pdf --dest /uploads/ ```

Synchronize directories:

```bash

Two-way sync between local and remote

comfy-fs sync ./local-folder /remote-folder ```

Interactive mode:

```bash comfy-fs interactive

or just

comfy-fs ```

Advanced Usage

Configure different servers:

bash comfy-fs config --server 192.168.1.200 --username user2

Sort file listings:

bash comfy-fs list / --sort modified # by date (default) comfy-fs list / --sort name # alphabetically comfy-fs list / --sort size # by file size comfy-fs list / --sort type # by file type comfy-fs list / --reverse # reverse sort order

Wildcard patterns:

  • * - matches everything
  • *.ext - files with specific extension
  • prefix* - files starting with prefix
  • *suffix - files ending with suffix

Interactive TUI

The interactive mode provides a full-screen file browser with:

  • Arrow keys: Navigate files and directories
  • Enter: Enter directories or download files
  • Backspace: Go up one directory
  • Space: Toggle file selection
  • Tab: Change sort mode (modified → name → size → type)
  • d: Download selected files
  • q: Quit

Development

Prerequisites

  • Rust 1.70+ (latest stable recommended)
  • Cargo

Building

```bash

Development build

cargo build

Release build (optimized)

cargo build --release

Run tests

make test

Format code

make fmt

Lint code

make lint

All quality checks

make all ```

Project Structure

``` src/ ├── main.rs # CLI entry point ├── lib.rs # Library exports ├── browser.rs # Interactive TUI file browser ├── client/ # File server clients │ ├── mod.rs # Client trait and common types │ └── ftp.rs # FTP client implementation ├── config.rs # Configuration management ├── connection.rs # Connection manager ├── download.rs # Parallel download functionality └── utils.rs # Utility functions

tests/ ├── integrationtest.rs # CLI integration tests └── uploaddownload_test.rs # File transfer tests ```

Testing

The project includes comprehensive test coverage:

  • Unit Tests: 25 tests covering all modules
  • Integration Tests: 20 tests covering CLI functionality
  • Mock Tests: Using mockall for isolated testing
  • Total Coverage: 45+ tests ensuring reliability

```bash

Run all tests

cargo test

Run specific test suite

cargo test --test integrationtest cargo test --test uploaddownload_test

Run with verbose output

cargo test -- --nocapture ```

Configuration

Configuration is stored in your system's config directory:

  • Linux: ~/.config/comfy-fs/config.json
  • macOS: ~/Library/Application Support/com.comfy.comfy-fs/config.json
  • Windows: %APPDATA%\comfy\comfy-fs\config.json

Configuration File Format

json { "server_ip": "192.168.1.100", "username": "myusername", "default_protocol": "Ftp" }

Note: Passwords are not stored in the config file for security reasons.

Performance

  • Parallel Downloads: Up to 4 concurrent connections by default
  • Memory Efficient: Streaming file transfers
  • Fast TUI: 60fps responsive interface
  • Minimal Overhead: Rust's zero-cost abstractions

Benchmarks

On a 2.5GbE connection:

  • Single file download: ~250MB/s
  • Parallel downloads: ~240MB/s aggregate
  • File listing: <100ms for 1000 files

Troubleshooting

Connection Issues

```bash

Test basic connectivity

comfy-fs list /

Check configuration

comfy-fs config

Verify server credentials in docs/

```

Performance Issues

```bash

Check available bandwidth

Ethernet: up to 250MB/s (2.5GbE)

WiFi: varies by network

For better performance, use ethernet with 2.5GbE dongles

```

Common Errors

"Failed to connect": Check network connection and server IP "Authentication failed": Verify username and password "Permission denied": Check file/directory permissions on server "File not found": Verify the remote path exists

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite (make test)
  6. Format and lint your code (make fmt lint)
  7. Commit your changes (git commit -m 'Add amazing feature')
  8. Push to the branch (git push origin feature/amazing-feature)
  9. Open a Pull Request

Code Quality

All contributions must:

  • Pass all existing tests
  • Include tests for new functionality
  • Follow Rust formatting standards (rustfmt)
  • Pass linting checks (clippy)
  • Include documentation for public APIs

Roadmap

  • [x] FTP Support - Full FTP client implementation
  • [x] Parallel Downloads - Concurrent file transfers
  • [x] Interactive TUI - File browser interface
  • [x] Wildcard Downloads - Pattern matching
  • [x] Sync Functionality - Bidirectional synchronization
  • [x] Progress Bars - Visual transfer feedback
  • [ ] SMB Support - Windows file sharing protocol
  • [ ] Resume Downloads - Interrupted transfer recovery
  • [ ] File Permissions - Advanced permission management
  • [ ] Encryption - Secure file transfers
  • [ ] Compression - Automatic file compression

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues, feature requests, or questions:

  1. Check the troubleshooting section
  2. Review existing GitHub Issues
  3. Create a new issue with detailed information

Acknowledgments


Made with ❤️ for the team by the engineering team

Owner

  • Name: Christian Byrne
  • Login: christian-byrne
  • Kind: user
  • Location: San Francisco
  • Company: Comfy-Org

GitHub Events

Total
  • Push event: 4
  • Create event: 1
Last Year
  • Push event: 4
  • Create event: 1

Dependencies

.github/workflows/build.yml actions
  • Swatinem/rust-cache v2 composite
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/upload-artifact v4 composite
  • dtolnay/rust-toolchain stable composite
  • softprops/action-gh-release v1 composite
Cargo.lock cargo
  • 194 dependencies
Cargo.toml cargo
  • mockall * development
  • tempfile * development
  • anyhow 1.0
  • async-trait *
  • chrono 0.4
  • clap 4.5
  • crossterm 0.29
  • directories *
  • futures *
  • human_bytes *
  • indicatif *
  • ratatui 0.29
  • rpassword *
  • serde 1.0
  • serde_json 1.0
  • suppaftp *
  • tokio 1.47