Skip to content

Add ares-pull tool for downloading files from webOS devices#11

Merged
mariotaku merged 1 commit into
mainfrom
claude/ares-pull
Jun 14, 2026
Merged

Add ares-pull tool for downloading files from webOS devices#11
mariotaku merged 1 commit into
mainfrom
claude/ares-pull

Conversation

@mariotaku

Copy link
Copy Markdown
Member

Summary

This PR introduces a new ares-pull command-line tool that enables users to download files and directories from webOS devices to their local machine via SFTP.

Key Changes

  • New ares-pull binary: A command-line utility that mirrors the functionality of ares-push but in the opposite direction (device → host)
  • SFTP-based file transfer: Leverages libssh-rs to establish SFTP connections and recursively pull files from remote devices
  • Flexible path mapping: Implements intelligent destination path resolution:
    • Files map directly to the destination path
    • Trailing "/" on destination preserves the source's last path component
    • Directory contents are recursively copied
  • Error handling options: Supports --ignore flag to continue on errors instead of stopping at first failure
  • Device selection: Allows specifying a target device via --device flag or ARES_DEVICE environment variable
  • Symlink handling: Safely skips symlinks during transfer with informative messages

Implementation Details

  • Recursive directory traversal with proper handling of "." and ".." entries
  • Parent directory creation for nested file structures
  • Progress output showing source and destination paths during transfer
  • Comprehensive unit tests for path resolution logic covering various edge cases
  • Proper error conversion from libssh-rs errors to standard Rust IO errors

https://claude.ai/code/session_017vAGzSSYNcgdQzJRLWfX47

Port ares-pull as a new workspace crate, mirroring ares-push in reverse.
It opens an SFTP session and recursively copies a remote SOURCE into a
local DESTINATION (default: current directory), walking remote
directories via sftp read_dir and streaming each file down.

Path mapping matches ares-push: a trailing "/" on the destination keeps
the source's last component, otherwise the source maps onto the
destination. Symlinks are skipped, and --ignore continues past per-file
errors instead of stopping.

https://claude.ai/code/session_017vAGzSSYNcgdQzJRLWfX47
@mariotaku mariotaku merged commit eec4273 into main Jun 14, 2026
1 check passed
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