Skip to main content

Add Asset (zeysdk add)

Add a new asset to your ZeyOS application.

zeysdk add <ASSET_CLASS>/<FILENAME> [options]

Parameters

ParameterDescriptionFormatExample
ASSET_CLASSAsset typeresources, services, or webletsservices/myservice.ixml
FILENAMEAsset filenameValid filename charactersmyresource.png

Options

OptionDescriptionDefault
--verboseShow detailed progress outputfalse

Asset Types Configuration

Resources​

{
"name": "string",
"public": 0|1,
"mimetype": "auto-detected"
}

Services​

{
"name": "string",
"type": "string",
"schedule": 0,
"interval": 1,
"entity": "string",
"url": "string",
"accesskey": "string?",
"mimetype": "auto-detected"
}

Weblets​

{
"name": "string",
"langaliases": "null|object",
"width": 0,
"height": 0,
"color": "string",
"svgpath": "string",
"type": "string",
"url": "string",
"view": "string",
"mimetype": "auto-detected"
}

Validation Rules

  • Asset class must be valid (resources, services, weblets)
  • zeyos.app.json must exist
  • Asset key must not already exist
  • Filename must contain valid characters
  • Required fields must be provided during prompts

Error Handling

ErrorDescriptionResolution
Invalid asset classUnsupported asset typeUse correct asset class
Missing app.jsonConfiguration file not foundInitialize app first
Duplicate assetAsset already existsUse different name
Invalid filenameContains invalid charactersUse valid filename
Missing fieldsRequired details not providedComplete all prompts

Examples

Adding a Resource​

zeysdk add resources/logo.png
{
"resources": {
"logo": {
"name": "Company Logo",
"public": 1,
"mimetype": "image/png"
}
}
}

Adding a Service​

zeysdk add services/daily-backup.ixml
{
"services": {
"daily-backup": {
"name": "Daily Backup Service",
"type": "TIMING",
"schedule": 120, // 02:00 AM
"interval": 1440, // Daily
"entity": "documents",
"url": "",
"mimetype": "application/ixml+xml"
}
}
}

Adding a Remote Service​

zeysdk add services/external-api.ixml
{
"services": {
"external-api": {
"name": "External API Service",
"type": "REMOTECALL",
"url": "https://api.example.com/endpoint",
"accesskey": "secret-key",
"mimetype": "application/ixml+xml"
}
}
}

Adding a Weblet​

zeysdk add weblets/customer-dashboard.ixml
{
"weblets": {
"customer-dashboard": {
"name": "Customer Dashboard",
"type": "POPUP",
"width": 800,
"height": 600,
"color": "#4287f5",
"svgpath": "M10 10h100v100h-100z",
"view": "customers/dashboard",
"langaliases": {
"en": "Customer Dashboard",
"de_DE": "Kunden-Dashboard",
"es_ES": "Panel de Cliente"
},
"mimetype": "application/ixml+xml"
}
}
}

Adding a Standard Weblet​

zeysdk add weblets/quick-note.ixml
{
"weblets": {
"quick-note": {
"name": "Quick Note",
"type": "STANDARD",
"color": "#f54242",
"svgpath": "M5 5h90v90h-90z",
"view": "notes/quick",
"langaliases": {
"en": "Quick Note",
"de_DE": "Schnellnotiz"
},
"mimetype": "application/ixml+xml"
}
}
}