Skip to content

feat: support multiple --upload flags on sandbox create #1635

@feloy

Description

@feloy

Problem Statement

When creating a sandbox with the CLI, only a single directory or file can be uploaded at creation time. The --upload flag is typed as Option<String> (see crates/openshell-cli/src/main.rs:1180), so passing it more than once is not supported. Users who need to seed a sandbox with multiple directories must either tar them together or run sandbox upload separately after creation.

Proposed Design

Change --upload from Option<String> to Vec<String> so the flag can be repeated:

openshell sandbox create --upload ./src:/workspace/src --upload ./config:/workspace/config

Each spec keeps the existing <LOCAL_PATH>[:<SANDBOX_PATH>] format. The --no-git-ignore flag would apply to all uploads. Processing in sandbox_create() (currently crates/openshell-cli/src/run.rs:2015) would iterate over the list sequentially.

Alternatives Considered

  • Run sandbox upload after creation — works today but requires the sandbox to be running and adds extra round-trips.
  • Bundle into a tar/zip first — works but adds friction and requires unpacking inside the sandbox.

Agent Investigation

  • --upload is declared as Option<String> at crates/openshell-cli/src/main.rs:1180.
  • Parsed by parse_upload_spec() at crates/openshell-cli/src/main.rs:3044.
  • Consumed in sandbox_create() as upload: Option<&(String, Option<String>, bool)> at crates/openshell-cli/src/run.rs:1677.
  • No other upload flags (--mount, --dir, etc.) exist on the create command.

Checklist

  • I've reviewed existing issues and the architecture docs
  • This is a design proposal, not a "please build this" request

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type
    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