Develop and Release an App
Develop in the IronFlock cloud, on a device you may develop on. The development run (DEV) is separate from the installed release (PROD). Building DEV replaces the previous development run; it leaves PROD unchanged. Appliances run released apps but do not offer app development or release builds.
Choose Where the Code Comes From
- Cloud IDE: open the app and edit its working copy. A development build without
branchorcommituses the API key owner’s working copy, including uncommitted edits. - Your own computer: connect the app’s main repository to an external Git repository in Studio, clone it locally, and push your changes. The platform builds the pushed
branchorcommit; it cannot read unpushed files on your computer. See Git Integration.
IronFlock’s internal Git service is reachable from the cloud IDE only. get_app_repository or GET /apps/:app_key/repository shows where the main repository is and whether your account has an IDE working copy, without exposing credentials.
Prepare Access
For REST or MCP development, use a key with apps:read, apps:develop and logs:read, restricted to the app or the intended projects. The account needs VIEW_CODE on the app and DEVELOP on the build device. MCP’s list_my_apps and list_dev_devices help find the app and a permitted device without a broad device-list scope. The CLI also reads devices, so give it devices:read for its device lookup.
Create and configure the key as described in Authentication. Keep it outside the repository. Claude Code started in an app’s cloud IDE folder receives an app-restricted development key from the IDE session; that key does not grant release publishing. To publish a version, use a key with releases:publish and an account with RELEASE on the app. Installing or updating the release needs apps:write.
Build and Inspect
All REST paths below start with https://api.ironflock.com/v1/ironflock. Replace the example app and device keys with your own.
curl -X POST https://api.ironflock.com/v1/ironflock/apps/55/dev-builds \
-H "Authorization: Bearer $IRONFLOCK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"device_key":17,"branch":"feature/gauge","wait":300}'Omit branch to use the IDE working copy, or replace it with commit to build a pushed commit. Do not send both. wait is 0–600 seconds, default 60. The device must be online. The MCP equivalent is build_dev_app with the same arguments and app_key.
Inspect the returned state and error. HTTP 200 can contain state: FAILED. When the build is still BUILDING, it continues after the call returns. Read its record with get_build, or GET /apps/55/builds/:build_key; list_builds and GET /apps/55/builds list recent records. Failed builds retain their error and output tail. Records expire after 30 days.
From a checkout on your computer, the CLI combines build, start and log reading:
ironflock app dev --app 55 --device 17 --branch feature/gaugeIt does not push for you. A failed build prints its error and output tail and exits 1. App Commands describes source selection and timeouts.
Start DEV and Read Its Log
A successful API development build is stopped. Start it with set_app_state using stage: DEV, or:
curl -X PUT https://api.ironflock.com/v1/ironflock/devices/17/apps/55 \
-H "Authorization: Bearer $IRONFLOCK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"manually_requested_state":"RUNNING","stage":"DEV"}'
curl -H "Authorization: Bearer $IRONFLOCK_API_KEY" \
'https://api.ironflock.com/v1/ironflock/swarms/12/app-logs?app_key=55&device_keys=17&stage=DEV&tail=50'get_app_logs and check_app_status accept the same stage selection over MCP. Omission means PROD, so always name DEV when inspecting the development run. To stop it, send state PRESENT with stage: DEV; that also cancels a development build in progress.
DEV parameter values come from .ironflock/env-template.yml in the working copy. Change the defaults and rebuild. set_app_parameters and the REST parameters route change PROD only.
Release, Install and Roll Back
Push the branch you intend to release. A release build uses the repository, not uncommitted IDE files. With the release-capable key:
ironflock app release --app 55 --device 17 --branch main \
--version 1.2.0 --notes "Improves the gauge"The command explains the release and asks before proceeding. Over MCP use create_release; over REST use POST /apps/55/releases with device_key, version, optional description and branch. REST defaults to master when no branch is given; pass the intended branch explicitly. A release build produces the architecture of its build device.
Read the release with list_releases or get_release. cancel_release stops an unfinished release build; edit_release replaces its notes after the build. Releasing does not install the app on your devices and does not make a private app public. Store visibility is a separate set_app_visibility operation.
ironflock app install --app 55 --device 17
ironflock app update --project 12 --app line_monitor --device 17 --version 1.2.0
# Go back to a known version if needed:
ironflock app update --project 12 --app line_monitor --device 17 --version 1.1.0An update restarts the app. The selected version must exist, not be deleted, and have a release for each target’s architecture. Check partial failures before retrying. REST and MCP can also update an entire group or project; see Update to a Version.