For AI agents
Build a live dashboard from an agent
Hand your agent the board's edit link — that's the only credential it needs. It declares the whole board in one idempotent call, keeps it live by widget key, checks the design with the lint endpoint and hands back an embeddable URL. Plain Markdown for agents: /llms.txt · /llms-full.txt · OpenAPI
Recommended instructions for your AI
›
A suggestion, not a requirement: paste this into CLAUDE.md, .cursor/rules or ChatGPT's custom instructions, and your assistant will build charts-first boards with actions — without you explaining InstantGUI each time.
## InstantGUI dashboards (recommended instructions — paste into CLAUDE.md, .cursor/rules or custom instructions) When I ask for a dashboard, status page or "a UI for this", publish it to InstantGUI (https:/ / instant-gui.com): - If I give you an edit link (…/ b/ <board>/ join? key=<edit key>), use the edit key as "Authorization: Bearer <edit key>". Otherwise create a board: POST / api/ v1/ boards and give me its editLink. - Declare the whole board in one call: PUT / api/ v1/ boards/ <board>/ spec (idempotent; include layout). Then push live values with POST / api/ v1/ boards/ <board>/ widgets/ <key>. - Charts and numbers over text: kpi/ stats/ gauge for numbers, line for trends, bar for comparisons, status for health, log for events; at most ONE short markdown headline. - Add the actions I'd want next (pause/ restart/ run now) as actions/ button/ toggle widgets, wired to a webhook, the Connector or my script; no buttons that do nothing. - Check GET / api/ v1/ boards/ <board>/ lint and fix every warning before telling me it's done. - For a website/ iframe: POST / api/ v1/ boards/ <board>/ view-tokens and use the returned embedUrl. - For lists I open and act on (issues, orders, jobs): records in a dataset (PUT / api/ v1/ boards/ <board>/ datasets/ <name>), a table with source + filters, a record widget for the details, row actions for Retry/ Cancel. Start from the "issues" template. Docs: https:/ / instant-gui.com/ llms.txt
Quickstart (curl)
›
- Credential. Use the edit key from the edit link you were given (
/b/<board>/join?key=<edit key>) — or create a board:
curl -s -X POST https://instant-gui.com/api/v1/boards -H 'Content-Type: application/json' -d '{"title":"Shop live"}'
# → {"board":{"id":"<board>",…},"editLink":"…/b/<board>/join?key=<edit key>","writeToken":"igw_…"}
Every API call accepts either credential: Authorization: Bearer <edit key or write token>.
Deleting a board needs the edit key: DELETE /api/v1/boards/<board> with the write token answers 403 and the board stays.
Need the write token (for scripts/devices) from an edit key? curl -s -X POST https://instant-gui.com/api/v1/boards/<board>/token -H 'Authorization: Bearer <edit key>' ({"rotate":true} issues a new one).
Rotate a leaked key (edit key or owner session; the old one stops at once): POST /api/v1/boards/<board>/edit-key/rotate (new edit key + link), POST …/write-token/rotate, POST …/view-tokens/<tokenId>/rotate (same label/permissions, new embed URL).
- Declare the whole board in ONE idempotent call (create/update/move widgets, rename the board;
"prune": truedeletes widgets not listed):
curl -s -X PUT https://instant-gui.com/api/v1/boards/<board>/spec -H 'Authorization: Bearer <credential>' -H 'Content-Type: application/json' -d @spec.json
# → {"ok":true,"created":[…],"updated":[…],"unchanged":[…],"deleted":[],"hints":[…],"lint":{…},"urls":{…}}
Before replacing a board, add ?dryRun=1 (MCP apply_board_spec dryRun: true) to see {added, changed, removed, hints} without writing anything; each changed widget carries changes (e.g. ["title","layout"]: title, layout, style, thresholds, data, visibility, source), the plain reasons it is listed.
Boards created from a template hold SAMPLE values until you push: the create and PUT /spec responses list them in sampleWidgets (key + push call); never report those values as live. On PUT /spec send brief (MCP apply_board_spec brief: true) to get a short reply: the summary, sampleWidgets, hints and urls without board, pages or widgets.
Button tone is one of default | success | warning | danger | info (anything else, e.g. "primary", is a 422 that lists these).
Read hints in the response: an ignored-key hint names a key the spec dropped ({"dashboard": …} must be sent unwrapped); the spec is still applied. Others flag defaults that change behaviour — controls are editor-only unless config.viewersCanUse: true, a number with decimals: 0 shows rounded, overlapping layouts. A gauge's colour thresholds default to the range: amber above 70% and red above 90% of min–max (max: 10 gives 7 and 9); send thresholds: [] for none.
Data field by type (data is what a spec or push sends; any other key is a 422): kpi: {value, previous, history, points} · stats: {items} · gauge: {value} · progress: {value, label, marker} · status: {services} · indicator: {status, label} · button: {presses, lastPressedAt, handled} · actions: {lastAction, lastAt, lastResult, counts, selected, states, run} · toggle: {on} · slider: {value} · input: {value, submittedAt} · select: {value} · form: {count, lastSubmittedAt}.
spec.json:
{
"title": "Shop live",
"prune": true,
"widgets": [
{
"key": "headline",
"type": "markdown",
"layout": {
"x": 0,
"y": 0,
"w": 12,
"h": 2
},
"data": {
"text": "**Sales are up 12% today.** Ads paused at 14:05 by Dana."
}
},
{
"key": "revenue",
"type": "kpi",
"title": "Revenue today",
"layout": {
"x": 0,
"y": 2,
"w": 3,
"h": 3
},
"config": {
"prefix": "$",
"icon": "wallet"
},
"data": {
"value": 4820
}
},
{
"key": "orders",
"type": "kpi",
"title": "Orders today",
"layout": {
"x": 3,
"y": 2,
"w": 3,
"h": 3
},
"config": {
"icon": "shopping-cart"
},
"data": {
"value": 131
}
},
{
"key": "conversion",
"type": "gauge",
"title": "Conversion",
"layout": {
"x": 6,
"y": 2,
"w": 3,
"h": 3
},
"config": {
"max": 10,
"suffix": "%",
"decimals": 1
},
"data": {
"value": 3.4
}
},
{
"key": "ads",
"type": "actions",
"title": "Ad campaign",
"layout": {
"x": 9,
"y": 2,
"w": 3,
"h": 3
},
"config": {
"buttons": [
{
"id": "pause",
"label": "Pause ads",
"tone": "danger"
},
{
"id": "resume",
"label": "Resume ads",
"tone": "success"
}
]
}
},
{
"key": "revenue-trend",
"type": "line",
"title": "Revenue per day ($)",
"layout": {
"x": 0,
"y": 5,
"w": 8,
"h": 5
},
"data": {
"series": [
{
"name": "revenue",
"points": [
[
"2026-10-08",
4100
],
[
"2026-10-09",
4390
],
[
"2026-10-10",
4820
]
]
}
]
}
},
{
"key": "channels",
"type": "pie",
"title": "Orders by channel",
"layout": {
"x": 8,
"y": 5,
"w": 4,
"h": 5
},
"data": {
"slices": [
{
"name": "Organic",
"value": 61
},
{
"name": "Ads",
"value": 44
},
{
"name": "Email",
"value": 26
}
]
}
},
{
"key": "health",
"type": "status",
"title": "Systems",
"layout": {
"x": 0,
"y": 10,
"w": 4,
"h": 4
},
"data": {
"services": [
{
"name": "Checkout",
"status": "up"
},
{
"name": "Payments",
"status": "up"
}
]
}
},
{
"key": "orders-log",
"type": "log",
"title": "Recent orders",
"layout": {
"x": 4,
"y": 10,
"w": 8,
"h": 4
},
"data": {
"entries": [
{
"t": 1760000000000,
"text": "#1045 · $129.00 · Organic",
"level": "success"
}
]
}
}
]
}
Keep it live (decide before you finish)
- The data is at a URL the board can reach (a public JSON API, or one that takes an API key in a header): give the widget a
fetch. The board fetches it itself, everyeveryseconds while someone has it open and at least every 5 minutes when nobody does. No script, no server, nothing to install on the user's machine.
{"key":"btc","type":"kpi","title":"Bitcoin (USD)","layout":{"x":0,"y":0,"w":4,"h":3},"config":{"prefix":"$","decimals":2},"fetch":{"url":"https://api.coinbase.com/v2/prices/BTC-USD/spot","every":300,"map":{"value":"data.amount"}}}
{"key":"btc-trend","type":"line","title":"Bitcoin over time (USD)","layout":{"x":4,"y":0,"w":8,"h":5},"fetch":{"url":"https://api.coinbase.com/v2/prices/BTC-USD/spot","every":300,"map":{"btc":"data.amount"}}}
map is {<widget data field, or for line/log/table the series/row field>: <JSON path in the response, e.g. "data.amount" or "items[0].price"; for a list that reorders pick the item by a field, "items[symbol=BTCUSDT].price", and quote a value with . or ] in it: [name="a.b"]>}. line/log/table append a point/line/row per fetch; other widgets replace their value ("mode": "data"|"append" overrides). An API key goes in "headers": {"Authorization": "Bearer …"}: stored encrypted, sent only to that URL, never returned (put keys there, not in the URL). The PUT /spec response's fetches says whether each fetch worked: fix every "status": "error" before you report done. "fetch": null removes one. every is 10 to 86400 seconds (default 300).
- Rows from a database or API that answers a list of records over HTTP (Supabase/PostgREST, Neon Data API, Airtable, your own JSON endpoint): give the dataset a
fetch; each run replaces its records, and tables, filters and record widgets on that dataset stay current (pathpoints at the list inside the answer; up to 5,000 records, 1 MB per answer;every≥ 60, at least 300 s while nobody has the board open). Use a read-only key and select only the columns the board shows.PUT /specanswersdatasetFetcheswith each one's first result.
{"datasets":[{"name":"orders","key":"id","fetch":{"url":"https://<project>.supabase.co/rest/v1/orders?select=id,customer,status,amount_usd,created_at&order=created_at.desc&limit=500","every":300,"headers":{"apikey":"<read-only key>","Authorization":"Bearer <read-only key>"}}}]}
- Only a machine of the user's can reach the data (a sensor, a database on localhost or a private network, files): use the InstantGUI Connector's
feeds:(<widget key>: {run: <command>, every: <seconds>}) in a file of their own,$HOME/.instantgui/<board>/connect.d/<name>.yml(the folder under theINSTANTGUI_HOMEyou installed with;~/.instantguiis only the default home whenINSTANTGUI_HOMEis unset): it runs the command on a schedule and pushes the output, the same program that runs the board's buttons, so there is no custom service to write. Give the user the install line and the feeds; don't install background jobs on their machine unless they asked for that. https://instant-gui.com/docs/connector.md#feeds - Only you can reach the data (your own connector or tool): push it now and tell the user plainly that the board changes only when something pushes again.
- The events happen in a process that already runs (a bot, a job, a device): push from there when a value changes.
- Which way is good (KPI):
higherIsBetteristrue,falseornull(no direction: the change keeps its arrow and percentage in a neutral colour, never red or green). A KPI with afetchand nohigherIsBetterin its spec getsnull; pushed KPIs default totrue. - Tell the viewer when it stops:
staleAfteris in seconds (0 turns it off), or a string like"90s"/"1m"/"2h"(max 24 h). Once no push arrives within that time the card dims and says "Stale · 45 s ago". One call sets it:curl -s -X POST "https://instant-gui.com/api/v1/boards/<board>/widgets/<key>" -H 'Authorization: Bearer <edit key or write token>' -H 'Content-Type: application/json' -d '{"config":{"staleAfter":60}}'(a bot that pushes every 20 s: 60 is a good value).
Be told when a number crosses a line (no editor needed): add alerts to the spec, or PUT https://instant-gui.com/api/v1/boards/<board>/alerts {"alerts":[…]} / the set_alert MCP tool. notify is {channel:"telegram", botToken, chatId} or {channel:"webhook", url}; field defaults to "value"; optional cooldownSec (default 300) and notifyResolved. To be told when a bot goes quiet, use silentFor (seconds or "15m"/"2h", at least 60 s) instead of op/threshold: {"widget":"balance","silentFor":"15m","notify":{…}} fires when the widget has had no push for that long (never for one that only shows its sample) and clears on the next push. Matched by widget+field+op+threshold, so re-sending changes nothing; a GET shows where it goes, never the token.
{"alerts": [{"widget":"balance","op":"<","threshold":100,"notify":{"channel":"telegram","botToken":"123456:AAH-your-bot-token-from-BotFather-xxxx","chatId":"-1001234567890"}}]}
Forms: people add entries, no script
A form widget saves each submit as a record in a dataset (created on the first submit); a table with source: {dataset} shows them. keyFrom: ["name","$today"] makes a second submit by the same person on the same day (the submitter's day, or timeZone) update their entry; leave it out for one record per submit. set: {"status":"open"} adds fixed fields to every entry. Show only today's entries with where: [{field:"submitted_at", op:"gte", value:{now:"today", tz:"<IANA zone>"}}] ({now:"-7d"} and the like work too). Forms and record-changing actions are editor-only unless config.viewersCanUse is true; on a public board that lets anyone with the link write, so for personal details keep the board private ("visibility":"private"). People outside the team (customers) submit through the form's own public link instead: config.publicLink: true gives /f/
{"key":"standup","type":"form","title":"Today's standup","layout":{"x":0,"y":0,"w":4,"h":"auto"},"config":{"viewersCanUse":true,"dataset":"standups","keyFrom":["name","$today"],"submittedAtField":"submitted_at","fields":[{"name":"name","label":"Name","type":"text","required":true},{"name":"today","label":"Today","type":"textarea","required":true},{"name":"blockers","label":"Blockers","type":"textarea"}]}}
{"key":"entries","type":"table","title":"Today's entries","layout":{"x":4,"y":0,"w":8,"h":7},"config":{"source":{"dataset":"standups","where":[{"field":"submitted_at","op":"gte","value":{"now":"today","tz":"Asia/Jerusalem"}}],"sort":[{"field":"submitted_at","dir":"desc"}]},"columns":[{"field":"name"},{"field":"today","wrap":true},{"field":"blockers","wrap":true},{"field":"submitted_at","label":"When","format":"ago"}]}}
Hear about new entries: set the form's config.webhookUrl (https; editors with a verified email or the owner) and each submit POSTs {"event":"form.entry","entry":{…}} to it — a Slack/Zapier/Make hook turns that into a message or an email. Or set config.notify ({"channel":"telegram","botToken":…,"chatId":…} or {"channel":"email","email":<your verified address>}) for one line per entry — "New entry in
MCP
›
Remote MCP server at https://instant-gui.com/api/mcp. Every client receives the design rules on connect. Tools: apply_board_spec, push_data, update_widget_layout, update_board, lint_board, get_write_token, create_view_token, get_design_guide, create_board, get_board, dataset_put, dataset_upsert, dataset_query, list_actions, trigger_action. Pass the edit key (or the whole edit link) as write_token.
{
"mcpServers": {
"instantgui": {
"url": "https:/ / instant-gui.com/ api/ mcp"
}
}
}Calling it with plain HTTP? Send both Content-Type: application/json and Accept: application/json, text/event-stream — without that Accept header the server answers 406 and names the missing header. The reply is a server-sent event: a line 'event: message' followed by a line starting 'data: ' that holds the JSON-RPC response; read the JSON from that data line.
curl -X POST https:// instant-gui.com/ api/ mcp \ -H "Content-Type: application/ json" \ -H "Accept: application/ json, text/ event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/ list"}'
Design guide
›
A board is read in 3 seconds on a phone. Show, don't tell. Every rule below is checked by GET /api/v1/boards/<board>/lint. On a phone every widget becomes full width in one column, ordered by y then x. Put the widget the owner needs first at the smallest y and x; w only matters on wider screens. The lint reply's phoneOrder lists the widget keys in that order.
Pick the widget by the question
| The user asks… | Use |
|---|---|
| "How much / how many right now?" | kpi (one number + trend) or stats (2–6 numbers in a row) |
| "How full / how close to the limit?" | gauge (dial) or progress (bar toward a goal) |
| "How is it changing?" | line — append one point per update |
| "Which is bigger?" | bar |
| "What's the split?" | pie (≤ 6 slices) |
| "Is it healthy?" | status (several services) or indicator (one light) |
| "What just happened?" | log (append lines) or timeline |
| "What do I do now?" | actions / button / toggle / slider / input / select |
| "Which items need me? Open one, act on it" (issues, orders, jobs) | a dataset + table with source + filters + record + row actions — see "Internal tools" (/docs#internal-tools) |
| "Let people send us entries" (standups, requests, sign-ups, check-ins) | a form (saves each submit as a record in a dataset, no script) + a table with source: {dataset} |
| "Why?" (context) | ONE markdown headline, ≤ 2 sentences |
Rules
- Numbers and charts, not prose. At most one markdown widget: a headline of ≤ 2 sentences (≤ 280 characters). Never put numbers, lists or status in text — they each have a widget.
- Most important thing top-left (x 0, y 0). Then group widgets by the question they answer; one page per audience or topic (≤ 16 widgets a page).
- Add the actions the viewer would want next, wired to something that handles them (a button nothing handles is worse than none; a board that only shows
fetched data needs none): Restart, Pause, Resume, Run now, Acknowledge, Refresh. An on/off state (paused, maintenance) is a toggle in the actions widget, not two buttons:config.toggles: [{"id":"paused","label":"Paused","on":"pause-all","off":"resume-all"}]+ push the real state asdata.states: {"paused": true}. A toggle whose ON state is bad (a safety stop, an outage flag) gets"onTone": "danger"so it turns red when on. A pick-one-or-more set (focus list, filter) is a chip set: buttons +data.selected: ["<button id>", …]— selected chips are filled with a check andaria-pressed="true", the rest neutral; push the real selection after each change (a click only sends the button's action). Never show a selection only by colour or a ✓ in the label. A click reaches you three ways: the InstantGUI Connector runs a command on the user's machine (/docs/connector), a webhook (config.webhookUrl, https) gets a POST, or your script reads it back (GET …/widgets/<key>→data.lastAction/data.on/data.value). To drive a real service (pause an ad campaign, restart a job) with no machine of your own: pointconfig.webhookUrlat a small relay that holds the service's API key (Zapier, Make, n8n or Pipedream catch-hook, or a serverless function) — InstantGUI posts{"event":"widget.interaction","widget":{"key","type"},"data":{"on":false}}with no custom headers or secrets, so the relay readsdata.onand calls the ad API (pause when false, resume when true); then push the real state back (PUT …/widgets/<key>data.on) so the switch never claims more than the service did. Controls are editor-only by default (the human's edit link); setconfig.viewersCanUse: trueonly if anyone with the view link may press them. - Trends beat snapshots. If a number changes over time, also keep a
lineof it (append a point each update). Don't put numeric tables where a bar/line chart works. - Title every widget with what it answers and the unit: "Revenue today ($)", "p95 latency (ms)". Put units in kpi
prefix/suffix, not in the title AND the value. - Color means state: use thresholds (kpi/gauge
thresholds; a gauge without them turns amber above 70% and red above 90% of its min–max range, somax: 10alone gives 7 and 9 — sendthresholds: []for none) andstatuslevels up/degraded/down — not decoration. Green = fine, amber = look, red = act. - Mobile-first layout. 12-column grid, rows ≈ 52 px. Phones (≤ 640 px) stack widgets in reading order (y, then x). Good sizes: kpi w 3 h 3 · stats w 6–12 h 2 · charts w ≥ 6 h ≥ 4 · status/log w 4–6 h 4–6 · actions w 3–4 h 2–3 · headline w 12 h 2.
- Update cadence: push when the value changes, at most every few seconds per widget; append to charts/logs instead of rewriting them; send the full spec again only when the board's structure changes (the spec is idempotent, so re-sending it is safe — in a spec,
dataof streams like line/log/table only seeds a new widget and never wipes what you appended). - Stable keys: lowercase, short, meaningful (
revenue,orders-log). Your scripts push by key forever. - Who can write. Forms and record-changing actions are editor-only unless config.viewersCanUse is true; on a public board that lets anyone with the link write, so for personal details keep the board private ("visibility":"private"). People outside the team (customers) submit through the form's own public link instead: config.publicLink: true gives /f/
/ - Use the same labels across widgets so they cross-filter. Clicking a bar, pie slice, line or a text cell in a table filters the page by that value (a chip bar shows it; click again, ✕ or Esc clears): charts highlight the matching category/series/slice, tables and logs narrow to rows/lines containing it, other widgets are untouched. It works only when values match exactly (case-insensitive) — name bar categories, pie slices and table cells the same ("North", not "north region").
Anti-patterns (the lint flags these)
- Walls of text, several markdown widgets, or a markdown "report" of numbers.
- A table of numbers where a chart would answer at a glance.
- 20+ widgets on one page; widgets 1–2 columns wide; charts < 3 rows tall.
- No actions: a dashboard you can only look at.
- Hundreds of rows pushed into a table (it shows 300): put them in a dataset and set the table's
source. - Leaving sample data in widgets.
Internal tools: datasets, drill-down, filters and row actions
›
For anything with more than a screenful of rows, or rows people open and act on (issues, orders, jobs, customers):
keep the records in a dataset, show them in a table with source, narrow them with a filters widget, open
one in a record widget, and put row/record actions on them: set actions change the record themselves (no
Connector, no script), other actions run a command through the Connector. Start from the
issues template (POST /api/v1/boards {"template":"issues"}) to see all of it working.
1. Datasets: up to 5,000 keyed records outside any widget
# Create the dataset or replace all its records (keys you don't send are deleted). "key" names the field that identifies a record.
curl -s -X PUT https://instant-gui.com/api/v1/boards/<board>/datasets/issues -H 'Authorization: Bearer <credential>' -H 'Content-Type: application/json' -d '{"key":"id","records":[{"id":"ISS-104","title":"Checkout button overlaps the total on small phones","project":"shop","status":"failed","severity":"high","attempts":2,"updated_at":"2026-10-16T11:00:00.000Z","summary":"The **Pay** button sits on top of the order total below 380 px.\n\n- Reproduced on a 360×800 viewport\n- Fix attempt 2 failed a visual test","history":[{"at":"2026-10-15T06:00:00.000Z","text":"Reported by a customer","tone":"info"},{"at":"2026-10-16T07:00:00.000Z","text":"Fix attempt 1 reverted (visual test failed)","tone":"danger"},{"at":"2026-10-16T11:00:00.000Z","text":"Fix attempt 2 failed: build error","tone":"danger"}]},{"id":"ISS-102","title":"Search ignores accents (café ≠ cafe)","project":"shop","status":"queued","severity":"low","attempts":0,"updated_at":"2026-10-16T06:00:00.000Z","summary":"Searching *cafe* does not find *Café Noir*.","history":[{"at":"2026-10-16T04:00:00.000Z","text":"Queued for a fix","tone":"info"}]},{"id":"ISS-100","title":"Order emails show UTC times","project":"shop","status":"fixed","severity":"low","attempts":1,"updated_at":"2026-10-15T10:00:00.000Z","summary":"Times now use the shop time zone.","history":[{"at":"2026-10-13T14:00:00.000Z","text":"Reported","tone":"info"},{"at":"2026-10-15T10:00:00.000Z","text":"Fixed and deployed","tone":"success"}]}]}'
# → {"ok":true,"dataset":"issues","key":"id","version":…,"records":3,"added":3,"changed":true,…}
# Add or replace whole records by key, delete others — only what you send changes
curl -s -X POST https://instant-gui.com/api/v1/boards/<board>/datasets/issues/records -H 'Authorization: Bearer <credential>' -H 'Content-Type: application/json' -d '{"upsert":[{"id":"ISS-105","title":"Coupon field accepts expired codes","project":"shop","status":"queued","severity":"medium","attempts":0,"updated_at":"2026-10-16T11:30:00.000Z","summary":"Expired codes apply at checkout and fail at payment.","history":[{"at":"2026-10-16T11:30:00.000Z","text":"Queued for a fix","tone":"info"}]}],"delete":["ISS-100"]}'
# Query it the way a table does: where (AND), sort, search, offset/limit (≤ 200), facet counts
curl -s -X POST https://instant-gui.com/api/v1/boards/<board>/datasets/issues/query -H 'Authorization: Bearer <credential>' -H 'Content-Type: application/json' -d '{"where":[{"field":"status","op":"in","value":["failed","queued","running"]}],"sort":[{"field":"updated_at","dir":"desc"}],"limit":20,"facets":[{"id":"failed","where":[{"field":"status","op":"eq","value":"failed"}]},{"id":"shop","where":[{"field":"project","op":"eq","value":"shop"}]}]}'
# → {"ok":true,"records":[{"id":"ISS-105",…},{"id":"ISS-104",…},{"id":"ISS-102",…}],"total":3,"facets":{"failed":1,"shop":3},"version":…}
# One record · the dataset's schema and size (?keys=1 lists its keys) · every dataset on the board
curl -s https://instant-gui.com/api/v1/boards/<board>/datasets/issues/records/ISS-104 -H 'Authorization: Bearer <credential>'
curl -s https://instant-gui.com/api/v1/boards/<board>/datasets/issues -H 'Authorization: Bearer <credential>'
curl -s https://instant-gui.com/api/v1/boards/<board>/datasets -H 'Authorization: Bearer <credential>'
- Limits: 5,000 records and 4 MB per dataset, 32 KB per record, 50 datasets and 16 MB per board (1 MB on a board
without an account). A request body is ≤ 500 KB: send bigger datasets as several
/recordsupserts. - Writes are idempotent (unchanged records aren't rewritten). Every change pings open boards, which re-query.
- The write token or the edit key works; viewers read through the board's own access (
/api/boards/<board>/datasets/<name>/query). - Clauses:
{field, op: eq|neq|in|nin|contains|gte|lte|set|unset, value};valuemay be{"now":"-7d"}or{"param":"status"}(a page param; the clause is skipped while the param is unset). On list fields, eq/in match any element. - MCP:
dataset_put,dataset_upsert,dataset_query.
2. Pages, params and links
- Spec pages take
slug(URL name),hidden(no tab; reached by links) andparams: [{name, default?}]— the per-viewer state a page reads from its URL:/b/<board>?page=issues&p.status=failed&p.issue=ISS-104. - A link is a Nav:
{"page":"issues","params":{"issue":"{{id}}"},"keep":["status"]}—{{field}}fills from the row,keepcarries those current params over, every other param is dropped;nullclears one. - Widget
"when": {"param":"issue"}(set) /{"param":"issue","is":"unset"}/{"param":"status","is":"failed"}/{"screen":"narrow"|"wide"}; a list means all must hold;{"any":[clause, …]}means at least one must hold (OR). Hidden widgets leave no gap — so a list (when issue is unset) and a record (when it's set) share the page: the list on the way in, the detail after a tap, Back to return. Side by side on wide screens, detail-only on phones: give the filters and the list"when": {"any":[{"screen":"wide"},{"param":"issue","is":"unset"}]}. "layout": {"h": "auto"}fits a widget to its content (no inner scroll, no empty band) — use it for filters, records and tables with Load more. The storedhis only the size before the first measurement, never a minimum.- Templated links:
{{field}}inserts a value URL-encoded ("href":"https://x.test/i/{{id}}");{{url:field}}inserts a field that holds a whole http(s)/mailto URL as is ("href":"{{url:site_url}}") — anything else (javascript:, data:, relative) drops the link. - Also links: KPI
config.link, statsitems[].link, markdown[Failed](ig:issues?status=failed).
3. Tables (v2)
config.source: {dataset, where?, sort?, limit? (≤ 200 a page, Load more for the next), filters?: ["<filters key>"], search?, searchFields?}; columns: [{field, label?, format?, tones?, href?|nav?, hidden?, align?, wrap?, maxChars?, decimals?, currency?, unit?}] with formats text, number, pill, pills (lists), dot, link, ago, datetime, date, duration
(ms; unit:"s"), currency, percent, code. view: "auto" turns the table into a list ({leading?, title, badges?, meta?, trailing?}) under 640 px. rowLink (a Nav) makes each row a link; expand: {fields, param?} opens details
inline; moreLink: {label, nav}; empty. Inline data.rows tables use the same columns/formats.
4. Filters
{"type":"filters","config":{param, mode: chips|segmented|nav, default?, options:[{id, label, where?, nav?}], counts?: {dataset}, combineWith?: ["<other filters key>"]}} — picking an option sets ?p.<param>=<id>; tables that list
the widget in source.filters AND its where into their query. counts shows how many records each option matches
(narrowed by the filters in combineWith). mode: "nav" is a row of page links (nav per option).
5. Record (detail view)
{"type":"record","config":{dataset, keyParam:"issue", titleField, subtitle:"{{project}} · {{ago:updated_at}}", pills, links, back, sections:[{kind: kv|prose|stats|list|events, title?, fields?|field, item?, when?}], actions, toggles, notFound}} shows the record whose key is in ?p.<keyParam> (empty state while unset).
6. Row and record actions
Change the record with no Connector: give the action set: {<field>: <value>} (a value may be "$now" or
"$by"). Pressing it updates that record in the dataset on the server and the row shows "✓ when so Acknowledge disappears once it's acknowledged. This is how a tracker's Acknowledge / Resolve / Assign
to me / Archive should work when nothing else needs to happen:
{"rowActions":[{"id":"ack","label":"Acknowledge","tone":"warning","when":[{"field":"status","op":"eq","value":"open"}],"set":{"status":"acknowledged","owner":"$by","acked_at":"$now"}},{"id":"resolve","label":"Resolve","tone":"success","confirm":true,"when":[{"field":"status","op":"in","value":["open","acknowledged"]}],"set":{"status":"resolved","resolved_at":"$now"}}]}
Press one from code like any action: POST /api/v1/boards/<board>/actions {"action":"incidents/ack","value":"<record key>"}
answers "status":"done" at once (MCP trigger_action).
New records from people: add a form widget on the same dataset (e.g. "Report an incident" with set: {"status":"open"}); each submit adds a record, no script.
Run a command: actions without set go to the Connector.
Table rowActions and record actions: {id, label, tone, confirm?, when?: [clauses], set?}; record toggles:
{id, label, field, on, off, disabledWhen?, disabledNote?}. A tap sends <widget key>/<action id> with the
record's key as $INSTANTGUI_VALUE; the server re-reads the record and refuses it when when fails or the key is
gone. The row shows "Sending… → ✓ done / ✗ failed". Editors only unless viewersCanUse: true (or an embed token
with canUseControls). In connect.yml write each action as a block, guard the value with value: '<regex>', and put
confirm only on the widget action:
actions:
issues-list/retry: # "Retry" on a table row: the row's id is $INSTANTGUI_VALUE
run: ~/bin/retry-issue "$INSTANTGUI_VALUE"
value: '^ISS-[0-9]{1,6}$' # any other value is refused before the command runs
issue/retry: # the same button on the record (detail) view
run: ~/bin/retry-issue "$INSTANTGUI_VALUE"
value: '^ISS-[0-9]{1,6}$'
issue/cancel: # confirm: true is on the widget action — don't repeat it here
run: ~/bin/cancel-issue "$INSTANTGUI_VALUE"
value: '^ISS-[0-9]{1,6}$'
# Press "Retry" on ISS-104 as the editor (the Connector runs: ~/bin/retry-issue "ISS-104")
curl -s -X POST https://instant-gui.com/api/v1/boards/<board>/actions -H 'Authorization: Bearer <credential>' -H 'Content-Type: application/json' -d '{"action":"issues-list/retry","value":"ISS-104"}'
# → 202 {"ok":true,"event":{"id":"<event id>","action":"issues-list/retry","status":"pending"},…} with a connector online
# (without one: a button of an actions widget ("<widget key>/<button id>") is recorded and its webhook called → 200 {"recorded":true,…};
# other actions 404 "This board has no connector online with actions…"). Read the result: GET …/actions?events=<event id> → events[0].result is {ok, output, exitCode, durationMs} once status is done/failed
The whole tracker in one spec
# tracker.json is the board below; the spec declares the dataset's schema, never its records
curl -s -X PUT https://instant-gui.com/api/v1/boards/<board>/spec -H 'Authorization: Bearer <credential>' -H 'Content-Type: application/json' -d @tracker.json
{"title":"Issue tracker","prune":true,"datasets":[{"name":"issues","key":"id","fields":{"id":{"type":"text","label":"Issue"},"title":{"type":"text","label":"Title"},"project":{"type":"text","label":"Project"},"status":{"type":"text","label":"Status"},"severity":{"type":"text","label":"Severity"},"attempts":{"type":"number","label":"Attempts"},"updated_at":{"type":"time","label":"Updated"},"history":{"type":"list","label":"History"}}}],"pages":[{"title":"Issues","slug":"issues","params":[{"name":"status"},{"name":"project"},{"name":"issue"}],"widgets":[{"key":"summary","type":"stats","layout":{"x":0,"y":0,"w":12,"h":2},"when":{"param":"issue","is":"unset"},"data":{"items":[{"label":"Open","value":4,"link":{"page":"issues","params":{"status":"open"}}},{"label":"Failed","value":2,"tone":"danger","link":{"page":"issues","params":{"status":"failed"}}},{"label":"Fixed","value":3,"tone":"success","link":{"page":"issues","params":{"status":"fixed"}}}]}},{"key":"issue-status","type":"filters","layout":{"x":0,"y":2,"w":8,"h":"auto"},"when":{"param":"issue","is":"unset"},"config":{"title":"Status","param":"status","default":"open","options":[{"id":"open","label":"Open","where":[{"field":"status","op":"in","value":["failed","queued","running"]}]},{"id":"failed","label":"Failed","where":[{"field":"status","op":"eq","value":"failed"}]},{"id":"fixed","label":"Fixed","where":[{"field":"status","op":"eq","value":"fixed"}]},{"id":"all","label":"All"}],"counts":{"dataset":"issues"},"combineWith":["issue-project"]}},{"key":"issue-project","type":"filters","layout":{"x":8,"y":2,"w":4,"h":"auto"},"when":{"param":"issue","is":"unset"},"config":{"title":"Project","param":"project","mode":"segmented","options":[{"id":"all","label":"All"},{"id":"shop","label":"Shop","where":[{"field":"project","op":"eq","value":"shop"}]},{"id":"api","label":"API","where":[{"field":"project","op":"eq","value":"api"}]}],"counts":{"dataset":"issues"},"combineWith":["issue-status"]}},{"key":"issues-list","type":"table","layout":{"x":0,"y":4,"w":8,"h":"auto"},"when":{"param":"issue","is":"unset"},"config":{"title":"Issues","source":{"dataset":"issues","filters":["issue-status","issue-project"],"sort":[{"field":"updated_at","dir":"desc"}],"limit":20,"search":true,"searchFields":["title","id","project"]},"view":"auto","columns":[{"field":"id","label":"Issue","format":"code"},{"field":"title","label":"Title","maxChars":80},{"field":"status","label":"Status","format":"pill","tones":{"failed":"danger","queued":"warning","running":"info","fixed":"success"}},{"field":"severity","label":"Severity","format":"dot","tones":{"high":"danger","medium":"warning","low":"info"}},{"field":"project","label":"Project"},{"field":"updated_at","label":"Updated","format":"ago"}],"list":{"leading":"severity","title":"title","badges":["status"],"meta":["project","updated_at"]},"rowLink":{"page":"issues","params":{"issue":"{{id}}"},"keep":["status","project"]},"rowActions":[{"id":"retry","label":"Retry","tone":"warning","when":[{"field":"status","op":"eq","value":"failed"}]}],"empty":"No issues match these filters"}},{"key":"by-project","type":"bar","layout":{"x":8,"y":4,"w":4,"h":5},"when":{"param":"issue","is":"unset"},"config":{"title":"Issues by project","horizontal":true,"stacked":true,"showValues":true},"data":{"categories":["shop","api"],"series":[{"name":"Open","values":[2,2]},{"name":"Fixed","values":[2,1]}]}},{"key":"issue","type":"record","layout":{"x":0,"y":20,"w":12,"h":"auto"},"when":{"param":"issue"},"config":{"dataset":"issues","keyParam":"issue","titleField":"title","subtitle":"{{project}} · {{id}} · updated {{ago:updated_at}}","pills":[{"field":"status","format":"pill","tones":{"failed":"danger","queued":"warning","running":"info","fixed":"success"}},{"field":"severity","format":"pill","tones":{"high":"danger","medium":"warning","low":"info"}}],"links":[{"label":"Open PR","field":"pr_url"}],"back":{"label":"All issues"},"sections":[{"kind":"stats","fields":[{"field":"attempts","label":"Attempts","format":"number"},{"field":"duration_ms","label":"Last run","format":"duration"}]},{"title":"What happened","kind":"prose","field":"summary"},{"title":"Details","kind":"kv","fields":[{"field":"project","label":"Project"},{"field":"opened_at","label":"Opened","format":"datetime"},{"field":"sha","label":"Commit","format":"code"}]},{"title":"History","kind":"events","field":"history","item":{"title":"text","time":"at","tone":"tone"}}],"actions":[{"id":"retry","label":"Retry","tone":"warning","when":[{"field":"status","op":"eq","value":"failed"}]},{"id":"cancel","label":"Cancel","tone":"danger","confirm":true,"when":[{"field":"status","op":"eq","value":"queued"}]}],"notFound":"This issue is gone — it may have been closed."}}]}]}
Embed it in your own app with routes (/issues/:issue ↔ ?p.issue=): see "Embed navigation" in https://instant-gui.com/docs#embed-routes.