# Legato docs

Legato is a menu bar app for your Mac that shows **pages**: small dashboards your agents, your scripts and Legato itself keep up to date. Click the Legato icon and the panel opens, with your pages in a sidebar and the one you chose beside it.

```bash
# An agent does this through MCP; from a shell it's one command.
echo '{"title": "Hello", "icon": "hand.wave",
       "cards": [{"id": "hi", "type": "text", "body": "Written from Terminal."}]}' |
  /Applications/Legato.app/Contents/Helpers/legato set hello
```

Everything happens on the Mac. Pages are files on it, the data they fetch stays on it, and there's no account or cloud service to send pages through. Legato's own servers only hear from it about its [trial and license](https://legatobar.com/docs/license.md) and to check for updates, never about your pages.

The panel's sidebar lets a little of your desktop show through, and its pages sit on a solid background, light or dark as your Mac is set. Pages and their buttons also appear in Spotlight: type a page's name to open it, or a button's name to press it. In Shortcuts, actions open a page, press a button, or read a page's summary or a card's value.

## What a page is

A page is a JSON file in `~/Library/Application Support/Legato/Pages`, named after its id: the page `budget` is `budget.json`. It has a `title`, an SF Symbol `icon`, and a list of **cards**: numbers, lists, tables, progress bars, status cards, calendars and more. See [Pages](https://legatobar.com/docs/pages.md) and [Cards](https://legatobar.com/docs/cards.md).

Legato watches the folder and shows a page as soon as its file is written. A file with a mistake still shows, as a page that says what's wrong, so nothing disappears silently.

A page can also fetch its own data. Its **sources** name an API on the internet or on your home network, or this Mac's Calendar or Reminders; Legato fetches them on a schedule and fills the cards in. Cards can have buttons that call an API, and credentials stay in the Mac's Keychain. See [Sources](https://legatobar.com/docs/sources.md) and [Buttons](https://legatobar.com/docs/buttons.md).

## Three ways to write a page

| | Use it when | Start here |
| --- | --- | --- |
| **An agent, over MCP** | Claude Code, Codex, Claude Desktop or another MCP client on this Mac makes or updates the page for you. | [Connect an agent](https://legatobar.com/docs/connect-agent.md) |
| **A script, with `legato set`** | A shell script, Python, launchd or cron job writes the page from data it gathers. | [Your first page from a shell](https://legatobar.com/docs/cli.md#your-first-page-from-a-shell) |
| **Any program, writing the file** | Something that can't run a command saves JSON into the Pages folder. | [Writing and versions](https://legatobar.com/docs/page-writing.md#any-program-writing-the-file) |

The first two use the same `legato` tool, which comes inside the app. It checks the page, writes the file whole, opens Legato if it isn't running, and waits for Legato to load the page. If something in the page is wrong, nothing is written: the old page stays as it was, and the error says what to fix.

Agents have to run on this Mac. A chat app in a browser can't reach Legato.

## Pages in these docs

### Get started

Install Legato, write a first page and connect the agent that will keep it current.

- Get started
  - [Overview](https://legatobar.com/docs/index.md)
  - [Quickstart](https://legatobar.com/docs/quickstart.md)
  - [Connect an agent](https://legatobar.com/docs/connect-agent.md)
  - [Add a page from a template](https://legatobar.com/docs/templates.md)
- On your Mac
  - [Notifications](https://legatobar.com/docs/notifications.md)
  - [Settings](https://legatobar.com/docs/settings.md)
  - [Trial and license](https://legatobar.com/docs/license.md)

### Pages & cards

What goes in a page file, the cards it can show, and how to design one that reads at a glance.

- Pages
  - [Pages](https://legatobar.com/docs/pages.md)
  - [Writing and versions](https://legatobar.com/docs/page-writing.md)
  - [Loading and status files](https://legatobar.com/docs/page-loading.md)
  - [Page behavior](https://legatobar.com/docs/page-behavior.md)
- Arranging pages
  - [Periods](https://legatobar.com/docs/periods.md)
  - [Detail pages and params](https://legatobar.com/docs/detail-pages.md)
  - [Sections and collections](https://legatobar.com/docs/sections.md)
- Cards
  - [Cards](https://legatobar.com/docs/cards.md)
  - [Shared fields and links](https://legatobar.com/docs/card-fields.md)
  - [Numbers](https://legatobar.com/docs/card-numbers.md)
  - [Lists and rows](https://legatobar.com/docs/card-lists.md)
  - [Time](https://legatobar.com/docs/card-time.md)
  - [Text and layout](https://legatobar.com/docs/card-text.md)
- Design
  - [Page design](https://legatobar.com/docs/design.md)
  - [Icons](https://legatobar.com/docs/icons.md)

### Sources & buttons

Pages that fetch their own data from an API, and buttons that send something back.

- Sources
  - [Sources](https://legatobar.com/docs/sources.md)
  - [Try an API and preview](https://legatobar.com/docs/source-preview.md)
  - [Source fields and loading](https://legatobar.com/docs/source-reference.md)
  - [Signing in and requests](https://legatobar.com/docs/source-requests.md)
  - [Polling and failures](https://legatobar.com/docs/source-polling.md)
  - [Calendar and Reminders](https://legatobar.com/docs/source-calendar.md)
  - [Worked examples](https://legatobar.com/docs/source-examples.md)
  - [Troubleshooting](https://legatobar.com/docs/source-troubleshooting.md)
- Mapping
  - [Mapping](https://legatobar.com/docs/mapping.md)
  - [Names and tables](https://legatobar.com/docs/mapping-tables.md)
  - [Expiry and slices of time](https://legatobar.com/docs/mapping-expiry.md)
  - [Conditions](https://legatobar.com/docs/mapping-conditions.md)
  - [Sparkline readings](https://legatobar.com/docs/mapping-sparklines.md)
- Buttons
  - [Buttons](https://legatobar.com/docs/buttons.md)
  - [Tasks and asking first](https://legatobar.com/docs/button-tasks.md)
  - [Text input](https://legatobar.com/docs/button-input.md)
  - [Rows and checklists](https://legatobar.com/docs/button-rows.md)
- Secrets and lists
  - [Secrets](https://legatobar.com/docs/secrets.md)
  - [1Password](https://legatobar.com/docs/1password.md)
  - [Lists](https://legatobar.com/docs/lists.md)

### History

Keep what a service forgets, and read it back on any page.

- History
  - [History](https://legatobar.com/docs/history.md)
  - [Collect and samples](https://legatobar.com/docs/history-collect.md)
  - [Reading](https://legatobar.com/docs/history-reading.md)
  - [Dates and retention](https://legatobar.com/docs/history-dates.md)
  - [Accounts and readers](https://legatobar.com/docs/history-accounts.md)
  - [Rows from outside](https://legatobar.com/docs/history-rows.md)
  - [Coverage and local storage](https://legatobar.com/docs/history-coverage.md)
- Examples
  - [Parcel example](https://legatobar.com/docs/history-parcel.md)

### Agents & CLI

The MCP tools an agent uses and the legato command a script uses.

- Agents
  - [Agents and scripts](https://legatobar.com/docs/mcp.md)
  - [MCP tools](https://legatobar.com/docs/mcp-tools.md)
  - [Scripts](https://legatobar.com/docs/scripts.md)
- Command line
  - [CLI](https://legatobar.com/docs/cli.md)
  - [Pages](https://legatobar.com/docs/cli-pages.md)
  - [Sidebar](https://legatobar.com/docs/cli-sidebar.md)
  - [Templates and install](https://legatobar.com/docs/cli-templates.md)
  - [History and rows](https://legatobar.com/docs/cli-history.md)
  - [Lists](https://legatobar.com/docs/cli-lists.md)
  - [legato mcp](https://legatobar.com/docs/cli-mcp.md)
  - [Legato secret](https://legatobar.com/docs/cli-secret.md)

### Reference

Sizes Legato holds a page to, and what each error means.

- Reference
  - [Limits](https://legatobar.com/docs/limits.md)
  - [Errors](https://legatobar.com/docs/errors.md)
- For agents
  - [Page schema ↗](https://legatobar.com/schemas/page.schema.json)
  - [llms.txt ↗](https://legatobar.com/llms.txt)


You can also browse [Features](https://legatobar.com/features), which pairs an illustrated preview of each card and page template with a prompt for your agent and its JSON.

## For agents

Every docs page is also plain Markdown: add `.md` to its URL (this page is [/docs/index.md](https://legatobar.com/docs/index.md)), or send `Accept: text/markdown`. [/llms.txt](https://legatobar.com/llms.txt) lists them all, and [/llms-full.txt](https://legatobar.com/llms-full.txt) is every page in one file.

The page format is a JSON Schema. Legato installs it in the Pages folder as `.schemas/page.schema.json`, the site publishes it at [`https://legatobar.com/schemas/page.schema.json`](https://legatobar.com/schemas/page.schema.json), and `legato schema` or the `get_page_schema` tool gives any part of it. When the docs and the schema disagree, the schema wins.
