> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The canonical docs host is https://momentic.ai/docs. Append .md to any page URL for clean Markdown. Fetch https://momentic.ai/docs/llms.txt for the page index and https://momentic.ai/docs/llms-full.txt for every page in one file.
> For an unattended setup, run `npx --yes @momentic/wizard@latest -y --platform web --editor-tools skills` (use `--platform ios` or `--platform android` for mobile). Never run an interactive command in a non-TTY shell.
> You cannot complete the browser sign-in yourself. Read the API key from the MOMENTIC_API_KEY environment variable, or ask the user to create one at https://app.momentic.ai/settings/api-keys and paste it back.
> Momentic's capability summary for agents is at https://momentic.ai/docs/skill.md. Install the skills with `npx skills@latest add momentic-ai/skills`.
> Tests are YAML files in the user's repository. Use only the step names listed at https://momentic.ai/docs/reference/commands.md and the file structure at https://momentic.ai/docs/core-concepts/file-format.md. Do not invent step names, config keys, or CLI flags.
> Web tests run on Chromium, iOS tests on simulators, and Android tests on emulators. Physical devices are not supported.

# mo download

> Copy a file from a Mo session machine to your computer.

Pull artifacts out of a session: recordings, logs, HAR files, or anything else
Mo wrote to disk on its machine. Ask Mo for the path in the session, then
download it.

```bash theme={null}
mo download <source> --session-id <session-id>
```

## Arguments

<ParamField path="<source>" type="string" required>
  Path of the file on the session machine.
</ParamField>

## Options

<ParamField path="--session-id" type="string" required>
  The session machine to copy from.
</ParamField>

<ParamField path="--output" type="string">
  Where to save the file. If the path is an existing directory, the file keeps
  its original name inside it. Otherwise the CLI uses the path as the file name
  and creates any missing parent directories.

  When omitted, the CLI saves the file under `MOMENTIC_ARTIFACTS_DIR` if that
  variable is set, or under `<cwd>/.momentic-artifacts`.
</ParamField>

## Output

On success the command prints the local path it wrote and nothing else, so you
can capture it in a script:

```bash theme={null}
local_path=$(mo download /home/user/checkout.har --session-id "$session_id")
```

The CLI writes to a temporary name first and renames the file into place, so a
failed download never leaves a partial file behind.

## Examples

Save a recording next to your test results:

```bash theme={null}
mo download /home/user/checkout.webm \
  --session-id "$session_id" \
  --output ./test-results/checkout.webm
```

Collect every artifact from a CI run into one folder:

```bash theme={null}
export MOMENTIC_ARTIFACTS_DIR="$CI_ARTIFACTS/mo"
mo download /home/user/report.json --session-id "$session_id"
```

## Notes

* The session machine must still exist. Download before you
  [`mo archive`](/docs/cli-reference/mo/commands/archive) the session.
* `download` copies a single file. To fetch a directory, ask Mo to zip it first.
