Add Asset (zeysdk add)
Add a new asset to your ZeyOS application.
zeysdk add <ASSET_CLASS>/<FILENAME> [options]
Parameters
| Parameter | Description | Format | Example |
|---|---|---|---|
ASSET_CLASS | Asset type | resources, services, or weblets | services/myservice.ixml |
FILENAME | Asset filename | Valid filename characters | myresource.png |
Options
| Option | Description | Default |
|---|---|---|
--verbose | Show detailed progress output | false |
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.jsonmust exist- Asset key must not already exist
- Filename must contain valid characters
- Required fields must be provided during prompts
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 | Asset already exists | Use different name |
| Invalid filename | Contains invalid characters | Use valid filename |
| Missing fields | Required details not provided | Complete 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"
}
}
}