`homeboy file`
Synopsis
homeboy file <COMMAND>Subcommands
list <project_id> <path>read <project_id> <path>write <project_id> <path>(reads content from stdin)delete <project_id> <path> [-r|--recursive](delete directories recursively)rename <project_id> <old_path> <new_path>find <project_id> <path> [options](search for files by name)grep <project_id> <path> <pattern> [options](search file contents)download <project_id> <path> [local_path] [-r|--recursive]upload <server> <local_path> <remote_path> [-c|--compress] [--dry-run]copy <source> <destination> [-r|--recursive] [-c|--compress] [--dry-run] [--exclude <pattern>]sync <source> <destination> [-c|--compress] [--dry-run] [--exclude <pattern>]
copy and sync targets use local/path or server_id:/path syntax. sync is recursive and non-deleting by default; it does not expose a delete mode.
find
homeboy file find <project_id> <path> [options]Options:
--name <pattern>: Filename pattern (glob, e.g.,*.php)--type <f|d|l>: File type:f(file),d(directory),l(symlink)--max-depth <n>: Maximum directory depth
Examples:
# Find all PHP files
homeboy file find mysite /var/www --name "*.php"
# Find directories named "cache"
homeboy file find mysite /var/www --name "cache" --type d
# Find files in top 2 levels only
homeboy file find mysite /var/www --name "*.log" --max-depth 2grep
homeboy file grep <project_id> <path> <pattern> [options]Options:
--name <glob>: Filter files by name pattern (e.g.,*.php)--max-depth <n>: Maximum directory depth-i, --ignore-case: Case insensitive search
Examples:
# Find "TODO" in PHP files
homeboy file grep mysite /var/www "TODO" --name "*.php"
# Case-insensitive search
homeboy file grep mysite /var/www "error" -i
# Search with depth limit
homeboy file grep mysite /var/www "add_action" --name "*.php" --max-depth 3upload, copy, and sync
homeboy file upload prod ./report.json /tmp/report.json --dry-run
homeboy file copy ./dump.sql prod:/tmp/dump.sql --compress --dry-run
homeboy file copy prod:/tmp/dump.sql ./dump.sql --dry-run
homeboy file copy old:/var/www/uploads new:/var/www/uploads --recursive --exclude cache --dry-run
homeboy file sync ./uploads prod:/var/www/uploads --exclude cache --dry-runNotes:
uploadis the ergonomic mirror ofdownloadfor local-to-server uploads.copypreserves the old local↔remote and remote↔remote transfer target syntax.syncis directory-oriented and recursive, but does not delete files from the destination.
JSON output
Note: all command output is wrapped in the global JSON envelope described in the JSON output contract.
homeboy filereturns one of several output types as thedatapayload.
Standard operations (list, read, write, delete, rename)
Note: all command output is wrapped in the global JSON envelope described in the JSON output contract. homeboy file returns one of several output types as the data payload.
command:file.list|file.read|file.write|file.delete|file.renameproject_idbase_path: project base path if configuredpath/old_path/new_path: resolved full remote pathsrecursive: present for deleteentries: forlist(parsed fromls -la)content: forreadbytes_written: forwrite(number of bytes written after stripping one trailingnif present)stdout,stderr: included for error context when applicableexit_code,success
Transfer output
Note: all command output is wrapped in the global JSON envelope described in the JSON output contract. homeboy file returns one of several output types as the data payload.
sourcedestinationmethod:scp,cat-pipe, ortar-pipedirection:push,pull, orserver-to-serverrecursivecompresssuccesserrordry_run
Fields:
namepathis_directorysizepermissions(permission bits excluding the leading file type)
Find output
upload, copy, and sync return the shared transfer payload:
command:file.findproject_idbase_path: project base path if configuredpath: search pathpattern: name pattern if specifiedmatches: array of matching file pathsmatch_count: number of matches
Grep output
List entries (entries[]):
command:file.grepproject_idbase_path: project base path if configuredpath: search pathpattern: search patternmatches: array of match objectsmatch_count: number of matches
Fields:
file: file pathline: line numbercontent: matching line content
Exit code
Fields: