Skip to main content
View Markdown

SDK Workflow

Full SDK Reference

For the complete command reference with all options and examples, see the ZeyOS SDK Documentation.

The ZeyOS SDK (zeysdk) is a command-line tool for developing, testing, and deploying ZeyOS applications locally. It provides a structured workflow for managing application code, synchronizing with ZeyOS instances, and validating iXML snippets.

Command reference​

CommandPurposeTypical frequency
zeysdk create <app-id>Create new app scaffoldOnce per app
zeysdk link --token <t> --url <u> <instance>Bind local app to target instanceOnce per instance
zeysdk pull [-f]Fetch server state into local appBefore major edits
zeysdk pushMake the server match local state, including deletionsAfter verified changes
zeysdk compareInspect local/remote differencesBefore sync
zeysdk sync [-f]Synchronize local and remote filesFrequently
zeysdk compile <path>Compile on the instance without executingAfter each change
zeysdk lint [--all]Compile registered scripts without executingBefore deployment
zeysdk run --ixml '<snippet>'Execute iXML on the instance as console codeWhen execution is authorized
zeysdk watchWatch and auto-sync on file changesDuring active development
zeysdk rolloutDeploy to instancesFor releases

First-time setup​

Bash
mkdir -p myproject
cd myproject
zeysdk create myapp --name "My App"
cd myapp
zeysdk link --token <token> --url <url> <instanceId>
zeysdk pull -f

Use this once, then keep the app linked for all future development.

Daily development loop​

Bash
zeysdk compare
zeysdk sync
zeysdk run --ixml '<output>ok</output>'

Recommended order:

  1. compare first to understand drift between local and remote.
  2. sync only after reviewing expected changes.
  3. run while editing to test snippets on a sandbox, when execution is authorized. Effects are real.

Snippet validation​

Use zeysdk run --ixml for fast feedback on any iXML code:

Bash
zeysdk run --ixml '<set var="name">iXML</set><output>Hello $name</output>'

The command returns runtime diagnostics including load time, execution time, memory usage, output size, and the output payload or any parser/runtime errors. If this fails, fix parser or language assumptions before modifying service files.

zeysdk run is console execution with application globals. It has no session, no AUTH, and no inbound request, so it does not show how a weblet or service route behaves. See zeysdk run. To check syntax without executing, use zeysdk compile.

Conflict and safety guidelines​

  • pull -f can overwrite local files — use with caution.
  • sync can create conflict situations if both local and remote changed.
  • compare is mandatory before any destructive or broad sync decision.
  • A whole-project push deletes server assets that have no local copy. Preview it with zeysdk push --dry-run. --keep-remote protects only remote-only assets with no sync baseline, and --force skips the prompt without adding any authorization.
  • SDK requests time out after 30 seconds by default. A timeout does not show that the server stopped, so check the effects before you retry.

Verify your work​

Follow the four Verification Checkpoints: local inspection, remote compilation, deployment, and runtime verification. When something fails, start with Troubleshooting. Minimal App is a complete example to start from.

Common mistakes​

  • Skipping compare and assuming only local changes exist.
  • Testing only at the end of a large editing session.
  • Ignoring runtime error details that already explain the fix.