Skip to content

feat: add file management CLI commands (move, copy, list-files, search-files, file-info) #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

pranavkonde
Copy link

Added new file management commands to enhance the Lighthouse CLI functionality:

Commands Added:

  1. move

    • Move/rename uploaded files
    • Handles file relocation with proper error checking
  2. copy

    • Copy files using IPFS gateway
    • Includes progress indicator
    • Creates destination directory if needed
    • Validates file existence before copying
  3. list-files [options]

    • Lists all uploaded files with detailed information
    • Filtering options:
      • --type: Filter by file type
      • --size: Filter by size (format: gt:1000000)
      • --date: Filter by date (ISO format)
    • Improved formatting for size and date display
  4. search-files

    • Search through uploaded files
    • Shows matching files with complete details
    • Enhanced output formatting
  5. file-info

    • Display detailed file information
    • Shows CID, name, size, type, and upload time
    • Includes deal status when available
    • Better error handling for missing data

Technical Improvements:

  • Proper error handling across all commands
  • Progress indicators for long-running operations
  • Consistent date and file size formatting
  • Fallback values for undefined fields
  • IPFS gateway integration for file operations

Testing:
All commands have been tested with various file types and sizes.

Copy link
Collaborator

@aakash-taneja aakash-taneja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closing this without merging, for the following reasons:

  • The copy and move commands are outside the scope of our SDK
  • The list-files command duplicates functionality already covered by get-uploads, and doesn't offer significant new utility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants