> ## 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 upload

> Copy a local file to a Mo session machine.

Give Mo a file to work with: test data, a CSV of accounts, a spec, a build
artifact. The command copies the file to the session machine and prints its path
there. Pass that path to Mo in your next
[`mo send`](/docs/cli-reference/mo/commands/send).

```bash theme={null}
mo upload <source> [destination] --session-id <session-id>
```

## Arguments

<ParamField path="<source>" type="string" required>
  Path of a local file. Directories are not supported.
</ParamField>

<ParamField path="[destination]" type="string">
  File name to use on the session machine. The CLI places the file in the
  session user's home directory and replaces characters other than letters,
  digits, `.`, `_`, and `-` with `_`, so a nested path becomes a single name.
  When omitted, the CLI stores the file as a session attachment under a
  generated path.
</ParamField>

## Options

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

## Output

On success the command prints the absolute path of the file on the session
machine and nothing else:

```text theme={null}
/home/user/accounts.csv
```

## Examples

Upload test accounts and tell Mo to use them:

```bash theme={null}
remote=$(mo upload ./fixtures/accounts.csv accounts.csv --session-id "$session_id")
mo send --session-id "$session_id" "Use the accounts in $remote to test login for each role."
```

## Notes

* Always tell Mo the printed path. Uploading a file does not notify Mo by
  itself.
* The session machine must exist. Uploads to an archived session fail.
