SDK
Miblo SDK: your programs and apps on the Miblo screen
The Miblo SDK: the Status API on your computer, the token, page Desk apps (HTML and CSS) and the Desk App Store. TypeScript and Python; nothing leaves your computer.
What it is
The Miblo SDK lets your own programs show up on Miblo: a build script, a data job, a bot that watches a website, an AI tool Miblo does not connect. A program can:
become a session on Miblo Desk, in Miblo Hub and in Miblo Remote (working, needs you, idle or done), with an alert when it needs you;
put a short message on the screen, start a focus session (Pomodoro) or a timer;
draw the App screen, a screen of Miblo's rotation that is all its own: a web page (HTML, CSS and JavaScript) that Miblo Hub draws on the computer and streams to the Miblo Desk, or, the old and deprecated way, a card with numbers, rings, bars and charts and a background image;
become an app: with a name, settings the person fills in Miblo Hub, and Miblo taking care of running it. Miblo's official apps (Processor, Bitcoin and Crypto and the ones each release brings) are exactly that.
The SDK does status and nothing else. It does not approve, reply or start tasks in your AI tools, and nothing in it turns those on. It is Miblo's rule: it shows, it never interferes.
There are two packages with the same API: @miblo/status for Node.js 20+ (TypeScript, typed, no dependencies) and miblo-status for Python 3.9+ (standard library only), both at version 2.x. Any other language can speak the same protocol: it is all in the reference.
How it works
The Miblo bridge is the Miblo process already running on your computer: it talks to your AI tools, to Miblo Desk and to Miblo Remote. It opens the Status API (SDK 2.x) on
127.0.0.1:47821only, your own machine.Your program talks to the bridge over local HTTP, with a status-only token you hand to it (
miblo sdk token). Every request carries a single-use challenge signed with HMAC-SHA256, and every answer comes back signed: the program knows it talked to Miblo, and the bridge knows the program holds the token.The bridge checks everything (sizes, limits, Miblo's reserved phrases) and passes it on to Miblo Desk over your local network, with its pairing, and to Miblo Hub and Miblo Remote along with the status they already get (end-to-end encrypted in Miblo Remote).
The Miblo Desk paints. For a page Desk app (Miblo 1.45), Miblo Hub renders the page on the computer and sends what changed; the old-style cards, frames and animations are also drawn by Miblo Hub since 1.45, and an image is converted on the computer before it goes.
The token
The token (miblo_sdk_ + 64 hex characters) is separate from the bridge key: it only reaches the /sdk/v1/* routes. With it a program shows status; it cannot read commands, prompts, files, costs or anything of Miblo+, cannot approve anything and cannot change Miblo Desk's settings. If it leaks (a CI log, a shared script), the leak is limited to status, and miblo sdk token --rotate ends it.
Get the token in a terminal (miblo sdk token) or in Miblo Hub → Programs (SDK). The details are in Install.
What you can do
| I want to... | Use | Page |
|---|---|---|
| Show my script is running and get alerted when it needs me | session(), needsYou(), done() | Sessions and status |
| Put a message, a focus session or a timer on Miblo Desk | say(), focus(), timer() | Sessions and status |
| Know who is working and who needs me | snapshot() | Sessions and status |
| Draw a screen of my own, with HTML and CSS | screen.page(), screen.data() | Page Desk apps |
| Draw a screen of my own with a card (deprecated) | screen.card(), screen.layer() | The App screen |
| Have settings the person fills in Miblo Hub | app.declare(), app.settings | Apps and settings |
| Read the person's Google or Microsoft data (a calendar, a YouTube channel) | app.connect | Apps and settings |
| Say that something happened, with no screen | alerts.send() | Alert-only apps |
| Let Miblo keep my program running | miblo apps add | Install |
| Publish my app to the Desk App Store | miblo.ai/apps | Publish to the Desk App Store |
Where to start
Install the package and get the token, then run your first program (10 lines).
Read Sessions and status for alerts, and Page Desk apps to draw.
Want other people to use it? Make it an app, try it in the simulator and publish it.
Versions
Use SDK 2.x. Since Miblo 1.30.0 every request says which SDK API it speaks, and the bridge accepts API 2 and newer: an SDK 1.x gets
upgradeon its first call. The routes are still/sdk/v1/*.What needs what:
| You use | Needs |
|---|---|
| SDK 2.x: sessions, messages, the App screen, apps, alerts | Miblo 1.30.0 or newer on the computer, and on Miblo Desk if you have one (an older gadget is only told to update) |
An app that reads the person's AI sessions (sessions: true) | Miblo 1.34.0 or newer |
A page Desk app (display: "page", app API 4 or 5) | Miblo 1.45 on the computer (1.46 for API 5) and firmware 1.45.0 on the Miblo Desk |
If the SDK is newer than Miblo on the computer, the SDK says
bridge_outdated: runmiblo update. If Miblo needs a newer SDK, it saysupgrade: install the latest from Install.Within an API level fields are only ever added. A change that would break a program raises the level, and the error above tells the program what to update.
What each SDK version brought is in What's new in the SDK.
The packages come only from miblo.ai (they are not on npm or PyPI), with an Ed25519 signature next to each file.