---
title: "Update Asset"
description: "Documentation for Update Asset Command in ZeyOS SDK CLI"
canonical_url: "https://www.zeyos.com/sdk/asset-management/zeysdk-update"
markdown_url: "https://www.zeyos.com/ai/guide/sdk/asset-management/zeysdk-update.md"
section: "sdk"
authority: "guide"
language: "en"
source_repository: "zeyos/sdk-v2"
source_path: "docs/asset-management/zeysdk-update.md"
source_revision: "a99897af74253b4dc5af6fecb9301cea0ae18e27"
---

# Update Asset

The `update` command changes an existing manifest entry without modifying the local asset file.

```bash
zeysdk update <ASSET_PATH> [options]
```

**Parameters**

| Parameter | Description | Required | Example |
|-----------|-------------|----------|---------|
| `ASSET_PATH` | Asset path including class directory and filename | Yes | `services/my-service.ixml` |

**Options**

| Option | Description |
|--------|-------------|
| `--verbose` | Show detailed output |
| `--name <name>` | Asset name |
| `--type <type>` | Service or weblet type; case-insensitive |
| `--view <view>` | Weblet view |
| `--entity <entity>` | Entity for an entity-triggered service |
| `--schedule <minutes>` | `TIMING` start time as an integer from `0` to `1439` |
| `--interval <minutes>` | `TIMING` interval as an integer of at least `1` |
| `--public <value>` | Resource public flag (`0` or `1`) |
| `--url <url>` | Empty or an `http://`/`https://` URL for a weblet or service |
| `--accesskey <key>` | HTTP access key for `REMOTECALL` services |
| `--width <pixels>` | Popup or embedded weblet width; non-negative integer |
| `--height <pixels>` | Popup or embedded weblet height; non-negative integer |
| `--svgpath <path>` | SVG path for an `INTEGRATED`, `STANDALONE`, or `DETACHED` icon |
| `--color <hex>` | Three or six uppercase hex digits without `#` |
| `--langaliases <json>` | Language aliases as valid JSON text; an empty value stores `null` |

Any metadata flag selects non-interactive mode and merges applicable values over the existing entry. With no metadata flags, services, resources, and weblets use interactive prompts. Generic `assets` preserve their existing `content` and have no editable metadata prompts.

**Validation and Behavior**

1. Requires `zeyos.app.json` and an existing asset key.
2. Rejects absolute paths, traversal, symbolic-link path components, and invalid characters.
3. For services, resources, and weblets, requires the supplied extension to match the MIME type registered in the manifest. Use `rename` to change an extension.
4. Validates type-specific metadata, then rewrites only the selected manifest entry. The local file contents are not read or changed.

Service and weblet types are the same as for `add`. Type flags are normalized to uppercase. Entity-triggered services require an entity; `--schedule` and `--interval` enforce the documented `TIMING` ranges. Popup and embedded weblets use dimensions, while integrated, standalone, and detached weblets use SVG path and color.

**Service Types**

| Type | Description | Schedule | Interval |
|------|-------------|----------|-----------|
| `TIMING` | Scheduled task | Minutes from midnight (`0`-`1439`) | Integer of at least `1` |
| `REMOTECALL` | External API call | N/A | N/A |
| `AFTER_CREATION` | Post-create hook | N/A | N/A |
| `BEFORE_MODIFICATION` | Pre-update hook | N/A | N/A |
| `AFTER_MODIFICATION` | Post-update hook | N/A | N/A |
| `AFTER_CREATION_MODIFICATION` | Combined hook | N/A | N/A |
| `BEFORE_DELETION` | Pre-delete hook | N/A | N/A |
| `AFTER_DELETION` | Post-delete hook | N/A | N/A |

**Weblet Types**

| Type | Description | Width/Height |
|------|-------------|--------------|
| `INTEGRATED` | In-app weblet | Not used |
| `STANDALONE` | Independent window | Not used |
| `DETACHED` | Floating window | Not used |
| `POPUP_FRAMED` | Modal with frame | Non-negative integers |
| `POPUP_PLAIN` | Modal without title | Non-negative integers |
| `EMBEDDED_FRAMED` | Inline with frame | Non-negative integers |
| `EMBEDDED_COLLAPSED` | Collapsible panel | Non-negative integers |
| `EMBEDDED_PLAIN` | Inline without frame | Non-negative integers |


**Examples**

```bash
# Change a timing interval while preserving other service metadata
zeysdk update services/daily-backup.ixml --interval 720

# Change a service type; entity hooks require an entity
zeysdk update services/contact-hook.ixml \
  --type AFTER_MODIFICATION --entity contacts

# Change a weblet to an integrated type with icon metadata
zeysdk update weblets/customer-view.ixml \
  --type INTEGRATED --view customers.index \
  --color 4287F5 --svgpath 'M10 10h100v100h-100z'

# Update resource metadata
zeysdk update resources/company-logo.png \
  --name "Company Brand Logo" --public 1

# Clear optional values explicitly
zeysdk update services/remote-call.ixml --url '' --accesskey ''
zeysdk update weblets/customer-view.ixml --langaliases ''
```


**Error Handling**

| Error | Description | Resolution | Example |
|-------|-------------|------------|---------|
| Invalid asset class | Unsupported type | Use correct class | `services/backup.ixml` not `service/backup.ixml` |
| Missing app.json | Config file not found | Initialize app | Run `zeysdk create` first |
| Asset not found | Asset doesn't exist | Create asset | Run `zeysdk add` first |
| Invalid filename | Bad characters or unsafe path | Keep the path inside its asset directory | Use `services/backup-daily.ixml` |
| Extension mismatch | Path extension differs from the registered MIME type | Use the registered filename or `rename` | Do not update a `.png` resource as `.jpg` |
| Invalid type | Wrong service/weblet type | Use valid type | Use `TIMING` not `SCHEDULED` |
| Invalid schedule | Not an integer from `0` to `1439` | Use minutes from midnight | Use `1410` for 23:30 |
| Invalid interval | Not an integer of at least `1` | Use a positive minute count | Use `1440` for daily |
| Invalid dimensions | Not a non-negative integer | Use pixels without units | Use `800` not `800px` |
| Invalid color | Includes `#`, lowercase, or wrong length | Use 3 or 6 uppercase hex digits | Use `4287F5` |

**Notes**

- `update` changes metadata, not the asset file contents
- Service and weblet prompts depend on the selected type.
- Resource visibility is controlled by the `public` metadata field
- Use `zeysdk compare` after updates to review pending metadata changes
- Empty strings can clear optional URL, access-key, view, icon, and language-alias values where applicable.
