loa add
loa add
Add a native asset ref, direct URL, or live local file to assets.json (no download)
Adds a source to the current assets.json and resolves it into the workspace-root assets-lock.json. Creates the manifest when needed. Adding an asset does not download its bytes.
For native assets, use org/project/asset@version. Omit @version on the command line to select the latest version and save an exact pin. Numeric selectors such as @2 and @2.3, and @latest, are also supported. latest means the highest numeric version, not the most recently uploaded version. The registry response supplies the hash; the asset file is not downloaded.
The manifest key is a binding name. Use --as to choose an alias; otherwise native assets use their canonical ref as the key. The value always contains the full source, including when the key is the canonical ref. Bare version values such as "2.3.0" are unsupported.
Every HTTP(S) source is a direct, unverified URL, even if hosted by a LoA service or containing @version. Adding a URL does not fetch it or use the global store. Local paths become live file: references relative to the declaring manifest; they are not hashed, copied, or adopted into the registry.
Run this command inside the workspace whose manifest should own the binding. All workspace aliases share one runtime namespace, so duplicates across manifests are rejected.
Native references use LOA_HOST or the configured host, defaulting to https://api.landofassets.com. The lockfile preserves the resolved host, so changing the environment does not redirect an existing locked asset. Native consumption uses anonymous requests.
Usage
loa add <source> [--as <as>]
| Argument | Type | Required | Description |
|---|---|---|---|
source | string | Yes | org/project/asset[@version], HTTP(S) URL, or local file path |
| Flag | Type | Required | Description |
|---|---|---|---|
--as | string | No | Local asset alias |
Examples
Add a native version with a local alias
loa add acme/furniture/[email protected] --as chair
Use the canonical ref as the binding name
loa add acme/furniture/[email protected]
Add a direct URL or live local file
loa add https://example.com/downlight.ies --as downlight
loa add ../brand/logo.png --as logo