A page can fetch its own data. Give it named sources, and Legato calls each one on a schedule and fills the cards from the answer. You don't need to write Swift, change the app or keep an agent running: once the page is written, it stays current by itself.
In the page file
"sources": { "repo": { "url": "https://api.github.com/repos/…", "every": "1h" } }, "cards": [ { "type": "stat", "label": "Stars", "source": { "ref": "repo", "map": { "value": "stargazers_count" } } }, { "type": "stat", "label": "Forks", "source": { "ref": "repo", "map": { "value": "forks_count" } } } ]In Legato
Stars2,847↗ +12Forks1,203
repo is the connection, each card’s ref picks it, and each map takes a different field from the same answer.A source can be an internet API such as GitHub or Tessie, a service on your network such as Pi-hole or Home Assistant, or this Mac's own calendars and reminders. Cards on a page with sources can also carry buttons that call the same service: pause ad blocking, lock the car, tick off a task. The page files, the answers and your secrets stay on the Mac; requests go only to the services the page names.
An agent can write a page like this as easily as one with fixed values: ask it for a page that keeps itself up to date. A page can mix both, sourced cards next to cards with values written in.
Start here
- Try an API and previewA whole page that reads a public API with no key, and a way to see a source's answer before it starts polling.
- Worked examplesPages to copy from, including a feed and a service that takes several requests.
Set up a source
- Source fields and loadingEvery field of a source and of a card's
source, and which APIs fit. - Signing in and requestsHow the secret reaches the service, and the methods, bodies and answer formats a source can use.
- SecretsAPI keys in the Mac's Keychain or 1Password, each tied to one host.
- Polling and failuresWhen a source refreshes, what its cards show when a fetch fails, and how it backs off.
- Calendar and RemindersThis Mac's events and tasks as sources, with no API at all.
- TroubleshootingWhat to check when a page is missing or a card shows an error.