> For the complete documentation index, see [llms.txt](https://umber.gitbook.io/umber/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://umber.gitbook.io/umber/guides/migrating-assets-with-cli.md).

# Migrating Assets with the CLI

The [Quickstart](/umber/getting-started/quickstart.md) walks through creating a single asset by hand in the dashboard — great for a first asset, but not practical if you're onboarding a project that already has dozens or hundreds of images, videos, and documents bundled locally with code referencing them directly.

For that case, use the [Umber CLI](/umber/cli-tools/umber-cli.md)'s asset migration feature instead.

## The problem it solves

Onboarding an existing HTML, React, or React Native project into Umber the manual way means uploading every asset one at a time through the dashboard, then hand-editing every reference in your code to point at the new delivery URL. That's slow and error-prone at any real scale.

## The CLI flow

```bash
umber login                    # opens your browser to authorize — no API key to paste
umber billing                  # optional: confirm your plan has room
umber assets scan              # see what would be migrated — no changes made
umber assets migrate --dry-run # preview uploads + code rewrites
umber assets migrate           # upload assets and rewrite references
```

`umber login` sends you to the Umber dashboard, where you sign in, choose an environment, and approve. Umber creates an API key for that environment and passes it back to the CLI, so there's nothing to copy by hand. In CI, pass `--api-key` and `--domain` instead.

Before uploading anything, `migrate` checks that you have permission and that your plan has enough storage for the whole batch — so a run won't stop half-way and leave your project partly rewritten.

`umber assets migrate` scans your project for supported assets and their code references, uploads each asset as a new Virtual Asset (see [Virtual Assets](/umber/concepts/virtual-assets.md)), and rewrites each reference in your source to the resulting Umber delivery URL — the same URL format described in the [Quickstart](/umber/getting-started/quickstart.md):

```
https://adn.umbercloud.io/api/va/<domain-id>/<asset-id>/<env-id>/<platform-id>
```

Anything the CLI can't confidently rewrite on its own (for example, a dynamically constructed file path) is left alone and flagged for manual review rather than guessed at.

## When to use the dashboard instead

* Asset types the CLI doesn't yet auto-discover (Unity/Unreal assets, 3D models — see [Asset Types](/umber/concepts/asset-types.md))
* One-off assets where a full project scan isn't necessary
* Assets that need to be marked **Secured** (the CLI's migration flow targets unsecured assets)

Full command and flag reference: [Umber CLI](/umber/cli-tools/umber-cli.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://umber.gitbook.io/umber/guides/migrating-assets-with-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
