Skip to content

Commit 1d565ea

Browse files
committed
feat: add cp command for file copy operations
Add 'hypeman cp' command for copying files to/from running instances, with docker cp compatible semantics: Features: - Copy files and directories to instances: hypeman cp file.txt instance:/path - Copy from instances: hypeman cp instance:/path file.txt - STDIN/STDOUT streaming with '-' argument for tar archives - Recursive directory copying with proper tar packing/unpacking - Symlink handling with --follow-links flag - Archive mode (-a) to preserve UID/GID ownership - Quiet mode (-q) to suppress progress output - Docker cp path resolution semantics: - SRC_PATH/. copies contents, not the directory itself - Trailing slash handling for directory vs file detection The command communicates with the API server via WebSocket, streaming file data as binary chunks with JSON metadata headers.
1 parent 1661f08 commit 1d565ea

File tree

2 files changed

+1173
-0
lines changed

2 files changed

+1173
-0
lines changed

pkg/cmd/cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func init() {
6868
},
6969
Commands: []*cli.Command{
7070
&execCmd,
71+
&cpCmd,
7172
&pullCmd,
7273
&pushCmd,
7374
&runCmd,

0 commit comments

Comments
 (0)