# Authoring Buttonizer Buttons - `.buttonize` Reference (for AI agents) > Self-contained: an agent that reads ONLY this file can create valid, > well-behaved buttons on a user's host. Reflects the app's actual parser > (`ButtonDef` / `ParamDef`) as of 2026-09-13. For a **desktop or Windows** > target, section 8 applies on top of everything else. Deep dives (open only when needed): field reference (English) - https://buttonizer.app/yaml · runnable examples - `examples/` · CLI appendix - `docs/desktop-cli.md` · failure-repair wrapper - `docs/agent-wrapper-pattern.md` · end-user manual - `Manual.md` ## 0. TL;DR A button is a **directory** containing a **`button.yml`** file: ``` ~/.buttonize/buttons///button.yml ``` Create that file under the desktop's `~/.buttonize/buttons/` tree and the paired phone picks it up on its next list refresh (~10 seconds while the app is open). No daemon, no restart. Minimum viable button: ```yaml # ~/.buttonize/buttons/hello/button.yml id: hello title: Hello command: echo "Hello from $(hostname)" updated_at: "2026-09-13T00:00:00Z" ``` > 2026-09 갱신: SSH/SFTP·`ssh -R` 터널·릴레이/포트 레지스트리 세대는 제거됐고, 수신 > 대상 `host_ids`(멀티 호스트 fan-out)도 제거됐다. 현재 모델은 **허브 시그널링 + > WebRTC 데이터채널**로 연결된 **데스크톱(들)** 이며, 폰은 여러 데스크톱과 동시에 > 페어링할 수 있다(동시 연결 수는 티어가 게이트 — 무료 1 / P1 3 / P2 5 / P3 10). > 버튼은 소유한 데스크톱의 버튼을 채널 RPC로 조회·실행한다. 이 문서의 > "phone flow / sync" 서술은 그 기준으로 정정했다. Rules that bite (details in the linked sections): | # | Rule | |---|---| | 1 | The directory name MUST equal the `id` value. | | 2 | Bump `updated_at` to the current UTC (`YYYY-MM-DDTHH:MM:SSZ`) on EVERY edit - the desktop records it on save and the phone compares it (§6). | | 3 | Quote every hex color (`color: "#3B82F6"`) - an unquoted `#` starts a YAML comment and silently nulls the field. | | 4 | Every `{{param}}` in `command` needs a matching `params:` entry (§3); a scheduled button needs a `default` for each one (§2.3). | | 5 | `enabled: false` = drawn dimmed and **not run by any path** (manual, scheduled, service start, CLI); the run/start APIs refuse it with HTTP `409`; omit the key for a normal button (§2.2). | | 6 | Never touch the app-managed run records inside a button bundle: `status.json` (last run state), `tail.log` (output tail) and `history/.jsonl` (§1). | | 7 | Commands are NOT always POSIX: a Windows desktop runs them through `cmd /C` (§8). | --- ## 1. `~/.buttonize/` layout | Path | Role | Who writes it | |---|---|---| | `buttons/` | All buttons + folders. The desktop owns them; the paired phone reads/writes them over the channel RPC (`list_buttons` / `button_edit_full`). | You and the app | | `buttons//folder.yml` | Folder presentation attrs: `icon`, `order`. Optional; its presence keeps an empty folder alive. | You | | `buttons///button.yml` | One button definition. | You | | `buttons///