Developer documentation
API Reference
All app-facing APIs currently exposed to plugins: transform helpers, command context, selector methods, actions, hooks, bus methods, and core commands.
api.ui in transformApp(app, api)
Use these while building the app definition. They mutate the JSON UI tree and return true when the target was found.
| Method | Use | Example |
|---|---|---|
findById(root, id) | Read a node from the app tree. | api.ui.findById(app, "rightPanel") |
append(root, parentId, child) | Add a child at the end of a container. | api.ui.append(app, "rightPanel", card) |
prepend(root, parentId, child) | Add a child at the start of a container. | api.ui.prepend(app, "pluginList", item) |
insertBefore(root, targetId, child) | Place a node before another node. | api.ui.insertBefore(app, "sendButton", button) |
insertAfter(root, targetId, child) | Place a node after another node. | api.ui.insertAfter(app, "sendButton", button) |
insertAtIndex(root, parentId, index, child) | Insert at a specific child index. | api.ui.insertAtIndex(app, "rightPanel", 0, card) |
replace(root, id, replacement) | Replace a node in the app tree. | api.ui.replace(app, "rightPanel", panel) |
replaceAtIndex(root, parentId, index, child) | Replace a child by index. | api.ui.replaceAtIndex(app, "tabs", 1, tab) |
remove(root, id) | Remove a node from the app tree. | api.ui.remove(app, "oldPluginCard") |
setProps(root, id, props) | Merge properties onto a node. | api.ui.setProps(app, "sendButton", { text: "RUN" }) |
wrap(root, targetId, wrapper) | Wrap an existing node in a container. | api.ui.wrap(app, "bodyEditor", { type: "card" }) |
unwrap(root, wrapperId) | Remove a wrapper and keep its first child. | api.ui.unwrap(app, "bodyEditorWrapper") |
ctx in commands
| Property or method | Use |
|---|---|
ctx.request | The active request object: name, method, url, headers, body. |
ctx.responseBody | The latest response body string when available. |
ctx.response / ctx.responseJson | The latest response object with statusCode, headers, and body. |
ctx.payload | Payload passed by a button/action/recorded click. |
ctx.file | File object from pickTextFile: name and text. |
ctx.pluginData | All persisted plugin data. |
ctx.getPluginData(key, fallback) | Read a persisted value. |
ctx.setPluginData(key, value) | Write persisted plugin data and trigger refresh. |
ctx.dollar(selector) | Select visible app/plugin nodes and read, update, click, or mutate them. |
ctx.bus | Read/write shared plugin bus values and channels. |
ctx.media | Create media permission, camera preview, and audio recording actions. |
ctx.bluetooth | Create Bluetooth/BLE actions for permissions, status, scan, connect, services, read, and write. |
platform.run actions | Call app-managed platform APIs for system info, network, files, clipboard, secure storage, mail/SMS/phone launchers, calendar/contact files, Android snapshots, and Windows diagnostics. |
Core commands
| Command | What it does |
|---|---|
core.request.send, request.send, requests.send | Send the active request. |
core.request.sendButton | Send the active request via the same command path as the Send button. |
core.request.new | Create a new request. |
core.request.saveToCollection | Save the active request to the current collection. |
core.collection.new | Create a new collection. |
core.save | Save app state. |
core.headers.addButton | Add a header row. Accepts payload { key, value }. |
core.body.addButton | Add a JSON body field. Accepts payload { key, value }. |
core.plugin.upload | Open plugin upload. |
core.plugin.scanDirectoryPicker | Pick and scan a plugin directory. |
core.plugin.scanDirectory | Scan a provided directory path. |
core.plugin.installFromPath | Install a scanned plugin by path. |
core.plugin.installSample | Install bundled critical/sample plugins. |
core.pluginBus.inspect | Store a plugin bus snapshot in pluginBusInspector. |
core.pluginBus.clearTrace | Clear bus trace history. |
ui.remove, ui.hide, ui.show, ui.setText, ui.setValue, ui.setProps, ui.addClass, ui.removeClass | Renderer UI commands. Pass the actual action fields in payload. |