# Pages

A page is one screen of the panel: a title, an optional icon and up to 24 [cards](https://legatobar.com/docs/cards.md). Most pages have a row in the sidebar, and a [detail page](https://legatobar.com/docs/detail-pages.md) sits behind a card's link. Each page is a JSON file on your Mac, named after its id, so the page `budget` is `budget.json` in `~/Library/Application Support/Legato/Pages`.

Whatever writes the file decides what the page says. That can be an agent over [MCP](https://legatobar.com/docs/mcp.md), a script with `legato set`, or any program that saves JSON into the folder. A page can also name [sources](https://legatobar.com/docs/sources.md), and Legato then fetches its data on a schedule.

Legato watches the folder and loads a page within a second of a save. A file with a mistake stays in the sidebar as a page that says what's wrong.

## Write a page

- [Writing and versions](https://legatobar.com/docs/page-writing.md): The page id, the three ways to write the file, and versions for when two writers share a page.
- [Loading and status files](https://legatobar.com/docs/page-loading.md): How Legato picks up a saved file, and the status file that says whether it loaded.

## In the panel

- [Page behavior](https://legatobar.com/docs/page-behavior.md): The updated time in the footer, pinning the panel open, Shortcuts actions and a page's Details.

## Arranging pages

- [Periods](https://legatobar.com/docs/periods.md): A row for choosing Week, Month or Year, which the page's cards follow.
- [Detail pages and params](https://legatobar.com/docs/detail-pages.md): Pages behind a card's link, and one page file that serves every item of a list.
- [Sections and collections](https://legatobar.com/docs/sections.md): Grouping pages in the sidebar, and separate sets of them.

## Design

- [Page design](https://legatobar.com/docs/design.md): The design language Legato's own service pages follow.
- [Icons](https://legatobar.com/docs/icons.md): Page icons are SF Symbols, and where to find names.


---

# Writing and versions

A page is one row in the Legato panel's sidebar: a title, an optional icon and an ordered list of [cards](https://legatobar.com/docs/cards.md). Each page is a JSON file on your Mac, in `~/Library/Application Support/Legato/Pages`. An agent writes it through Legato's [MCP server](https://legatobar.com/docs/mcp.md), a script writes it with the `legato` command, or any program writes the file itself. Legato shows it as soon as the file is saved. Pages and their data never leave the Mac.

```json
{
  "$schema": "./.schemas/page.schema.json",
  "title": "Homelab",
  "icon": "server.rack",
  "cards": [
    { "id": "nas", "type": "status", "label": "NAS", "state": "ok", "detail": "41% used" },
    { "id": "wan", "type": "stat", "label": "WAN down", "value": 912, "unit": "Mbps" }
  ]
}
```

| Key | | |
| --- | --- | --- |
| `title` | required | 1–60 characters. The page's name in the sidebar. |
| `title_from` | optional | A name for the panel's title row from a source's answer, such as the item a page with params shows: `{ "ref": "kuma", "value": rule }`. `title` stays the page's name, and shows until the source answers. See [Titled by its item](https://legatobar.com/docs/detail-pages.md#titled-by-its-item). |
| `cards` | required | 1 to 24 cards, top to bottom. A [`tabs`](https://legatobar.com/docs/card-text.md#tabs) card counts as one, and the cards in its tabs don't, up to 120 cards on the page in all. Each needs a unique `id` and a `type`. |
| `icon` | optional | An SF Symbol name, like `server.rack`. Lowercase words separated by dots, up to 64 characters. A name the Mac doesn't have shows a generic icon; see [Icons](https://legatobar.com/docs/icons.md) for where to find names. |
| `sources` | optional | Named sources Legato fetches on a schedule to fill cards: an API on the internet or your network, this Mac's calendars or reminders. See [Sources](https://legatobar.com/docs/sources.md) and [Buttons](https://legatobar.com/docs/buttons.md). |
| `notify` | optional | A macOS notification from this page: `{ "id": "deploy-142", "title": "Deploy finished", "body": "v2.15 is live." }`. Each `id` shows once; write a new one to notify again. See [Notifications](https://legatobar.com/docs/notifications.md#the-notify-field). |
| `sidebar` | optional | `false` makes it a [detail page](https://legatobar.com/docs/detail-pages.md#detail-pages), reached from other pages' links rather than the sidebar. Default `true`. |
| `$schema` | optional | Where an editor finds the page schema, for suggestions and checking as you type. See [The schema](https://legatobar.com/docs/page-writing.md#the-schema). |
| `schema_version` | optional | `1`, or left out. |

Any other top-level key, `light` included, stops the page loading, and Legato shows what's wrong in its place. A file is at most 1 MB.

## The page id

A page's id is its file name without `.json`: `homelab.json` is the page `homelab`. A new page's id is 1–64 lowercase letters, digits and hyphens, starting with a letter or digit (`budget`, `deals-electronics`). Card ids may also use `_`; page ids may not.

Legato loads every file in the folder whose name ends in `.json` and doesn't start with a dot, so a file you named some other way still shows, and the `legato` tools can still read, replace and delete it. Renaming the file changes the page's id.

## Writing a page

Every write replaces the whole page. There's no partial update: a card you leave out is gone. Build the whole page from your current data each time and write it.

There are three ways to write one, and they all end in the same file.

### From an agent, over MCP

The `legato` command inside the app is also an MCP server: `legato mcp`. [Connect an agent](https://legatobar.com/docs/connect-agent.md) to it, and the agent writes pages with these tools:

| Tool | Does |
| --- | --- |
| `set_page` | Creates or replaces a whole page. Its arguments are `page_id`, the page's keys (`title`, `icon`, `cards`, `sources`, `notify`) and an optional `if_match`. |
| `get_page` | One page, with its version and whether Legato loaded it. |
| `list_pages` | Every page in the folder, without its cards. |
| `delete_page` | Moves a page's file to the Trash. Takes `if_match`. |
| `get_page_schema` | The JSON Schema for `page`, `sources`, `notify`, one card type, or the shared `rules` and `actions`. With no part, the list of parts and every card type's fields. |

### From a script, with `legato`

The same tool is a command for scripts, at `/Applications/Legato.app/Contents/Helpers/legato`:

```bash
legato set homelab homelab.json        # or pipe the page in: … | legato set homelab
legato get homelab
legato list
legato delete homelab
legato schema stat                     # page, sources, period, params, notify, title_from or a card type
```

`--if-match <version>` on `set` or `delete` acts only if the page is still at that version; see [Versions and if-match](https://legatobar.com/docs/page-writing.md#versions-and-if-match). Answers are JSON on standard output. A refusal is `{"error": {"code", "message", "details"}}` with exit status 1.

### What `set` and `set_page` do

1. Check the id and validate the complete page with Legato's file parser, without opening the panel or running sources: the page itself, and each card's source and buttons. An invalid page returns `invalid_page` before any file changes.
2. Write the file whole: to a temporary file in the folder, then renamed into place, so Legato never reads half a page. The tool writes the page in its own layout, keys in a fixed order and pretty-printed, with its own `$schema` line first.
3. Open Legato in the background if it isn't running.
4. Wait for Legato to load the page: up to 4 seconds, or 10 if Legato had to be opened.
5. Report whether Legato loaded those exact bytes. If a different running build rejects them, return `load_failed` with `saved: "true"`; the tool never rolls back over another save.

The answer says what happened:

```json
{
  "id": "homelab",
  "version": "3f9c2a7b1d0e4c58",
  "changed": true,
  "created": false,
  "loaded": { "ok": true, "loaded_at": "2026-10-27T21:15:02.118Z" }
}
```

`changed` is `false` when the page is exactly what was there. Writing the same page again is harmless: the file is saved again, so the page's [update time](https://legatobar.com/docs/page-behavior.md#how-old-a-page-is) moves on, and nothing else changes. So a script can write on a schedule without checking whether anything changed.

`loaded` is `null` when Legato didn't confirm in time, with a `note`: "Legato hasn't confirmed loading it yet; get_page shows its status", or, when Legato isn't running, "it loads the page when it opens". When the trial has ended and there's no license, the page is saved but not shown, and `loaded.plan` is `"locked"`; see [Trial and license](https://legatobar.com/docs/license.md).

A refused write looks like this; the page stays as it was:

```json
{ "error": { "code": "invalid_page", "message": "homelab.json: /cards/1: a stat card needs label",
             "details": { "page": "homelab", "saved": "false" } } }
```

### Any program, writing the file

A page is only a file, so anything that can write JSON can make one. Write to a temporary file in the Pages folder whose name starts with a dot or doesn't end in `.json` (`.homelab.json.tmp`, `homelab.json.tmp`), then rename it to `homelab.json`. Legato ignores the temporary file and loads the renamed one once. Writing the final name directly works too, but Legato may read it half-written and show an error until the next save.

To find out whether Legato took it, read its [status file](https://legatobar.com/docs/page-loading.md#status-files).

## Layout in the window

Without one, a page's cards flow down columns: a column for every 376 points of window, the cards in order down the first and on into the next. A page that wants its cards in a particular place, such as a home page with a wide chart and a table across the bottom, says where in `layout`:

```json
"layout": { "type": "grid", "max_width": 1600, "rows": [
  { "cells": [ { "cards": ["worth"], "weight": 2 }, { "cards": ["month", "pace"] } ] },
  { "cells": [ { "cards": ["attention"] }, { "cards": ["review"] }, { "cards": ["upcoming"] } ] },
  { "cells": [ { "cards": ["recent"] } ] } ] }
```

- **Rows** of 1 to 4 **cells**, up to 12 rows. A cell holds 1 to 6 cards, one under another, and its `weight` (1–4, default 1) is its share of the row: `2` beside `1` is two thirds.
- **Every card** the page draws is placed exactly once. Cards in a [tab](https://legatobar.com/docs/card-text.md#tabs) stay in their tab, and cards in Details stay there. A page with a layout has no [headings](https://legatobar.com/docs/sections.md).
- **`cards` stays the reading order.** A window too narrow for two cells side by side shows the cards in that order, one under another, so put them in the order you'd read them on a laptop.
- **Narrower windows:** a row whose cells can't each have their least width (about 300 points for most cards and for a columns chart, 420 for other charts, maps, heat maps and tiles, and 600 for a table) breaks into pairs, then one cell to a line.
- **A card that isn't showing** (its source's `when`) leaves its cell, and the cells left share the row.
- **`max_width`** (600–4000, default 1600) is the widest the cards get; a wider window centres them.
- **`look`**: `cards` (the default) draws each card on its own surface. `sheet` draws the page as one plain sheet with no card surfaces. The page's name is large at the top, each card's name is bold over a thin rule, money in has a + sign instead of green, and only an amount over budget is red. On a sheet, a list whose rows have buttons shows a box before each of those rows. Clicking the row opens it where it is, with its buttons underneath.

## Cards or a sheet

Without a layout, the window draws a page on cards or as a sheet. A page that's mostly lists goes on a sheet: more than half the cards drawn on the page are lists, checklists, agendas, timelines or tables, or tabs that hold only those. Headings and Details's cards don't count. Any other page goes on cards. `"look": "cards"` or `"look": "sheet"` on the page decides it instead, and a layout's own `look` wins over both. On a sheet, a card with a `fill` or a `tone` keeps its own coloured surface.

## The sidebar's count

`"sidebar_count": "todo"` names one of the page's cards. The sidebar then shows how many rows that card has beside the page's name, as Things counts a list: a list's items, a checklist's items still to do (all of them for a switch list), a table's rows, or an agenda's, timeline's or fleet's items. The count is grey, takes the page's status colour while the page lights, and isn't shown at 0 or while the card is hidden.

## Versions and if-match

Every page has a `version`: the first 16 hex characters of the SHA-256 of the file's bytes, such as `3f9c2a7b1d0e4c58`. `set`, `get` and `list` report it. A page that hasn't changed keeps its version; any edit, by an agent, a script or a person in an editor, gives it a new one.

To write only if the page is still at the version you last read, pass that version: `if_match` in the MCP tools, `--if-match` on the command line. If the file has changed since, the write is refused and nothing is saved:

```json
{ "error": { "code": "version_mismatch",
             "message": "The page has changed since that version; read it again before replacing it.",
             "details": { "current_version": "a01d77e9c3b2f640" } } }
```

`current_version` is `"none"` when the page no longer exists. Read the page again, rebuild it, and retry with the new version. `delete` takes it too.

To create a page only if there's no page with that id yet, pass `none` as the version. A script that adds pages then can't replace one someone made in the meantime.

Most agents don't need this: one agent owns a page and rewrites it whole. It matters when two runs might overlap, or when a person edits the file by hand and an agent shouldn't undo that.

## Reading pages back

`get_page` (`legato get`) returns the page as it is on disk, without its `$schema` line, with its version, when the file was last modified, and its load status:

```json
{
  "id": "homelab",
  "version": "3f9c2a7b1d0e4c58",
  "modified": "2026-10-27T21:15:02.104Z",
  "page": { "title": "Homelab", "icon": "server.rack", "cards": [ … ] },
  "status": { "ok": true, "loaded_at": "2026-10-27T21:15:02.118Z" }
}
```

A file that isn't valid JSON comes back as `text` instead of `page`, so you can see what's in it. `status` is `null` when Legato hasn't loaded the file yet.

`list_pages` (`legato list`) lists the folder in Legato's order, by file name:

```json
{
  "folder": "/Users/you/Library/Application Support/Legato/Pages",
  "pages": [
    { "id": "homelab", "name": "Uptime", "title": "Homelab", "version": "3f9c2a7b1d0e4c58",
      "modified": "2026-10-27T21:15:02.104Z", "ok": true }
  ]
}
```

`name` is the page's name in the sidebar: the one you gave it there, or its `title` (never a [`title_from`](https://legatobar.com/docs/detail-pages.md#titled-by-its-item) name, which changes with the answer). A page Legato couldn't use has `ok: false` and its `error`; a page that's locked has `plan: "locked"`.

## Deleting a page

`delete_page` (`legato delete`) moves the page's file to the Trash, and the panel drops it at once. Put it back from the Trash to restore it.

```json
{ "id": "deals-tv", "deleted": true, "note": "Moved to the Trash; put it back from there to restore it." }
```

A page that isn't there gets `not_found`. Deleting the file any other way does the same.

You don't need to delete a page because nothing has updated it lately; its footer already shows how long ago that was. Delete pages that no longer mean anything, like a deal that ended.

The person at the Mac has the last word. Right-clicking a page in the sidebar offers **Delete Page…**, which moves its file to the Trash too, with any detail pages (`"sidebar": false`) that only it leads to, so none is left stranded. The question names them. A page in the sidebar is never deleted along with another, and neither is a detail page another page still links to. `legato delete` and `delete_page` delete only the page they name. An agent that writes the page again creates it again: if someone keeps deleting your page, stop writing it. Renaming a page in the sidebar, moving it into a section or turning its notifications off doesn't change the file.

## The schema

The page schema is JSON Schema (draft-07) for a whole page: its keys, its sources and every card type, with each field's limits. Legato installs it in the Pages folder, at `.schemas/page.schema.json`, each time it starts, so an editor that supports JSON Schema (VS Code, for one) gives suggestions and flags mistakes as you type, offline. Point a page at it with:

```json
"$schema": "./.schemas/page.schema.json"
```

Older pages that say `./.schemas/local-page.schema.json` still work. The same schema is published at [legatobar.com/schemas/page.schema.json](https://legatobar.com/schemas/page.schema.json), and `get_page_schema` (`legato schema`) serves it in parts. For a page you keep elsewhere, download it and point `$schema` at your copy.

The schema can't know what an API answers, so it can't tell whether a source's mapping picks the right data; the [Source Preview](https://legatobar.com/docs/source-preview.md#preview-before-polling) can.

## Errors

The tools refuse with these codes, in the same `{"error": {"code", "message", "details"}}` shape:

| Code | Means |
| --- | --- |
| `invalid_page` | The page has a key it can't, no `title` or no cards, isn't a JSON object, or Legato's parser found a mistake. The message says which. Nothing was written. |
| `load_failed` | The page was saved, but the running Legato, from a different build than the tool, couldn't load it. Reopen Legato. |
| `validation_unavailable` | The tool couldn't run Legato's page check; nothing was written. Reinstall Legato. |
| `invalid_page_id` | The id isn't a page id, or a new page's id isn't lowercase letters, digits and hyphens. |
| `too_large` | The page is larger than 1 MB. |
| `version_mismatch` | The page isn't at the `if_match` version. `details.current_version` says where it is. |
| `not_found` | There's no page with that id. |
| `write_failed`, `delete_failed` | The file couldn't be saved or moved to the Trash; the message says why. |
| `schema_unavailable` | The schema isn't installed yet. Open Legato once. |
| `unknown_part` | `get_page_schema` was asked for a part it doesn't have; the message lists them. |
| `invalid_arguments` | A command was missing its page id or file, or `--if-match` its version. |

See [Errors](https://legatobar.com/docs/errors.md) for handling them in an agent.



---

# Loading and status files

## How Legato loads a page

Legato watches the Pages folder and loads a page within a second of a change: a new file, a save, a rename or a removal. It also looks over the folder every 15 seconds, in case a change notice never arrives. Hidden files, and names that don't end in `.json`, are ignored.

Legato checks each page when it loads it. A page with a mistake is never dropped quietly: it stays in the sidebar, titled with its file name and a warning icon, with one card, **Can't read this page**, that says what's wrong, such as `homelab.json: not valid JSON` or `homelab.json: cards must list 1 to 24 cards`. Fix the file and save it, and the page comes back.

A mistake inside one card's [source](https://legatobar.com/docs/sources.md) or [buttons](https://legatobar.com/docs/buttons.md) is smaller: that card alone shows a warning that says what's wrong, and the rest of the page works.

Legato checks what it needs to draw each card: its type, its required fields and the kind of each value. It doesn't check every limit the [schema](https://legatobar.com/docs/page-writing.md#the-schema) sets, such as a label's length, or catch a misspelled optional field, which it ignores. Use the schema in an editor, or `get_page_schema`, to catch those.

## Status files

Each time it reads a page file, Legato writes that page's status to `Pages/.status/<id>.json`, so a script that writes a page file can tell whether Legato accepted it. `get_page` and `list_pages` read the same files.

```json
{ "error": null, "loadedAt": "2026-10-27T21:15:02.118Z", "ok": true, "page": "local:homelab", "version": "3f2a9c41d07be815" }
```

| Field | Meaning |
| --- | --- |
| `ok` | `true` when the page loaded. `false` when Legato can't use the file; the panel then shows **Can't read this page**. |
| `error` | `null`, or why the file can't be used: the same message the panel shows. |
| `loadedAt` | When Legato last read this page's file, in ISO 8601 UTC with milliseconds. A status is written again when its file changes, when a trial or license starts or ends, or after Legato couldn't write it or read its file. A file that can't be read keeps its last good read and is tried again at each check. |
| `version` | Which bytes the status is about: the first 16 hex characters of the SHA-256 of the file Legato read, the same version `legato get` reports. Wait for the `version` of what you wrote before reading `ok`; a different one means another save came after yours. |
| `page` | Legato's own name for the page: `local:` and the page id. |
| `plan` | Only when the trial has ended without a license: `"locked"`. The page loaded, and shows again once there's a license. |

`ok` describes the page as a whole: a card whose source or buttons are wrong still has its own warning in the panel. A status is removed with its page file. Statuses are written only while Legato is running. The `.status` folder is readable only by your user account, and Legato never writes through a symbolic link in it.



---

# Page behavior

## How old a page is

Every page's footer says when it was last updated: "Updated 3 minutes ago". For a page with sources, that's the newest answer any of its sources gave; otherwise it's when its file was last saved. Pages never expire or grey out. If whatever writes a page stops, the footer simply keeps counting, so a page that says "updated 2 days ago" tells you its writer has gone quiet.

Every write counts, changed or not, so an agent that writes the same page on a schedule keeps the footer current. `get_page` and `list_pages` report the file's `modified` time.

**Show update times** in Settings → General hides the time, and pointing at the footer still shows it. Each page can also set its own: right-click it → **Show Update Time** → **Always**, **Never**, or only after 1 hour, 1 day, 2 days or 1 week without an update, so a page that's gone quiet says so and a busy one stays tidy.

## Keeping the panel open

The panel closes when you click another app, as a menu does. To keep a page in view while you work, click the pin at the top right of the panel (⌘P). Pinned, the panel stays open when you click elsewhere, floating over other windows, and opens pinned next time. Clicking Legato's menu bar icon or pressing Escape still closes it. Click the pin again to go back to closing like a menu.

On a page with sources, the arrow left of the pin reads them all again now (⌘R). A service that asked Legato to wait before its next request still gets that wait.

## Shortcuts

Legato adds four actions to the Shortcuts app. Search the action list for Legato to find them. They reach every page in the panel, detail pages included, and every button under a card.

- **Open Page** opens the panel on a page, as choosing the page in Spotlight does.
- **Page Summary** returns one line built from the page's cards, up to six of them. Charts, links and other cards without a value are left out.
- **Get Card Value** takes a page and one of its cards, and returns the card's value: a number where the card has one, and its text, with the unit and any detail (a pacing card's target, for example). It works on stat, gauge, pacing, breakdown, flow, sparkline, status, countdown and window cards; a flow card's value is everything that flows. A status card gives its state as text (`ok`, `warning`, `critical`, `unknown` or `off`) and no number. A countdown gives the seconds until its moment, negative once it has passed, and a window the seconds until it ends or starts. When a card has no value at the moment, the action stops and says what the card shows instead.
- **Press Button** presses a button as the panel does and returns its result. A button without a [`success`](https://legatobar.com/docs/buttons.md#buttons) check asks before it runs. An [`add-event`](https://legatobar.com/docs/source-calendar.md#calendar-sources) button adds its event without the form.

Open Page brings the panel up; the other three run without it. Siri runs them through a shortcut: ask for the shortcut by its name.

This shortcut opens Packages when something is out for delivery: **Get the value of** Out for delivery **on** Packages, then **If** Card Value **is greater than** 0, **Open** Packages.

<a id="page-info"></a>

## Details

Click the Details button (a bulleted list) at the right of a page's title, beside Refresh (⌘I), or choose **Details** from the page's menu. A card slides in over the page with what the Mac knows about it, and stays until you close it with the same button, ⌘I, Escape or a click outside. Long lists show their first five rows and **Show more**.

The button is always the same grey list: problems reach you as [notifications](https://legatobar.com/docs/notifications.md) and the [Dock badge](https://legatobar.com/docs/notifications.md#the-dock-badge).

- **Health:** the page's [health cards](https://legatobar.com/docs/card-lists.md#in-page-info), first, with all they say: each status card's state and detail, and every item of a fleet under its group. A row with a link opens it. Two switches sit at each card's right. The bell has three settings, and a click moves to the next: plain, the card follows the page's **Notify about**; filled, it notifies about every change, a pause or a switch turned off included; crossed out, it's muted, so it doesn't notify, log activity or count in the Dock badge. The line lets it show in the line under the page's title.
- **Settings:** one list. **Notify about** (Problems, Every change or Nothing), **Mute** (for 1 hour or until tomorrow morning), **Dock badge**, **Line under the title**, **Update time**, **Icon in title** and **Home page**.
- **Sources**, **Buttons pressed** and **Rules** fold to one line each with a count: each source's host (or Calendar or Reminders), how often it fetches, and when it last answered with the secret it uses (by name, never the value), or what went wrong; each button pressed on this Mac and how many times; each rule and when it last ran.
- **Recent activity**, below, open to begin with.
- Last, when the page file changed, with icons that show it in Finder and copy the page as a prompt.

With the Claude desktop app, ChatGPT's Codex or Grok Bot installed, **Discuss in Claude**, **Discuss in Codex** and **Discuss in Grok Bot** in the same menu open a chat about the page, its message box filled with a prompt that names the page and its file. Codex opens the Pages folder as the chat's workspace, and asks you to trust it the first time. Grok Bot puts the prompt in its main chat (keeping a message you haven't sent) and takes up to 1,000 characters, so a card's prompt there names the card rather than carrying its data.

Nothing is sent until you send it. **Assistants** in Settings → General turns off the ones you don't use, here and in every Discuss menu.

To talk about one card, right-click it: in Claude and Codex, the prompt carries the page and its file, the card in a line, its current data as Legato has it, and the source that fills it and any problem with it. A section title brings the cards under it. It's all in the message box to read and change before you send it.

**Copy as Prompt**, beside them in a card's right-click menu and the page's menu, and the copy icon at the bottom of the Details card, puts the same prompt on the clipboard instead, with the card's data whichever app you paste it into. It's there even when none of these apps is installed.

## Recent activity

Near the bottom of a page's [Details](https://legatobar.com/docs/page-behavior.md#page-info) is **Recent activity**: each time one of the page's cards went from one level to another over the last 7 days, newest first. The cards counted are the ones [notifications](https://legatobar.com/docs/notifications.md) follow: a `status` card's `state`, the band a `gauge`'s value is in, and each `fleet` item. An entry looks like "API · Warning → Critical · 2:14 PM". `unknown`, and a gauge value outside every band, don't count. The first level Legato sees for a card isn't a change, so a page starts with no activity.

The Mac records this itself, whatever the page's notification setting: only each card's `id` and levels and the time, up to 50 changes per page. **Recent activity** in Settings → General turns it off, which also clears it. Keep a card's `id` the same from write to write, or its history starts over.

## Welcome pages

Legato comes with starter pages, in a **Welcome** section of the sidebar. **Welcome to Legato** comes first and links to the others, and to a playlist to listen to while you look around. The rest open only from its lists, not the sidebar: **Your first page** adds Service status or RSS Feeds from a template (neither needs a key), shows the command that connects Claude Code or Codex, what an agent can do, and how a page stays up to date. **Navigating Legato** shows pages, sections, collections and how to get around, with a short moving picture for each. **Notifications** explains notifications and muting a collection. **Secrets and lists** shows where keys and passwords are kept (the Keychain or 1Password), their expiry dates, and lists of your own places and names that pages check. **Cards** shows every card a page can use, with made-up numbers, grouped into sections you open one at a time, so you know what to ask for. **Prompt Library** has things to ask your assistant, grouped by work, home, money, health, travel and development, each with a button that opens it in Claude or Codex, and the templates that already do some of them.

Legato opens on Welcome to Legato the first time. The starter pages are built into the app: they aren't files in the Pages folder, and they don't count as your pages.

To remove one, choose **Delete Page…** from its right-click menu. It's gone for good on this Mac: it isn't in the Trash, and updates don't bring it back. Its entry on the Welcome page goes too. The Welcome section is an ordinary one, so you can rename, move or delete it. A starter page added in a later version joins the Welcome section, unless you've deleted the section.



---

# Periods

<a id="periods"></a>

A page can have a period under its title for choosing the span of time its cards show: Week, Month and Year, or Last 7 days and Last 30 days. It's one capsule, **This month  Oct 1 – 21**, that names the choice and its days; click it for the choices as pills and a calendar. The cards that read that span follow the choice together. [Spending by period](https://legatobar.com/features#spending) on Features is such a page, with figures an agent wrote; its row works there.

```json
"period": {
  "choices": [
    { "id": "month", "label": "Month", "span": "month" },
    { "id": "week",  "label": "Week",  "span": "week" },
    { "id": "30d",   "label": "Last 30 days", "last_days": 30 }
  ]
}
```

- **A choice says what it means.** `span` is this calendar `day`, `week`, `month` or `year`; weeks start on the Mac's first day of the week. `last_days` is today and the days before it, so `30` is today and the 29 days before. `last_hours` is the last whole hours, this one included: `24` ends with the current hour, so a chart of its hours is always full and its last column is Now. Legato works out the dates each time a request goes out.
- **The first choice is the default.** Each Mac remembers the one picked on each page. Two to six choices, shown as pills at the top of the capsule's calendar.
- **A card follows the period when its source asks for it**, with `{period.start}` and `{period.end}` in a request where it would have written `{date.month_start}` and `{date.month_end}` (see [Dates in requests](https://legatobar.com/docs/source-requests.md#dates-in-requests)). Cards whose sources don't, such as an account balance, stay as they are; put them under a [heading](https://legatobar.com/docs/card-text.md#heading) that says so, like **Current balances**.
- **Choose a view by the selected choice.** In a source, `{period.id}` becomes its choice id, such as `today` or `week`. A derived value `{ "name": "shown", "value": { "template": "{period.id}" } }` lets a card use `when: { "path": "shown", "equals": "today" }`. The id stays the same while stepping. It is available in sources, not card text, and there is no `{compare.id}`. Do not infer the choice from the number of readings: a week may have none or one.
- **A choice can change more than the dates.** Some services keep the same readings at different steps: UniFi's ISP metrics come every 5 minutes for the last day and hourly for 30 days, at different paths. Give each choice `values`, short words its requests take as `{period.<name>}`:

  ```json
  "period": { "choices": [
    { "id": "today", "label": "Today", "last_days": 1, "values": { "interval": "5m" } },
    { "id": "month", "label": "30 days", "last_days": 30, "values": { "interval": "1h" } } ] },
  "sources": { "metrics": { "url": "https://api.ui.com", "secret": "unifi", "auth": { "type": "header", "name": "X-API-Key" },
    "requests": { "metrics": "/v1/isp-metrics/{period.interval}?beginTimestamp={period.start_at}" } } }
  ```

  Every choice names the same ones, up to 4, and each value is 1 to 64 letters, digits, `.`, `_`, `~` and `-`. A name can't be one of the period's own (`start`, `id` and the rest). Like `{period.id}`, they're for sources, not card text, and have no `{compare.…}`.
- **Looking at another period changes nothing else.** Status, gauge and fleet cards always use the default choice, so the page's status and [notifications](https://legatobar.com/docs/notifications.md) don't move when you look at last year, and a sparkline's [`history` rule](https://legatobar.com/docs/mapping-sparklines.md#sparkline-readings) can't follow a period.
- **Step back through the calendar.** With `"step": true`, arrows at the start of the capsule step a `span` choice back a day, week, month or year at a time: **‹ September ›**, or **‹ Tue, Oct 20 ›** for a day. The calendar inside goes straight to any day (or week, month or year): up to a year of days back, or 59 weeks, months or years. **This month** (or week, or year, or **Today**) appears in grey beside the capsule to come back, and ⌘← and ⌘→ step and ⌘T comes back from the keyboard. A page that steps can have a single choice, and `"future": true` lets the arrows go ahead as far, for plans and forecasts. A `last_hours` choice steps back that many hours at a time, **‹ 11 AM – 10 AM ›** with **Now** to come back, and one of 24 takes the calendar too: a day picked there is the 24 hours ending at this hour on that day. Rolling days don't step: there's no "one back" for the last 30 days. A window of hours is for sources that take moments (`{period.start_unix}`, `{period.end_unix}`): History datasets and figures an agent writes for the period still go by whole days. A stepped page comes back to now the next day, and when Legato opens.

  ```json
  "period": { "step": true, "choices": [ { "id": "month", "label": "Month", "span": "month" } ] }
  ```

- **Mark the days that have something.** `marks` puts a dot under each day of the calendar that has rows, a bigger one for a bigger total, so a busy day stands out before it's picked. `ref` names one of the page's sources and `value` is a rule giving rows of `at` (Unix seconds, an ISO 8601 moment or a `YYYY-MM-DD` day) and an optional number `value`. The calendar shows months outside the period, so that source reads a window of its own and can't use `{period.…}`. Drives marks each day by its miles:

  ```json
  "period": { "step": true, "choices": [ … ],
    "marks": { "ref": "car-days", "value": { "each": "results", "fields": { "at": "started_at", "value": "odometer_distance" } } } }
  ```

- **One item of the period.** A page that shows one thing from the period's list, such as the drive on a map, can name it with a param whose `default` is the period's end, `"{period.end_unix}"`, on an integer param. A row's link sets it (`legato://page/tesla-trips?at=1795500000`); while the value falls inside the period shown it stays, and once the period moves past it the default comes back, so the page shows the newest item of the new span. Such a param is for sources only.

- **Compare with the period before.** `"compare": "previous"` adds `{compare.start}` and `{compare.end}` (and their `_at` moments) for a second request: the same stretch of the period before, so October so far, Oct 1 – 21, is compared with Sep 1 – 21, not all of September. A whole span compares with the whole one before, and the last 30 days with the 30 days before them. The capsule is followed by **vs Sep 1 – 21** when there's room. A card's own text can name the days too, with `{period.dates}` and `{compare.dates}`:

  ```json
  "requests": {
    "now":    "/v2/summary?start_date={period.start}&end_date={period.through}",
    "before": "/v2/summary?start_date={compare.start}&end_date={compare.end}"
  }
  ```

  ```json
  { "id": "spent", "type": "stat", "label": "Spent", "unit": "USD",
    "source": { "ref": "money", "map": { "value": "now.total", "delta": "change" } } }
  ```

  Work out `change` with a [derived value](https://legatobar.com/docs/mapping.md#derived-values) that subtracts `before.total` from `now.total`. While the period is still going, `{period.end}` is still its last day (Nov 30); a service that returns rows dated ahead, such as scheduled transactions, counts those against a comparison that stops at today's date last month. Use `{period.through}`, today while the period is going, for a like-for-like pair.

- **Written by an agent.** A card without a source can follow the period too, since the page has to carry its figures: whoever wrote them isn't there when someone picks another choice. One value a day, with `daily`, suits anything that adds up, such as spending or steps. Legato works out the period's figure from it, a sparkline's points, and columns by day, week or month. Longer rolling ranges group adjacent months to keep the whole range in the chart; each bucket is labelled with its first month and year. A current chart counts readings only through today. `aggregate` is `sum` (the default), `mean`, `last` (a balance), `min` or `max`, and with the period's `compare`, `"compare": true` makes a stat's delta the change from the stretch before.

  ```json
  { "id": "spent", "type": "stat", "label": "Spent", "unit": "USD",
    "daily": { "values": [["2026-10-01", 62], ["2026-10-02", 148]], "aggregate": "sum", "compare": true } }
  ```

  Figures that don't add up, such as an average or a count of distinct things, go in `periods`: the card's values for each choice, each entry saying which days it covers. The entry whose `from` is the first day showing is used, so stepping back finds September if it was written. With nothing for the days showing, the card says so rather than show another period's numbers; on the 1st of a month not yet written, last month's entry shows with **Covers Oct 1 – 31** under it until it's replaced. A rolling choice's days move every day, so its entry matches only on the day it's written, and shows with **Covers …** after that until it's written again. Every entry is checked when the page is read, whichever choice shows.

  ```json
  { "id": "avg", "type": "stat", "label": "Average order", "unit": "USD", "periods": [
    { "choice": "month", "from": "2026-10-01", "to": "2026-10-21", "updated": "2026-10-21T09:40:00-05:00", "value": 38.2 },
    { "choice": "week",  "from": "2026-10-18", "to": "2026-10-21", "value": 41.5 } ] }
  ```

- **A link carries the period.** Following a card's [link](https://legatobar.com/docs/card-fields.md#links-to-other-pages) to another page with a period opens it on the same kind of choice, stepped as far back: Week on Oct 18 – 24 on Health opens Steps on Week, Oct 18 – 24. Choices match by what they mean (`"span": "week"`, `"last_days": 7`), not by their ids or labels. If the page can't step that far it goes as far as it can, and a page with no choice of that kind keeps its own. It only goes forward: Back returns to the first page as you left it, and a page opened from the sidebar, Spotlight or Shortcuts shows its own choice. Give [detail pages](https://legatobar.com/docs/detail-pages.md#detail-pages) the choices their overview has, so every link keeps the period.
- **Each choice is its own fetch.** Only the period showing is fetched, along with the default when a status, gauge or fleet card reads it. Switching back to a period you looked at shows its last answer at once while it's fetched again. A new day or time zone clears period answers before they can appear under new dates. Shortcuts' Get Card Value and page summaries always read the default choice at its current dates, without changing the period showing in the panel.



---

# Detail pages and params

## Detail pages

A page with `"sidebar": false` isn't listed in the sidebar. It's the page behind a link: a "Garage door open" card on your home page leads to a Security page with every door and sensor, and Back returns. Link to it from any card that takes a link, with `legato://page/ID` (see [Links to other pages](https://legatobar.com/docs/card-fields.md#links-to-other-pages)), and from as many pages as you like.

```json
{ "title": "Security", "icon": "lock.shield", "sidebar": false, "cards": [ … ] }
```

- Arrived at by a card's link, the title row starts with the way back, named: **‹ Home**. A page [titled by its item](https://legatobar.com/docs/detail-pages.md#titled-by-its-item) is named in it by that item, the one that step goes back to. ⌘[ goes back too, and back on the first page, the cards are scrolled where you left them, with the same tabs and sections open.
- Only navigation changes. A detail page fetches its sources, notifies, and lights the menu bar icon like any other page, and Spotlight and Shortcuts find it, so you can always reach it.
- It can't be the [home page](https://legatobar.com/docs/sections.md#organizing-pages-into-sections): **Open on** lists only sidebar pages, and a home page that becomes a detail page is set aside, as a missing one is, until it's back in the sidebar. With **Last page viewed**, the panel reopens on a detail page if that's where you were.
- Behind a page with a [period](https://legatobar.com/docs/periods.md#periods), give it the same choices: a link opens it on the period the overview shows. See [Overview and detail pages with a period](https://legatobar.com/docs/design.md#overview-and-detail-pages-with-a-period).
- `legato list` and `list_pages` mark it with `"sidebar": false`. To list it in the sidebar again, take the key out or set it to `true`.

### One page for every item

When every item of a fleet gets the same detail page (each guest on a server, each project in a to-do app), write the page once with `params`, and let each item's link say which one it's showing. Legato fills the values in wherever the page says `{param.name}`: a source's requests, a button's path and body, a card's text and the title.

<figure class="docs-figure">
<img class="is-light" src="/docs/one-page-for-every-item-light.png" width="720" height="332" alt="A Todoist project page in Legato, titled Home, beside the page file it comes from. The file's tasks request ends in {param.project}, and a line runs from project = 6Jf8Hm, Home, to the page's title.">
<figcaption>One file, every project: the link that opens Home sets <code>project</code>, and <code>{param.project}</code> in the page's request fills with it. Launch's link opens the same page with Launch's tasks.</figcaption>
</figure>

```json
{ "title": "Guest", "icon": "server.rack", "sidebar": false,
  "params": { "vmid": { "type": "integer", "example": "100" } },
  "sources": { "guest": { "url": "https://pve.example.com", "secret": "proxmox",
    "requests": { "status": "/api2/json/nodes/pve/qemu/{param.vmid}/status/current" } } },
  "cards": [ … ] }
```

The link names the value: `legato://page/proxmox-vm?vmid=109`. A fleet or bars row maps it from its source, as `"url": { "template": "legato://page/proxmox-vm?vmid={vmid|raw}" }`, so a guest added later has a working page at once.

| Field | | |
| --- | --- | --- |
| `type` | optional | `string` (the default) or `integer`: digits only, and a string that is the token alone, such as a request body's `"vmid": "{param.vmid}"`, becomes the number. |
| `pattern` | optional | A regular expression the whole value must match, such as `[0-9]{3}`. |
| `type: "text"` | optional | A name of 1 to 40 characters. Allows letters in any script, digits, spaces and `. , ' - ( ) &`. No leading or trailing spaces. |
| `type: "query"` | optional | What someone typed to search for, from a [form that opens a page](https://legatobar.com/docs/button-input.md#forms-that-open-a-page): 1 to 200 characters on one line, anything but `{`, `}`, tabs, other control characters and marks that reverse the reading order, such as `tag:bills "late fee"`. No leading or trailing spaces. |
| `example` | required | The value the page is checked with when no link gives one: by `legato set`, `--validate-page` and the Source Preview window. |
| `list_key` | optional | A list's name: the value is a host's key on that list, for [a page about one host](https://legatobar.com/docs/source-requests.md#a-page-for-one-host-on-the-list) of a host list. No `type`, `pattern` or `default`. |
| `selects` | optional | `true` when the value picks something on the page, such as a row of its list, rather than another item. While the page reads again for a new value, it draws at once from its last answer: cards that don't read what the value changes stay as they are, and the rest show their last shape in grey until their answer is back. Pi-hole's Queries page takes the query you click this way. |

- **A value is checked before it's used.** A link can come from any app. A string or integer value is 1 to 64 letters, digits, `.`, `_`, `~` and `-`, and matches the parameter's type and pattern. A string parameter with its own `pattern` may also take `:` and up to 128 characters, for ids like a UniFi console's (`900A…:123456789`): the colon goes into a request's path or query as `%3A`, and into a body as written. One that doesn't is refused, so it can't reach another route or another field.
- **Up to four** params, named with lowercase letters, digits and `_`. A link gives them as `?name=value&name=value`, each once; names the page doesn't take are ignored.

For a place name, declare `"name": { "type": "text", "example": "Lake cabin" }` in `params`. Open it with `legato://page/open-meteo?name=Lake%20cabin`. A title of `"{param.name}"` shows `Lake cabin`. Text values are decoded from the link and checked. They are percent-encoded when filled into request URLs. `pattern` and `default` work for text too. A `query` value is handled the same way: decoded from the link, checked, percent-encoded in request URLs, and filled in as it was typed everywhere else, such as a title of `"{param.q}"`.

- **Without defaults, opened without acceptable values** (from a link that names none, or a value it refuses), the page shows only a line saying it opens from a link. Nothing is fetched.
- **Without defaults it sets no light and posts no notification,** since what it shows depends on the link: the page that lists the items watches them. Its buttons stay in the panel, and aren't offered to Spotlight or Shortcuts, which would press one without saying which item it's for.
- A name with spaces or emoji can't travel in a link, so put an id in the link and let the page take its name from the source with [`title_from`](https://legatobar.com/docs/detail-pages.md#titled-by-its-item).
- **The icon can come from a param too:** `"icon": "{param.icon}"` for an SF Symbol (`?icon=server.rack`), or `"icon": "si:{param.brand}"` for a logo, the prefix written in the page since a value can't hold `:`. Opened without values, the page shows Legato's default icon.
- Parameterized pages remember the item in Back and Forward history. Background Shortcuts reads do not accept an item parameter yet, so Get Card Value and page summaries read the defaults when present and otherwise refuse these pages. Parameter values cannot be `.` or `..`.

#### A default item

Give every param a `default` to make one item the page's home. Each default must pass the same type and pattern checks as a link value. Give every param a default, or none.

```json
{ "title": "Weather",
  "params": {
    "lat": { "example": "33.44", "default": "33.44" },
    "lon": { "example": "-94.04", "default": "-94.04" }
  },
  "sources": { "weather": {
    "url": "https://api.openweathermap.org",
    "secret": "openweather", "auth": { "type": "query", "name": "appid" },
    "requests": { "one": "/data/3.0/onecall?lat={param.lat}&lon={param.lon}&units=imperial" }
  } },
  "cards": [{ "id": "temperature", "type": "stat", "label": "Temperature", "value": 0,
    "source": { "ref": "weather", "map": { "value": "one.current.temp" } } }]
}
```

This page can stay in the sidebar. Opening it there, in Spotlight or from a link without values shows the defaults. The default item fetches on schedule, counts in the Dock badge, posts notifications and offers buttons to Spotlight and Shortcuts.

A link with other values shows that item in the panel. It sets no light and posts no notification. The default item keeps fetching and watching in the background. A link with the default values returns home too. Shortcuts and external buttons always use the default item.

#### Titled by its item

`title_from` names the panel's title row from a source's answer: the monitor, guest or package the link opened. `ref` names one of the page's sources, and `value` is a [rule](https://legatobar.com/docs/mapping.md#mapping), read against that source's answer as a card's `map` is:

```json
{ "title": "Monitor", "sidebar": false,
  "params": { "id": { "type": "integer", "example": "1" } },
  "title_from": { "ref": "kuma", "value": { "first": "monitor_name", "of": "monitors",
                                            "where": { "path": "monitor_id", "equals": "{param.id}" } } },
  "sources": { "kuma": { "url": "https://status.example.com", "secret": "kuma", "auth": { "type": "basic" },
    "requests": { "monitors": { "path": "/metrics", "format": "prometheus", "group_by": "monitor_id" } } } },
  "cards": [ … ] }
```

Opened from `legato://page/uptime-monitor?id=4`, the title row says **Git** once the source answers, and **Monitor** until then.

- **`title` is the fallback.** It shows before the first answer, when the rule gives nothing (no monitor 4, a field the answer lacks, a template missing any of its values), and while the source needs access. A source that stops answering keeps the last name it gave.
- **One line of plain text,** up to 60 characters: line breaks become spaces, and a longer name ends in "…". Nothing in it is read as a link or markdown.
- **The title row, the Back trail and notifications** use it. The sidebar, Settings, Spotlight and Shortcuts, `legato list` and `list_pages` keep `title`, the page's own name; renaming the page with **Edit…** changes `title`.
- **It reads the source on its own,** sharing the fetch with the cards that use the same source, so a card that's hidden or has a mistake doesn't change the name. On a page with a [period](https://legatobar.com/docs/periods.md#periods), the source is read for the first choice, the default, as status cards are: the name doesn't change with the period showing.
- Any page can have one, but it's for a page about one item; a page about a whole service keeps a written title. It can't name a history (a `dataset` source).



## Views

A page and its siblings can show as tabs under one title, as Tesla's Overview, Drives and Charges do. The leading page lists them once, itself among them:

```json
"views": [ { "page": "tesla", "label": "Overview" }, { "page": "tesla-trips", "label": "Drives" }, { "page": "tesla-charging", "label": "Charges" } ]
```

- Each view stays its own page, with its own file, sources, layout, period and params, so `legato://page/tesla-trips` opens the Drives tab.
- The sidebar shows the leading page alone and keeps it selected on any of its views. The title row keeps the leading page's name, icon and title-row controls on every view, and the tabs sit under it, underlined.
- 2 to 8 views, each page once, labels of 1 to 24 characters. A view whose page isn't there is left out of the tabs.
- The tabs are drawn on pages with `"look": "sheet"` in the window. Give each view a sheet layout.


---

# Sections and collections

## Organizing pages into sections

The sidebar can group pages under named sections that open and close. Pages and sections are arranged right in the sidebar. Right-click an empty part of the sidebar, or a section's header, and choose **New Section**.

Drag a page anywhere in the sidebar: among a section's pages, or just under its header, puts it in that section (an empty or closed one too), and above every header takes it out again.

Or right-click a page and choose **Move to… → Sections**: pick a section, choose **New Section** to start one with that page, or **Ungrouped Pages** to put it back in the top list. An empty section shows **Drag pages here** under its header.

Ungrouped pages come first, then each section in order: drag a section's header to move the section, its pages with it.

Click a section's header to close or open it (an arrow appears when you point at it); Legato remembers the choice.

Right-click a section header and choose **Edit…** to change its name and give it an icon, or **No icon** to show its name alone; **Remove Icon** in the same menu takes an icon away. **Delete Section** keeps its pages and returns them to the ungrouped list. Drag pages or section headers to reorder them. **Move to…** offers sections and collections without dragging. Right-click a page and choose **Edit…** to rename it or choose its icon, or **No icon**. The editor opens under what it edits. Save, Return or a click outside it writes the new `title` and `icon` into the page's file, as an agent's `set_page` would; Cancel or Escape changes nothing, and closing it unchanged writes nothing. **Choose Icon…** shows the icon picker in the editor's place.

The window opens on the page last viewed. To open it on the same page every time, right-click that page and choose **Home Page**, or pick it under **Open on** in [Settings → Pages](https://legatobar.com/docs/settings.md#pages). Pages opened from Spotlight, Shortcuts or a notification still open on their own, and Back returns from the home page to the page left. Renaming a page keeps it home. A home page whose file goes away, deleted or renamed (its id comes from the file name), isn't forgotten: the window opens on the last page viewed until a page with that id is back. Deleting it with **Delete Page…** clears it.

A section's name is up to 40 characters. Sections and order are kept by page id, outside the page files, so an agent rewriting a page never moves it, and a page deleted and written again lands back in its section. A page's name and icon are its own `title` and `icon`: an agent that rewrites the page with another title renames it.


## Collections

Collections give the sidebar separate sets of pages and sections, up to nine. Choose **New Collection** from the sidebar's right-click menu or the chevron menu beside the sidebar toggle, then give it a name and an icon. The first collection, **Pages**, keeps your existing arrangement. Your new collection starts empty.

Click a collection's icon to return to the page you last viewed there. Up to four icons sit beside the sidebar toggle, the current one always among them. The chevron after them shows the rest, each with its icon and ⌘ shortcut. With the panel open, ⌘1 through ⌘9 select them in order. Save or cancel an event draft before switching.

Right-click a page or section and choose **Move to… → Collections**. Moving a section brings its pages with it; moving one page puts it at the top of its destination's ungrouped pages. You can also drag a page or section onto a collection icon. Dropping it onto its current collection leaves its placement alone. The Move menu reaches every collection, including ones whose icons don't fit.

Right-click an icon and choose **Edit…** to change its name and icon, or use its menu to move it left or right, or delete it. Drag one collection icon onto another to put it in that one's place. Deleting a collection moves its contents into the original collection and never deletes page files. The original collection can't be deleted. **Undo Delete Collection** is in the chevron menu until you make another preferences change.

Choose **Settings → General → New pages go to** to set the destination for new sidebar pages. You can also right-click a collection icon and choose **Use for New Pages**. This affects pages when Legato first loads them; existing pages keep their placement, including when an agent updates them. Deleting that destination resets it to the original collection. Detail pages do not get a collection. Following a link to a sidebar page switches to its collection; a detail page keeps the collection you came from. Back and Forward remember that context. An empty collection shows an empty page area.

Collections, their order and their last-viewed pages stay on this Mac. They don't change page JSON, fetching or notification settings.

The icon editor has a searchable browser with categories and recent choices. Search ordinary words such as “home”, “money” or “server”, then choose an icon and save the collection. **Use a symbol name** is optional, for symbols outside the bundled catalog.

Agents can arrange collections and sections too: `get_sidebar`, `set_collection`, `set_section`, `move_page`, `delete_collection` and `delete_section` (or `legato sidebar` and `legato arrange`), described in [Arranging the sidebar](https://legatobar.com/docs/mcp-tools.md#arranging-the-sidebar). They never change or delete page files. Collection placement stays out of page JSON.



---

# Add a page from a template

## Templates

To add a bundled service, open the collection chevron and choose **New from
Template…** beside **New Collection**. The install window adds pages to that
collection. Choose a service, then work down the steps in its sidebar: **Connect**
(or **Place**) for its address or location, **Sign in** for its token, **List** when
its pages read one, and **Review**. Each service shows only the steps it needs.
**Continue** checks the step you're leaving; a step with something to fix gets a dot
in the sidebar, and you can click any step to go back to it.

**Review** shows the hosts the pages will contact, the pages it adds, how often they
check, and the server buttons; **Requests** lists each button's method and path.
Nothing is sent before you continue from **Sign in** or click **Install**.

Each secret is required: keep the one already saved, give a 1Password reference, or
paste a token. **Continue** on **Sign in** checks the service with it, and **Install**
checks again and writes no page if the service refuses it or can't be reached. Tokens
go to the Keychain, bound to the displayed host, after the pages are written. You can
also manage these in **Settings → Secrets**.

A list the pages read is optional. Pick one from **Settings → Lists**, make a new
one, or leave **No list**. Add or remove its names right there, or click a suggested
name; changes are saved to the list when you click **Install**.

Install opens the first sidebar page. If pages already exist, the window names
them and offers to open them without replacing them.

A service that adds two or more pages to the sidebar, such as YNAB or Lunch Money,
puts them in a section named after the service, in the order the service lists
them. If that collection already has a section with the name, the pages go at its
end. Detail pages never count toward the two and stay out of the sidebar. With no
collections, the pages are ungrouped as before. If Legato can't make the section,
nothing is installed, and you can try again.

A `legato://install/<service>` link opens this same window on that service's
**Review** step, with the steps still to fill marked, using the
default collection, or ungrouped when there are no collections. A service page with a
template has one as its **Install in Legato** button. A link may also carry answers
(`?url=…`), but the site's buttons don't: Legato asks for them.
A link never installs by itself. Invalid links show a short error and do nothing.
