---
title: "wendy device update"
description: "Update the agent binary and WendyOS on the target device"
---

## Syntax

```sh
wendy device update [flags]
```

## Examples

```sh
wendy device update --help
```

## Arguments

No positional arguments are declared in the command synopsis.

## Flags

Flags below include inherited options. Types and defaults come from the CLI source. An empty default means no value is configured.

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--artifact-url` | string | (empty) | Apply this OS update artifact URL instead of the manifest's latest |
| `--binary` | string | (empty) | Path to a local agent binary to upload (skips download); re-applied after an OS update so it survives the reboot |
| `--device` | string | (empty) | Target device hostname; `wendy run` accepts a comma-separated list to deploy one build to several devices (needs a remote build host and --detach). Defaults to $WENDY_DEVICE, then the saved default device |
| `--json` | bool | `false` | Output in JSON format |
| `--nightly` | bool | `false` | Use the latest nightly (prerelease) build for both the agent and the OS |
| `--pr` | int | `0` | OTA-update the OS to the image built by wendyos-builder PR #N (debug build; mutually exclusive with --artifact-url and --json) |
| `--yes` / `-y` | bool | `false` | Apply an available OS update without prompting |

## Output

Output depends on the operation and selected target. [Command behavior and detailed examples](../../../../advanced/clients/wendy-cli/commands/device/update/).

## JSON output

The global `--json` option requests machine-readable output. The CLI also selects JSON mode when no interactive terminal is attached. Support and payloads are command-specific; this flag does not guarantee a single JSON document for commands that stream logs or invoke build tools. Consult Details before parsing command output.

## Exit codes

The CLI entry point returns `0` on success and for its user-cancelled or default-cleared results. Other returned errors exit with `1` and print a diagnostic to stderr. Some operations may terminate through subprocess or signal handling; do not infer application health from the CLI exit code alone.

## Common errors

Check argument values and flag combinations against the synopsis above. For discovery, build, port, and readiness failures, see [deployment troubleshooting](../../../../errors/). Command-specific constraints are in Details.

## See also

- [wendy device](../../../../reference/cli/device/)
- [CLI conventions and configuration](../../../../reference/)

## Details

Updates the agent binary on the device (downloaded from GitHub, or --binary for a local file), then checks for a newer WendyOS image. When an OS update is available it prompts before applying (default no); use --yes to apply without prompting. Non-interactive runs report the available update without applying it. --nightly selects the nightly channel for both the agent and the OS. --artifact-url applies a specific OS update artifact instead of the manifest's latest; this works over the cloud tunnel (the device downloads the artifact directly from the URL). --pr N applies the OS image built by wendyos-builder PR #N instead of the manifest's latest — an unhardened debug build for testing PRs on hardware; it also works over the cloud tunnel. --pr cannot be combined with --artifact-url or --json. macOS agents receive the signed app-bundle zip (wendy-agent-macos-&lt;arch&gt;.zip) instead of a Linux binary; --binary accepts one of those zips for dev pushes to a Mac agent.

[Command behavior and detailed examples](../../../../advanced/clients/wendy-cli/commands/device/update/)
