# Mender-update programmatic interface

**URL:** https://hub.mender.io/t/mender-update-programmatic-interface/7646
**Category:** General Discussions
**Created:** [March 19, 2025, 5:39am UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646 "2025-03-19T05:39:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![lukehatpadl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lukehatpadl/32/2454_2.png) [@lukehatpadl](https://hub.mender.io/u/lukehatpadl)
#### Post date: [March 19, 2025, 5:39am UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/1 "2025-03-19T05:39:18Z")

</div>

I’m new to Mender so please forgive if this is a FAQ. I’m integrating with a CM4 board using Yocto.

The board is part of an audio product which is not connected to the internet, so we will be using Mender in standalone mode. Firmware updates will be sent over the [OCA](https://en.wikipedia.org/wiki/Open_Control_Architecture) protocol. Is there a programmatic C++ interface to `mender-update` or is my best bet to stash the update image and spawn `mender-update` in a new process?

---

<div class="post-metadata">

### Author: ![lukehatpadl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lukehatpadl/32/2454_2.png) [@lukehatpadl](https://hub.mender.io/u/lukehatpadl)
#### Post date: [March 19, 2025, 8:37pm UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/2 "2025-03-19T20:37:32Z")

</div>

Ah, I see this may have been answered in 2019 [here](https://hub.mender.io/t/c-api-for-mender-client/785). Any changes in the intervening years? What I’m after is not notifications about state transitions, but rather being able to drive the update client from a C++ (well, Swift) daemon.

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [March 20, 2025, 2:11pm UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/3 "2025-03-20T14:11:45Z")

</div>

Hi @lukehatpadl,

Nope, sorry. The state of affairs still is that the client is meant to be used through the CLI API. However, what does “drive the client” mean specifically? Which functionality do you need to control?

Greets,  
Josef

---

<div class="post-metadata">

### Author: ![lukehatpadl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lukehatpadl/32/2454_2.png) [@lukehatpadl](https://hub.mender.io/u/lukehatpadl)
#### Post date: [March 20, 2025, 11:07pm UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/4 "2025-03-20T23:07:04Z")

</div>

Thanks @TheYoctoJester – I didn’t want to do anything with the `mender-update` client that can’t be done with the CLI, I just hoped to have a programmatic interface that I could more easily integrate with our control plane daemon. I ended up just writing a Swift wrapper [here](https://github.com/PADL/MenderUpdateSwiftDriver).

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [March 21, 2025, 8:09am UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/5 "2025-03-21T08:09:53Z")

</div>

Hi @lukehatpadl,

That’s great to hear! Out of curiousity, is said wrapper public? It might be useful to others, even if it is a bit niche.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![lukehatpadl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lukehatpadl/32/2454_2.png) [@lukehatpadl](https://hub.mender.io/u/lukehatpadl)
#### Post date: [March 21, 2025, 9:09am UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/6 "2025-03-21T09:09:21Z")

</div>

Yup, just follow the link [above](https://github.com/PADL/MenderUpdateSwiftDriver). WIP Swift 6 layer is [here](https://github.com/jeremy-prater/meta-swift/pull/7), too (OT).

---

<div class="post-metadata">

### Author: ![lukehatpadl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lukehatpadl/32/2454_2.png) [@lukehatpadl](https://hub.mender.io/u/lukehatpadl)
#### Post date: [January 13, 2026, 1:25am UTC](https://hub.mender.io/t/mender-update-programmatic-interface/7646/7 "2026-01-13T01:25:47Z")

</div>

[MenderSwiftUpdateDriver](https://github.com/PADL/MenderUpdateSwiftDriver) has been updated to fix some bugs, as well as adding a progress callback for tracking installation progress, and parsing log messages into a format which can be logged by the native Swift logging package.
