---
title: "SDK Workflow"
description: "Using the ZeyOS SDK for local iXML development, syncing, and snippet validation."
canonical_url: "https://www.zeyos.com/ixml/ixml-guide/development-environment/sdk"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ixml-guide/development-environment/sdk.md"
section: "ixml-guide"
authority: "guide"
language: "en"
source_repository: "zeyos/guide"
source_path: "docs/ixml/03-development-environment/sdk.md"
source_revision: "cce886a8da98cd124ee3644711085bbdcf1a87ce"
---

# SDK Workflow

:::tip Full SDK Reference
For the complete command reference with all options and examples, see the **[ZeyOS SDK Documentation](https://www.zeyos.com/sdk)**.
:::

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

| Command | Purpose | Typical frequency |
|---|---|---|
| `zeysdk create <app-id>` | Create new app scaffold | Once per app |
| `zeysdk link --token <t> --url <u> <instance>` | Bind local app to target instance | Once per instance |
| `zeysdk pull [-f]` | Fetch server state into local app | Before major edits |
| `zeysdk push` | Make the server match local state, including deletions | After verified changes |
| `zeysdk compare` | Inspect local/remote differences | Before sync |
| `zeysdk sync [-f]` | Synchronize local and remote files | Frequently |
| `zeysdk compile <path>` | Compile on the instance without executing | After each change |
| `zeysdk lint [--all]` | Compile registered scripts without executing | Before deployment |
| `zeysdk run --ixml '<snippet>'` | Execute iXML on the instance as console code | When execution is authorized |
| `zeysdk watch` | Watch and auto-sync on file changes | During active development |
| `zeysdk rollout` | Deploy to instances | For 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`](https://www.zeyos.com/ixml/ixml-guide/development-environment/execution-contexts#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](https://www.zeyos.com/ixml/ixml-guide/development-environment/verification-checkpoints): local inspection, remote compilation, deployment, and runtime verification. When something fails, start with [Troubleshooting](https://www.zeyos.com/ixml/ixml-guide/development-environment/troubleshooting). [Minimal App](https://www.zeyos.com/ixml/ixml-guide/development-environment/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.
