codecov[bot]: # [Codecov](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=h1) Report
> Merging [#52](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=desc) into [master](https://codecov.io/gh/valohai/valohai-cli/commit/d78841c98ea4016a2c79bf899b44e86920535a21?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/valohai/valohai-cli/pull/52/graphs/tree.svg?width=650&token=xqgKRx94XH&height=150&src=pr)](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master      #52   +/-   ##
=======================================
  Coverage   88.62%   88.62%           
=======================================
  Files          82       82           
  Lines        2154     2154           
  Branches      277      277           
=======================================
  Hits         1909     1909           
  Misses        151      151           
  Partials       94       94
```


| [Impacted Files](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [valohai\_cli/commands/execution/run.py](https://codecov.io/gh/valohai/valohai-cli/pull/52/diff?src=pr&el=tree#diff-dmFsb2hhaV9jbGkvY29tbWFuZHMvZXhlY3V0aW9uL3J1bi5weQ==) | `75.75% <ø> (ø)` | :arrow_up: |
| [tests/commands/execution/test\_run.py](https://codecov.io/gh/valohai/valohai-cli/pull/52/diff?src=pr&el=tree#diff-dGVzdHMvY29tbWFuZHMvZXhlY3V0aW9uL3Rlc3RfcnVuLnB5) | `100% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=footer). Last update [d78841c...d1ba22b](https://codecov.io/gh/valohai/valohai-cli/pull/52?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/valohai_cli/commands/execution/run.py b/valohai_cli/commands/execution/run.py
index 643cc5c..9b85f99 100644
--- a/valohai_cli/commands/execution/run.py
+++ b/valohai_cli/commands/execution/run.py
@@ -71,6 +71,7 @@ class RunCommand(click.Command):
         super(RunCommand, self).__init__(
             name=sanitize_name(step.name.lower()),
             callback=self.execute,
+            epilog='Multiple files per input: --my-input=myurl --my-input=myotherurl',
             add_help_option=True,
         )
         for parameter in step.parameters.values():
@@ -107,8 +108,9 @@ class RunCommand(click.Command):
         option = click.Option(
             param_decls=list(generate_sanitized_options(input.name)),
             required=(input.default is None and not input.optional),
-            default=input.default,
+            default=([input.default] if input.default else []),
             metavar='URL',
+            multiple=True,
             help='Input "%s"' % humanize_identifier(input.name),
         )
         option.name = '^%s' % input.name  # Caretize so we can pick these out of kwargs easily

Support multiple files per input
Support for this seems to be lacking in the CLI, even if the web UI and API support it.
diff --git a/tests/commands/execution/test_run.py b/tests/commands/execution/test_run.py
index fc78001..7e42a90 100644
--- a/tests/commands/execution/test_run.py
+++ b/tests/commands/execution/test_run.py
@@ -83,7 +83,8 @@ def test_run(runner, logged_in_and_linked, monkeypatch, pass_param, pass_input,
 
     if pass_input:
         args.append('--in1=http://url')
-        values['inputs'] = {'in1': 'http://url'}
+        args.append('--in1=http://anotherurl')
+        values['inputs'] = {'in1': ['http://url', 'http://anotherurl']}
 
     if pass_env:
         args.append('--environment=015dbd56-2670-b03e-f37c-dc342714f1b5')

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov requests-mock tox
apt-get update apt-get install -y gcc
3.9
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
cachetools==5.5.2
certifi==2025.1.31
chardet==5.2.0
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
coverage==7.8.0
distlib==0.3.9
exceptiongroup==1.2.2
filelock==3.18.0
idna==3.10
iniconfig==2.1.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
leval==1.3.0
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
pyproject-api==1.9.0
pytest==8.3.5
pytest-cov==6.0.0
PyYAML==6.0.2
referencing==0.36.2
requests==2.32.3
requests-mock==1.12.1
requests-toolbelt==1.0.0
rpds-py==0.24.0
six==1.17.0
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==2.3.0
-e git+https://github.com/valohai/valohai-cli.git@d78841c98ea4016a2c79bf899b44e86920535a21#egg=valohai_cli
valohai-yaml==0.46.0
virtualenv==20.29.3

name: valohai-cli
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - click==8.1.8
      - colorama==0.4.6
      - coverage==7.8.0
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - idna==3.10
      - iniconfig==2.1.0
      - jsonschema==4.23.0
      - jsonschema-specifications==2024.10.1
      - leval==1.3.0
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pyyaml==6.0.2
      - referencing==0.36.2
      - requests==2.32.3
      - requests-mock==1.12.1
      - requests-toolbelt==1.0.0
      - rpds-py==0.24.0
      - six==1.17.0
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - valohai-yaml==0.46.0
      - virtualenv==20.29.3
prefix: /opt/conda/envs/valohai-cli

tests/commands/execution/test_run.py::test_run[regular-False-True-False] tests/commands/execution/test_run.py::test_run[regular-False-True-True] tests/commands/execution/test_run.py::test_run[regular-True-True-False] tests/commands/execution/test_run.py::test_run[regular-True-True-True] tests/commands/execution/test_run.py::test_run[adhoc-False-True-False] tests/commands/execution/test_run.py::test_run[adhoc-False-True-True] tests/commands/execution/test_run.py::test_run[adhoc-True-True-False] tests/commands/execution/test_run.py::test_run[adhoc-True-True-True]
tests/commands/execution/test_run.py::test_param_type_validation
tests/commands/execution/test_run.py::test_run_requires_step tests/commands/execution/test_run.py::test_run[regular-False-False-False] tests/commands/execution/test_run.py::test_run[regular-False-False-True] tests/commands/execution/test_run.py::test_run[regular-True-False-False] tests/commands/execution/test_run.py::test_run[regular-True-False-True] tests/commands/execution/test_run.py::test_run[adhoc-False-False-False] tests/commands/execution/test_run.py::test_run[adhoc-False-False-True] tests/commands/execution/test_run.py::test_run[adhoc-True-False-False] tests/commands/execution/test_run.py::test_run[adhoc-True-False-True] tests/commands/execution/test_run.py::test_run_no_git tests/commands/execution/test_run.py::test_param_input_sanitization tests/commands/execution/test_run.py::test_typo_check
valohai_cli/commands/execution/run.py
valohai_cli/commands/execution/run.py