Add Asset
The add command creates a local asset file and registers it in zeyos.app.json.
zeysdk add <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; required with non-interactive service/weblet usage |
--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 #, such as FF0000 |
--langaliases <json> | Language aliases as valid JSON text |
Any metadata flag selects non-interactive mode. In that mode, services and weblets must include --type; type names are case-insensitive and stored in uppercase. With no metadata flags, the command prompts for applicable fields. Generic assets never prompt for metadata.
Supported Types
- Services:
TIMING,REMOTECALL,AFTER_CREATION,BEFORE_MODIFICATION,AFTER_MODIFICATION,AFTER_CREATION_MODIFICATION,BEFORE_DELETION,AFTER_DELETION - Weblets:
INTEGRATED,STANDALONE,DETACHED,POPUP_FRAMED,POPUP_PLAIN,EMBEDDED_FRAMED,EMBEDDED_COLLAPSED,EMBEDDED_PLAIN
Entity-triggered services require --entity. TIMING services use --schedule and --interval; interactive mode asks for the schedule as HH:MM. Popup and embedded weblets use width and height. Integrated, standalone, and detached weblets use SVG path and color.
Behavior
- Validates the app, asset class, filename, and manifest key.
- Rejects absolute paths, traversal, symbolic-link path components, and an existing physical file.
- Creates missing parent directories and the local file. New
.ixmlfiles receive the default iXML template; other files start empty. - Adds the manifest entry only after file creation succeeds. A later manifest failure removes the newly created file.
assets supports nested paths such as assets/images/logo.png; services, resources, and weblets use a single filename below their class directory.
Error Handling
| Error | Description | Resolution |
|---|---|---|
| Invalid asset class | Unsupported asset type | Use correct asset class |
| Missing app.json | Configuration file not found | Initialize app first |
| Duplicate asset | Manifest key or physical file already exists | Use a different path or update |
| Unsafe filename | Invalid characters, traversal, absolute path, or symbolic link | Keep the path inside its asset directory |
| Missing type/entity | Required non-interactive metadata is absent | Supply the required flag or use interactive mode |
| Invalid metadata | Value fails type, range, URL, color, or JSON validation | Correct the supplied value |
Notes
- Asset paths start with
services,resources,weblets, orassets. - MIME type is inferred from the filename.
- Use
zeysdk pushorzeysdk syncto send the new asset to an instance - Run the command from the application root.
Examples
# Public resource
zeysdk add resources/logo.png --name "Company Logo" --public 1
# Daily service starting at 02:00
zeysdk add services/daily-backup.ixml \
--name "Daily Backup" --type TIMING --schedule 120 --interval 1440
# Entity hook
zeysdk add services/contact-hook.ixml \
--name "Contact Hook" --type AFTER_CREATION --entity contacts
# Popup weblet
zeysdk add weblets/customer-dashboard.ixml \
--name "Customer Dashboard" --type POPUP_FRAMED \
--width 800 --height 600 --view customers.index
# Integrated weblet with icon metadata
zeysdk add weblets/quick-note.ixml \
--name "Quick Note" --type INTEGRATED --view notes.index \
--color FF0000 --svgpath 'M5 5h90v90h-90z' \
--langaliases '{"de_DE":"Schnellnotiz"}'
# Nested generic asset (no metadata prompt)
zeysdk add assets/images/icons/favicon.ico