Skip to content

feat(cli): Add upload and download commands for file transfer #64

Description

@iiilisan

Summary

Add aviato upload and aviato download CLI commands for transferring files to/from sandboxes, wrapping the existing SDK methods sandbox.write_file() and sandbox.read_file().

Motivation

The SDK already has read_file() / write_file() methods but there's no CLI equivalent. Users currently have to use aviato exec <id> sh -c "echo ... > /path" as a workaround for file transfer, which is error-prone and limited to small payloads.

PR #60 review (NavarrePratt) suggested dedicated commands.

Proposed commands

aviato upload <sandbox-id> <local-path> <remote-path>
aviato download <sandbox-id> <remote-path> [local-path]
  • upload: read local file, call sandbox.write_file(remote_path, content)
  • download: call sandbox.read_file(remote_path), write to local path (default: stdout or basename)

Acceptance criteria

  • aviato upload transfers a local file into a sandbox
  • aviato download retrieves a file from a sandbox
  • Both handle missing sandbox (SandboxNotFoundError) via existing _AviatoCLI handler
  • Both handle missing file (SandboxFileError) via existing _AviatoCLI handler
  • Unit tests with mocked Sandbox
  • Docs updated (AGENTS.md CLI table)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions