# What you can build > Waddle is a pixel duck that lives along the bottom of your Mac's screen. These pages show how to make it react from your own scripts, agents and apps. ## Try it now With Waddle running, paste this into a terminal: ```sh curl localhost:4404/quack -H 'content-type: application/json' -d '{"text":"hello!"}' ``` ```sh waddle say hello! ``` ```json { "ok": true, "mood": "quack", "text": "hello!" } ``` Waddle turns to you and quacks, with HELLO! in its bubble. (Waddle's pixel font draws capitals, whatever you send.) ## What you can hook up - **Your coding agents.** Claude Code, Codex, OpenCode and Pi sessions each get a duckling in Waddle's creek, and the one that needs you hops onto the bank. See [How the creek hears agents](https://docs.waddle.sh/agents.md), or [Bring your own agent](https://docs.waddle.sh/own-agent.md). - **Your terminal.** `waddle wait npm test` runs your tests, and Waddle walks over when they're done. See [The waddle command](https://docs.waddle.sh/cli.md). - **Your scripts.** Anything on your Mac can send Waddle a line over HTTP. See [Make Waddle react](https://docs.waddle.sh/quack.md). - **Your notes, for agents.** `waddle mcp` gives agents tools for Waddle Notes. See [MCP tools](https://docs.waddle.sh/mcp.md). - **Your own quick actions.** A script with a title header shows up in Waddle's palette (⌥Space). See [Quick action scripts](https://docs.waddle.sh/actions.md). - **Your other apps.** Waddle can post your notes to another app as you save them, signed. See [Webhooks](https://docs.waddle.sh/webhooks.md). - **Anywhere online.** Waddle Club members get a private address that anything (CI, cron, a phone shortcut) can POST a line to. See [Your quack address](https://docs.waddle.sh/quack-address.md). ## For your agent Every page here is also plain markdown: add `.md` to its address (this one is [index.md](https://docs.waddle.sh/index.md)). [llms.txt](https://docs.waddle.sh/llms.txt) lists them all, and [llms-full.txt](https://docs.waddle.sh/llms-full.txt) is everything in one file. With Waddle installed, `waddle docs` prints the same pages in a terminal, offline, matching the version you have (from 0.2.0-beta.17). ## What it needs - A Mac with Apple silicon, macOS 15 or later. - Waddle running. Its local API answers programs on this Mac only, on `localhost:4404`. - For the `waddle` command: [Install the waddle command](https://docs.waddle.sh/install.md). --- # Install the waddle command > Put waddle on your PATH, so your terminal and your agents can run it by name. ## Install it The command lives inside Waddle. In Waddle's Preferences → Agents, the waddle command's **Install** puts a link to it where your terminal looks, so when Waddle updates, the command does too. - If `~/.local/bin` is on your terminal's PATH already (Claude Code's installer puts `claude` there), it goes there, with no password. - Otherwise it goes in `/usr/local/bin`, and macOS asks your password once. - Rather not give a password? **Use my home folder** puts it in `~/.local/bin` and adds one line to `~/.zprofile` so zsh finds it. **Remove** takes the line out again. ## Check it ```sh waddle --version ``` It prints `waddle` and Waddle's version. Most commands need Waddle running. When it isn't, they say so and exit 1: ```text waddle: couldn't reach Waddle on this Mac (is it running?) ``` ## Agents opened from the Dock Apps opened from the Dock (the Claude app, Cursor, Codex's app) don't get your terminal's PATH. Preferences → Agents shows the line that adds Waddle's MCP server with the command's full path, and a Copy button. ## Another port Waddle listens on port 4404. `WADDLE_PORT` points the command at another port, for a second copy of Waddle started on one: ```sh WADDLE_PORT=4405 waddle say hi ``` --- # Your first quack > Five minutes from nothing to Waddle telling you a script finished. ## 1. Is Waddle listening? ```sh curl localhost:4404/health ``` ```json { "ok": true, "duck": "quack", "moods": ["quack", "dance", "pet", "sleep"] } ``` A running Waddle also says whether it's in the coop (`house`) and about the screen it's on (`screen`). ## 2. Make it say something ```sh curl localhost:4404/quack -H 'content-type: application/json' -d '{"text":"first quack!"}' ``` ```sh waddle say first quack! ``` ```json { "ok": true, "mood": "quack", "text": "first quack!" } ``` The mood is quack unless you pick another: dance, pet or sleep. More in [Make Waddle react](https://docs.waddle.sh/quack.md). ## 3. Put it in a script A git hook that tells you each commit went in. Save it as `.git/hooks/post-commit` and make it executable (`chmod +x`): ```sh #!/bin/sh # Tell Waddle; never hold up the commit if Waddle isn't running. waddle say "committed!" >/dev/null 2>&1 || true ``` ## 4. Let it watch a long command ```sh waddle wait npm test ``` Your tests run as usual in your terminal. When they finish, Waddle walks over: happy if they passed, with the last line they printed if not. Click Waddle to jump back to that terminal. `waddle wait` exits with the command's own exit code, so it fits in scripts. Want that for every long command, without typing `waddle wait`? See [Tell me when tests finish](https://docs.waddle.sh/tests.md). --- # How the creek hears agents > Each coding agent session is a duckling in Waddle's creek. What Waddle installs, what it hears, and what it never sends. ## Set it up In Waddle's Preferences → Agents, each agent on your Mac has **Set up**. New sessions of that agent show up in the creek from then on. **Remove** takes out only what Waddle added. | Agent | What Waddle adds | Where | |---|---|---| | Claude Code | Its hook, on six events | `~/.claude/settings.json` | | Codex | Its hook, on six events | `~/.codex/hooks.json` | | OpenCode | A plugin file of Waddle's own | `~/.config/opencode/plugins/waddle.js` | | Pi | An extension file of Waddle's own | `~/.pi/agent/extensions/waddle.ts` | - The hook is a script at `~/.waddle/hooks/agent.sh`, a path that never moves. Waddle copies it there from the app at every launch, so an update updates it. - Before Waddle first changes a shared settings file, it keeps a copy beside it, ending `.before-waddle`. A settings file Waddle can't read (not JSON, or a shape it doesn't know) is left alone, and Preferences says so. - Claude Code's and Codex's hook needs `jq`: macOS's own (from macOS 15) or Homebrew's. Without it, the hook does nothing. ## What the ducklings show | Duckling | The session | |---|---| | Swims along | Started, nothing asked yet | | Swims and dabbles | Working | | Up on the bank, at the front | Done, or wants a decision from you | | Under a little cloud | Working, but not a peep for a long while | | Gone | The session ended | Click a duckling to jump to the terminal its session runs in. ## When Waddle walks over - A turn finished: Waddle says the project's name and that it's your turn. - The agent asks for your permission: it says your agent wants a decision. - The agent is waiting on you: it says so. Waddle picks its own words for each (its lines vary), and its pixel font draws them in capitals. In the coop (do not disturb), news waits in the mailbox instead. ## What's sent, and what never is The hook tells Waddle, on this Mac only (`127.0.0.1`), the event, the session's folder and where it runs (the terminal app, its tab), so a click can bring you back. It never sends what you typed or what the agent said. If Waddle isn't running, the hook does nothing, and it never makes the agent wait. At the start of a session, the hook also hands the agent the list of your Waddle Context pages it may read in that folder, if you've given it any. ## Your own agent Anything that can make an HTTP request can have a duckling: [Bring your own agent](https://docs.waddle.sh/own-agent.md). --- # Claude Code > What Waddle adds to Claude Code, and how to give it Waddle Notes too. ## The hook Preferences → Agents → Claude Code → **Set up** adds one command to `~/.claude/settings.json` for each of these hook events, with a 5 second timeout: `SessionStart`, `UserPromptSubmit`, `PostToolUse`, `Stop`, `Notification`, `SessionEnd` ```json { "hooks": { "Stop": [{ "hooks": [{ "type": "command", "command": "\"/Users/you/.waddle/hooks/agent.sh\" claude", "timeout": 5 }] }] } } ``` That's one event of the six; the others look the same. Your own hooks stay as they were. New sessions get a duckling. ## Waddle Notes and your context Give Claude Code Waddle's MCP server, and it can search and read your notes, and the context pages you let it read: ```sh claude mcp add --scope user waddle -- waddle mcp ``` `--scope user` adds it for every folder, not only this one. What it may do is up to you, in Preferences. See [MCP tools](https://docs.waddle.sh/mcp.md). ## Take it out Preferences → Agents → Claude Code → **Remove** deletes Waddle's entries and nothing else. --- # Codex > What Waddle adds to Codex, and the one step Codex asks of you. ## The hook Preferences → Agents → Codex → **Set up** adds Waddle's hook to `~/.codex/hooks.json` for these events: `SessionStart`, `UserPromptSubmit`, `PostToolUse`, `Stop`, `PermissionRequest`, `SessionEnd` Each has a 5 second timeout, except `SessionEnd`, which Codex allows 3 seconds at most (Waddle asks for 2). ## Trust it in Codex Codex skips a new hook until you trust it. In Codex, type `/hooks` and trust Waddle's. Until then, Preferences shows Codex as set up but not heard from. ## Waddle Notes Codex speaks MCP too: add `waddle mcp` as a server in Codex's MCP settings. See [MCP tools](https://docs.waddle.sh/mcp.md). ## Take it out Preferences → Agents → Codex → **Remove** deletes Waddle's entries and nothing else. --- # OpenCode > Waddle's plugin for OpenCode: what it tells Waddle and where it lives. ## The plugin Preferences → Agents → OpenCode → **Set up** writes Waddle's own plugin to `~/.config/opencode/plugins/waddle.js` and keeps it up to date. It tells Waddle when a session starts, works, finishes its turn, asks your permission, and ends. It never sends what you typed or what the agent said. If Waddle isn't running, it does nothing, and it never waits on Waddle. ## Your context The plugin adds the list of Waddle Context pages OpenCode may read in that folder to its system prompt. OpenCode reads them, and proposes lessons, through `waddle mcp`: add it as a local MCP server in OpenCode's config. See [MCP tools](https://docs.waddle.sh/mcp.md). ## Take it out Preferences → Agents → OpenCode → **Remove** deletes the plugin file. --- # Pi > Waddle's extension for Pi: the creek, and your context without MCP. ## The extension Preferences → Agents → Pi → **Set up** writes Waddle's own extension to `~/.pi/agent/extensions/waddle.ts` and keeps it up to date. It tells Waddle when a session starts, works, has settled (your turn), and ends. It never sends what you typed or what the agent said. If Waddle isn't running, it does nothing, and it never waits on Waddle. ## Your context Pi has no MCP, so the extension brings Waddle Context itself: the list of pages Pi may read in that folder goes in its system prompt, and it adds four tools to list, read and search them, and to propose a lesson, the same as `waddle mcp` gives other agents. ## Take it out Preferences → Agents → Pi → **Remove** deletes the extension file. --- # Bring your own agent > Any agent or tool that can make an HTTP request can have a duckling in the creek, and have Waddle walk over when it needs you. Your agent tells Waddle two kinds of thing: what its session is doing (the duckling), and news worth walking over for (Waddle). Both go to `localhost:4404`, from programs on this Mac. ## 1. A session starts ```sh curl localhost:4404/session -H 'content-type: application/json' \ -d '{"session":"my-agent-7f3a","event":"start","cwd":"/Users/you/code/limen"}' ``` ```json { "ok": true } ``` A duckling named after the folder (limen) swims into the creek. Use one session id for the whole session: 8 to 64 letters, digits and dashes. ## 2. It works, then it's your turn Send `prompt` when someone asks it something, `tool` for each step it takes, and `turn` when it's done or waiting on you. The duckling dabbles while it works, and hops onto the bank on `turn`. ```sh curl localhost:4404/session -H 'content-type: application/json' \ -d '{"session":"my-agent-7f3a","event":"turn","cwd":"/Users/you/code/limen"}' ``` ```json { "ok": true } ``` ## 3. Waddle walks over The duckling shows it quietly. To have Waddle come and say so, send one of Waddle's own lines, with the project's name: ```sh curl localhost:4404/quack -H 'content-type: application/json' \ -d '{"phrase":"agent-done","project":"limen"}' ``` ```json { "ok": true, "mood": "quack" } ``` The reply's `text` is the line Waddle picked. The phrases: `agent-done`, `agent-waiting`, `agent-decision`, `deploy-live`, `deploy-failed`. News about one project replaces that project's last, so a busy agent never stacks up letters in the mailbox. ## 4. The session ends ```sh curl localhost:4404/session -H 'content-type: application/json' \ -d '{"session":"my-agent-7f3a","event":"end","cwd":"/Users/you/code/limen"}' ``` ## Be a good guest - Never wait on Waddle: give each request a short timeout (Waddle's own hooks use 1 second) and carry on if it fails. Waddle may not be running. - Send what happened, not what was said: no prompts, no output. - Send `term` if you can, so a click on the duckling jumps to the right terminal. See [Sessions](https://docs.waddle.sh/sessions.md). - If your agent runs the `waddle` command, set `WADDLE_AGENT` to its name in the agent's environment, so Waddle knows an agent ran it. --- # The waddle command > Every waddle command, what it does, and what it exits with. Install it first: [Install the waddle command](https://docs.waddle.sh/install.md). It talks only to Waddle on this Mac (`127.0.0.1`), and most commands need Waddle running. ## Commands | Command | What it does | |---|---| | `waddle wait ` | Runs it. When it's done, Waddle walks over: happy if it worked, with its last line if not. Exits with the command's own exit code. | | `waddle say ` | Waddle says it. | | `waddle deploy [live\|failed]` | The deploy duck, for a deploy Waddle doesn't see on GitHub: `waddle deploy limen-fm live`. | | `waddle top [filter]` | What's using your Mac, forgotten dev servers first. `--cpu` or `--mem` sorts, `--json` for scripts. | | `waddle stop ` | Stops it, by project, port or name (`limen`, `:3000`, `"next dev"`). Asks it to quit; `--force` doesn't ask. | | `waddle notes [words]` | Your newest notes, or a search: typos forgiven, `#tag`, `in:folder`, `"exact words"`. `--json` for scripts. | | `waddle notes show ` | Prints one note as markdown, by its title or path. | | `waddle mcp` | Waddle Notes and your context for agents, as an MCP server on stdio. See [MCP tools](https://docs.waddle.sh/mcp.md). | | `waddle feedback [words]` | Tells Limen something about Waddle. It opens in Waddle for you to read and send. | | `waddle context sweep` | Reads what your agents saved about you since the last sweep (with your own Claude Code, headless, so it uses your allowance), and proposes your calls for your yes. `--dry-run` shows them. | | `waddle url` | Your quack address (Waddle Club), copied. `--new` makes a new one, `--stop` stops it. See [Your quack address](https://docs.waddle.sh/quack-address.md). | | `waddle hook zsh` | Prints a shell hook (zsh, bash or fish): a command that takes 30 seconds or more and finishes while you're in another app, Waddle brings it. See [Tell me when tests finish](https://docs.waddle.sh/tests.md). | | `waddle docs [page]` | These pages, offline: a page's markdown, or the list of pages. From 0.2.0-beta.17. | | `waddle help` | Opens Waddle's manual. `--text` prints the command list. | | `waddle --version` | Waddle's version. | ## waddle wait ```sh waddle wait npm test waddle wait "npm test && npm run build" waddle wait cargo build --release; echo done ``` One quoted string with spaces or shell bits runs in your shell. In a terminal, the command keeps its colours and progress bars, and you can still type to it. Ctrl-C stops the command, and Waddle stays put: you're right there. Only the command's name, how long it took, whether it worked and its last line go to Waddle. Its output never leaves your terminal. ## Exit codes | Code | When | |---|---| | 0 | It worked. | | 1 | Waddle isn't running (`waddle: couldn't reach Waddle on this Mac (is it running?)`). | | 2 | Something's missing from the command, like `waddle say` with nothing to say. | `waddle wait` is the exception: it exits with your command's code. ## Run by an agent When an agent runs `waddle wait`, Waddle notes it down instead of walking over: the agent already has the answer, and its duckling shows it's busy. Waddle knows an agent ran it from the marks agents leave in their environment (`CLAUDECODE`, `CODEX_SANDBOX`, `OPENCODE`, `GEMINI_CLI`, `CURSOR_AGENT`), or `WADDLE_AGENT` if you set it. --- # Make Waddle react > Anything on your Mac can make Waddle react: a script, a git hook, the end of a test run. Send a line to localhost:4404 and Waddle turns to you and says it. ## Send one ```sh curl localhost:4404/quack \ -H 'content-type: application/json' \ -d '{"mood":"dance","text":"shipped!"}' ``` ```sh waddle say shipped! ``` ```js await fetch('http://localhost:4404/quack', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ mood: 'dance', text: 'shipped!' }), }); ``` `waddle say` always quacks. For the other moods, use the API. ## Fields | Field | Type | What it does | |---|---|---| | `mood` | string | `quack`, `dance`, `pet` or `sleep`. Quack if you leave it out. | | `text` | string | What Waddle says, up to 140 characters (longer is cut to fit, ending in ...). The pixel font draws letters, numbers and `. , ! ? ' : - / %`, in capitals. | | `seconds` | number | How long it keeps at it, 1 to 600. | | `go` | `"center"` | Walk to the middle of the screen first. | | `phrase` | string | One of Waddle's own lines instead of `text`: `agent-done`, `agent-waiting`, `agent-decision`, `deploy-live`, `deploy-failed`. | | `project` | string | The name in that line ("limen is live!"), up to 40 characters. | ## The reply ```sh curl localhost:4404/quack -H 'content-type: application/json' -d '{"mood":"sleep","seconds":5}' ``` ```json { "ok": true, "mood": "sleep", "seconds": 5 } ``` The reply repeats what Waddle will do. With a `phrase`, its `text` is the line Waddle picked. ## In the coop When Waddle is in the coop (do not disturb), it doesn't come out: the news goes in its mailbox, and the reply says `"mailed": true`. News sent with a `phrase` replaces the last letter of the same kind (agent or deploy) about the same project. ## Errors ```sh curl localhost:4404/quack -H 'content-type: application/json' -d '{"mood":"sing"}' ``` ```json { "ok": false, "error": "mood must be one of: quack, dance, pet, sleep" } ``` | Status | When | |---|---| | 400 | A field is wrong. The error says what to send. | | 403 | A web page sent it: `"No browsers, sorry"`. | | 405 | Not a POST. | | 413 | More than 4 KB. | | 415 | Not `content-type: application/json`. | ```sh curl localhost:4404/quack -d 'text=hi' ``` ```json { "ok": false, "error": "Send JSON with Content-Type: application/json" } ``` Only programs on this Mac can reach it. A web page gets 403, so no site you visit can make Waddle talk. See [What listens on your Mac](https://docs.waddle.sh/local-api.md). --- # Sessions > POST /session tells the creek what an agent session is doing. Every field, and the errors. ## The request `POST localhost:4404/session`, with `content-type: application/json`. | Field | Type | What it is | |---|---|---| | `session` | string | The session's id: 8 to 64 letters, digits and dashes. Required. | | `event` | string | `start`, `prompt`, `tool`, `turn` or `end`. Required. | | `cwd` | string | The session's folder, from `/`. Its last part names the duckling. Required. | | `pid` | number | The agent's process id. Send it if you can: Waddle drops the duckling when that process exits (without it and without `end`, a duckling stays up to 12 hours). | | `agent` | string | Which agent: `claude`, `codex`, `opencode` or `pi`. Leave it out for your own agent: Waddle then counts it as Claude Code (it predates the field), so Claude Code shows as heard in Preferences. | | `term` | object | Where it runs, so a click can jump there: `app` (the terminal's bundle id), `program` (`$TERM_PROGRAM`), `iterm` (`$ITERM_SESSION_ID`), `tty` (like `ttys004`). Each is optional and checked. | | `web` | boolean | On a `tool` event: the step read the web. Only that it did, never what. | ## The events | Event | When | The duckling | |---|---|---| | `start` | A session begins | Swims in | | `prompt` | Someone asks it something | Works | | `tool` | It takes a step | Works | | `turn` | It's done, or waiting on you | Up on the bank | | `end` | The session is over | Leaves | ## Replies ```sh curl localhost:4404/session -H 'content-type: application/json' -d '{"event":"start","cwd":"/tmp"}' ``` ```json { "ok": false, "error": "Send \"session\": the session id" } ``` A good request answers `{ "ok": true }`. A bad one answers 400 with what to send instead: a missing `event` lists the five, a missing or relative `cwd` asks for the session's folder. A session event only moves the duckling. For Waddle to walk over, send news to [/quack](https://docs.waddle.sh/quack.md) with a phrase. --- # Finished commands and deploys > POST /command brings Waddle's newspaper for a command that finished. POST /deploy is the deploy duck. ## A command finished What `waddle wait` and the shell hook send. Waddle brings it as a newspaper: happy if it worked, with the last line it printed if not. ```sh curl localhost:4404/command -H 'content-type: application/json' \ -d '{"command":["npm","test"],"code":0,"seconds":42.5,"cwd":"/Users/you/code/limen"}' ``` ```json { "ok": true } ``` | Field | Type | What it is | |---|---|---| | `command` | list of strings | The command, as words. Up to 8 words of 200 characters. Required. | | `code` | number | Its exit code, 0 to 255. 0 is a pass. Required. | | `seconds` | number | How long it took, up to 7 days. Required. | | `last` | string | The last line it printed. Waddle fits it in its bubble. | | `cwd` | string | Where it ran, from `/`. | | `term` | object | Where to jump back to on a click, as in [Sessions](https://docs.waddle.sh/sessions.md). | | `agent` | boolean | An agent ran it: Waddle only notes it down. | In the coop, the reply adds `"mailed": true` and the paper waits in the mailbox. ## A deploy went live For a deploy Waddle doesn't see on GitHub. (Waddle watches GitHub itself for deploys from Vercel, Render, Railway, GitHub Pages, Actions and Netlify: Preferences → News → Deploys.) ```sh curl localhost:4404/deploy -H 'content-type: application/json' \ -d '{"name":"limen-fm","outcome":"live"}' ``` ```sh waddle deploy limen-fm live ``` ```json { "ok": true } ``` | Field | Type | What it is | |---|---|---| | `name` | string | What went live, up to 60 characters. Required. | | `outcome` | string | `live` or `failed`. Live if you leave it out. | ```sh curl localhost:4404/deploy -H 'content-type: application/json' -d '{"outcome":"live"}' ``` ```json { "ok": false, "error": "Send {\"name\":\"limen-fm\",\"outcome\":\"live\"}: what went live" } ``` --- # Waddle Notes API > Read and write Waddle Notes from your own programs, within the switches you set for agents. Waddle Notes are plain markdown files on your Mac. These routes let a program search, read and write them through Waddle. Most agents should use [MCP tools](https://docs.waddle.sh/mcp.md) instead, which use these routes. ## Routes | Route | What it does | |---|---| | `GET /notes/can` | What's allowed: `{ "ok": true, "can": { "read", "create", "append", "rewrite", "trash" } }`. | | `GET /notes?q=&limit=` | Search, or the newest with no `q`. | | `GET /notes/show?ref=` | One note, by its path or title. | | `POST /notes/create` | `{"title", "text", "folder"?}`: a new note. It goes in `inbox` unless you name a folder. It never writes over one. | | `POST /notes/append` | `{"note", "text"}`: adds the text at the end. | | `POST /notes/rewrite` | `{"note", "text"}`: replaces the whole note. Empty text is refused. | | `POST /notes/trash` | `{"note"}`: into the macOS Trash, so Finder can put it back. | ```sh curl localhost:4404/notes/create -H 'content-type: application/json' \ -d '{"title":"standup","text":"shipped the docs","folder":"work"}' ``` ## Who may do what The writes follow the switches in Preferences → Agents → Your notes, whoever calls them. Reading follows "Read and search" when the caller says it's an agent (`?agent=1`). | Switch | Out of the box | |---|---| | Read and search | On | | Make new notes | On | | Add to a note | On | | Rewrite a note | Off | | Move a note to the Trash | Off | A write that's off answers 403 with `"error": "not-allowed"`. ## Limits - A write names its note exactly: its path (like `limen/limen launch.md`) or its exact title. If several notes share a title, nothing is written, and the reply lists their paths. - At most 200 KB of text in one call. --- # MCP tools > waddle mcp is an MCP server that gives agents your notes, the context you let them read, and a way to tell Limen about Waddle. ## Add it ```sh claude mcp add --scope user waddle -- waddle mcp ``` `--scope user` adds it for every folder, not only this one. Any agent that speaks MCP can start `waddle mcp` the same way, as a local server on stdio. It talks only to Waddle on this Mac, and Waddle does the reading and writing, so Waddle has to be running. Apps opened from the Dock need the command's full path: Preferences → Agents shows the line with it, and a Copy button. ## Notes | Tool | What it does | Allowed by | |---|---|---| | `notes_search` {query, limit?} | Words (typos forgiven), `#tag`, `in:folder`, `"exact words"`. Empty gives the newest. 10 results, 50 at most. | Read and search | | `notes_read` {note} | One note's markdown, by path or title. If none matches, the closest, and it says so. | Read and search | | `notes_create` {title, text, folder?} | A new note, in `inbox` unless it names a folder. Never writes over one. | Make new notes | | `notes_append` {note, text} | Adds the text at the end. | Add to a note | | `notes_rewrite` {note, text} | Replaces the whole note. | Rewrite a note | | `notes_trash` {note} | Into the macOS Trash. | Move a note to the Trash | You choose what agents may do, in Preferences → Agents → Your notes. Rewrite and the Trash are off until you turn them on. A tool that's off isn't listed, and a call to it is refused by Waddle too. When you change a switch, a running agent is told the tool list changed. ## Your context | Tool | What it does | |---|---| | `context_list` | The pages this agent may read here. The context tools are listed once your shelves have a page. | | `context_read` {page} | One page, if it may read it here. | | `context_search` {query, limit?} | Words in the pages it may read here. | | `context_propose` {page, lesson, words?, said?, why?} | A lesson for one page, with your exact words. It waits in Waddle for your yes. | What each agent may read is set per agent and per folder, in Waddle. Waddle knows the agent by the name its client gives, and the folder by where the agent started the server. ## A note to Limen | Tool | What it does | |---|---| | `feedback_send` {happened, expected?, more?} | A short note about Waddle itself: a bug, something confusing, an idea. Never about the project the agent is in. | You pick what happens to it, in Preferences → Agents: by default it opens in Waddle for you to read and send. ## The protocol - JSON-RPC 2.0 over stdio, one message a line. Logs go to stderr. - Protocol versions `2025-06-18`, `2025-03-26` and `2024-11-05`. - `ping`, `tools/list`, `tools/call`; `notifications/tools/list_changed` when what's allowed changes. - A tool that fails returns `isError: true` with a sentence saying what to do. - When stdin closes, it finishes what it's doing and exits 0. --- # Quick action scripts > A script with a title header in ~/.waddle/actions becomes an action in Waddle's palette (⌥Space). Raycast script commands work as they are. ## Make one Put an executable script in `~/.waddle/actions` (or one folder down), with a title header. Save this one as `~/.waddle/actions/say-hi.sh`: ```sh #!/bin/bash # @waddle.title Say hi # @waddle.mode say # @waddle.argument1 name (optional) # @waddle.icon 👋 echo "hi ${1:-there}!" ``` Then `chmod +x say-hi.sh`, press ⌥Space, and type its name. Waddle says the first line it prints. For a fuller one, look at `free-port.sh` in the same folder, which Waddle put there. ## Headers | Header | What it does | |---|---| | `@waddle.title` | Its name in the palette. Required. | | `@waddle.mode` | What happens to what it prints (below). | | `@waddle.argument1` to `3` | Up to three arguments. End one with `(optional)` to make it optional. | | `@waddle.icon` | Its icon. | | `@waddle.confirm true` | Asks before it runs. | Raycast's `@raycast.*` headers are read too, so Raycast script commands work as they are. ## Modes | Mode | What happens | |---|---| | `say` | Waddle says the first line it prints. The default. | | `silent` | Nothing. | | `copy` | Copies what it prints. | | `paste` | Pastes it where you were typing (needs Accessibility). | | `open` | Opens it: a link or a file. | | `show` | The palette shows everything it printed. | ## How they run - Only when you pick them, from that folder, for 60 seconds at most. - With your shell's PATH. What they print stays on your Mac. - Errors stay in the palette, with Copy error. Waddle comes with examples in that folder (ports in use, open localhost, a UUID, pretty JSON, a JWT, a timestamp and more). Change or delete any of them: Waddle leaves one you've changed alone and doesn't bring back one you've deleted. --- # Webhooks > Waddle posts your notes to other apps as you save them, signed the Standard Webhooks way, and tries again when the app is down. ## Add one Webhooks are added and changed only in Waddle's Preferences → Webhooks: give it an address, and pick which notes go (folders, `#tags`, meetings from a calendar, with rules and a "never" list). No agent, script or API can add one, so nothing can route your notes off your Mac without you. Turn on **Ask me first** for anything sensitive: each send waits in Waddle for your yes. ## What arrives A POST with a JSON body in the [Standard Webhooks](https://www.standardwebhooks.com) shape, so an existing library can read it: ```json { "type": "note.saved", "timestamp": "2026-11-23T09:41:00.000Z", "data": { "note": { "path": "meetings/standup 23 nov.md", "folder": "meetings", "title": "standup 23 nov", "tags": ["work"], "edited": "2026-11-23T09:40:41.000Z", "markdown": "# standup 23 nov\n\n…" }, "created": true } } ``` | Type | When | `data` | |---|---|---| | `note.saved` | A note stopped changing for 20 seconds, or you left it | `note` (path, folder, title, tags, edited, markdown), `created` | | `note.moved` | Moved or renamed | `from`, and the `note` at its new path | | `note.trashed` | Into the Trash | `note` (path, folder, title, tags), no text | | `meeting.noted` | A meeting note was written | `note`, `meeting` (title, calendar, started, minutes, people) | | `meeting.summarised` | A meeting's summary was written (Waddle Club; off until you turn it on per webhook) | `note`, `summary` | | `waddle.test` | You pressed Send a test | `message`, `webhook` | A note's `path` is the id to key on. Only the newest version of a note is ever waiting: a newer save replaces it. ## Check the signature Each request has `webhook-id`, `webhook-timestamp` and `webhook-signature` headers. The signature is `v1,` and the base64 HMAC-SHA256 of `id.timestamp.body`, keyed with your secret's bytes (the part after `whsec_`, base64). Preferences copies the secret for you. ```js import { createHmac, timingSafeEqual } from 'node:crypto'; /** True if Waddle sent this body. `secret` is the whsec_… from Preferences. */ export function fromWaddle(secret, headers, body) { const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64'); const want = createHmac('sha256', key).update(`${headers['webhook-id']}.${headers['webhook-timestamp']}.${body}`).digest('base64'); return (headers['webhook-signature'] ?? '').split(' ').some((s) => { const [v, sig = ''] = s.split(','); return v === 'v1' && sig.length === want.length && timingSafeEqual(Buffer.from(sig), Buffer.from(want)); }); } ``` Use the body exactly as it arrived, before parsing it. You can also add one header of your own to every request (for an app that wants `Authorization: Bearer …`). ## Delivery - **Retries:** a network error, a timeout (15 seconds), 408, 429 or a 5xx tries again in 1 minute, 5, 30, then hourly, for 24 hours. `Retry-After` is honoured. - **Any other 4xx** means your app said no: Waddle stops and waits for an edit or Try now, and walks over once if retrying won't help. - **Redirects aren't followed.** A 3xx is a failure, so a send can't be bounced somewhere else. - **In order.** One send at a time per webhook, so a move never overtakes the save before it. Offline or asleep, the clock stops, and the queue survives a quit. - **https only,** except to this Mac (`localhost`, `127.0.0.1`, `::1`), which may be http. - `User-Agent: Waddle/`. Waddle keeps a record of the last 200 sends per webhook (when, the type, the path, the status, how long), never the note's text. --- # Your quack address > A private address only you have. Anything that can make a web request can POST a line to it, and Waddle walks over with it on each of your Macs. Waddle Club. ## Get yours ```sh waddle url ``` It's copied, ready to paste: `https://quack.waddle.sh/quack/` and a secret of 24 letters and digits. `waddle url --new` makes a new one (the old one stops working), and `waddle url --stop` stops it. Run it in your own terminal: agents can't read your address. Only the Mac that made the address can show it again. Treat it like a password. Whoever has it can make Waddle talk. ## Send a line ```sh curl https://quack.waddle.sh/quack/ -d 'deploy finished' ``` Plain text, or JSON with a title: ```sh curl https://quack.waddle.sh/quack/ \ -H 'content-type: application/json' \ -d '{"title":"nightly","text":"all 214 tests passed"}' ``` Waddle brings it as a paper plane, on each of your Macs that's signed in. | Field | What it is | |---|---| | `text` | Up to 1,000 characters. Required. | | `title` | Up to 60 characters. | It's only ever drawn, never run: control characters are dropped. The server keeps a quack until each of your Macs has it, or 7 days. ## Replies | Status | `error` | When | |---|---|---| | 200 | | `{ "ok": true }` | | 400 | `no-text`, `bad-json` | Nothing to say, or JSON that doesn't parse | | 402 | `not-in-club` | The address belongs to someone who isn't in the Waddle Club now | | 404 | `no-such-address` | No address like that | | 413 | `too-long` | More than 1,000 characters | | 429 | `too-many` | More than 30 a minute, or 500 a day (a quack to two Macs counts twice). `Retry-After: 60`. | The reply never says how many Macs you have. ## From CI A GitHub Actions step, with the address kept as a secret named `WADDLE_QUACK`: ```yaml - name: Tell Waddle if: always() run: | curl -fsS "$WADDLE_QUACK" -d "${{ github.workflow }}: ${{ job.status }}" || true env: WADDLE_QUACK: ${{ secrets.WADDLE_QUACK }} ``` More in [A deploy duck from CI](https://docs.waddle.sh/deploys.md). --- # Tell me when tests finish > Two ways to have Waddle walk over when a long command is done: waddle wait for one command, the shell hook for all of them. ## One command ```sh waddle wait npm test ``` Waddle walks over when it's done: happy if it passed, with the last line it printed if not. Click Waddle to jump back to that terminal. ## Every long command Add the hook to your shell, and any command that takes 30 seconds or more and finishes while you're in another app, Waddle brings. ```sh # in ~/.zshrc eval "$(waddle hook zsh)" ``` ```sh # in ~/.bashrc eval "$(waddle hook bash)" ``` ```sh # in ~/.config/fish/config.fish waddle hook fish | source ``` - It skips Ctrl-C, editors, pagers, ssh, `top`, agents like `claude` and the like: you were there for those. - Change the 30 seconds with `WADDLE_MIN_SECONDS`, like `export WADDLE_MIN_SECONDS=60`. - The prompt never waits: the hook tells Waddle in the background. ## In a script `waddle wait` exits with the command's own exit code, so it drops into scripts and Makefiles without changing what they do: ```sh waddle wait npm run build && npm run deploy ``` --- # A deploy duck from CI > Waddle celebrates when a deploy goes live. Three ways to get the news to it, depending on where the deploy runs. ## Deploys GitHub knows about No code to write. Waddle watches GitHub for the deploys of the repos you pick, from any host that tells GitHub: Vercel, Render, Railway, GitHub Pages, Actions, and Netlify through its commit status. Turn it on in Preferences → News → Deploys: add a fine-grained GitHub token with Deployments set to Read-only (on Netlify, Commit statuses too), then tick the repos. Production is on to start, previews off. ## Deploys from your Mac A deploy script on your own Mac can tell Waddle when it's done: ```sh ./deploy.sh && waddle deploy limen-fm live || waddle deploy limen-fm failed ``` Or from any language, `POST localhost:4404/deploy` with `{"name","outcome"}`: see [Finished commands and deploys](https://docs.waddle.sh/commands.md). ## Deploys anywhere else CI runners can't reach your Mac. Waddle Club members can send it to their [quack address](https://docs.waddle.sh/quack-address.md) instead, from any CI: ```yaml - name: Tell Waddle if: always() run: | curl -fsS "$WADDLE_QUACK" -H 'content-type: application/json' -d "{\"title\":\"deploy\",\"text\":\"${{ github.repository }}: ${{ job.status }}\"}" || true env: WADDLE_QUACK: ${{ secrets.WADDLE_QUACK }} ``` Keep the address in your CI's secrets: whoever has it can make Waddle talk. The `|| true` keeps a busy or lapsed address (429, 402) from turning the job red. --- # Keep notes in sync > Send meeting notes to another app (a company wiki, a context engine) as you save them, with a small receiver that checks Waddle's signature. ## 1. A receiver Any https endpoint that takes a POST will do. This one, in Node, checks the signature and keeps each note by its path. To try it on this Mac, use `http://localhost:8787` as the address (Waddle allows http only to this Mac). Save it as `server.mjs`, with the function from the Webhooks page as `from-waddle.mjs`: ```js import { createServer } from 'node:http'; import { fromWaddle } from './from-waddle.mjs'; // the function on the Webhooks page const SECRET = process.env.WADDLE_SECRET; // the whsec_… from Waddle's Preferences const save = (path, markdown) => { /* your store */ }, move = (from, to) => {}, remove = (path) => {}; createServer((req, res) => { let body = ''; req.setEncoding('utf8'); // a character split across chunks would break the signature req.on('data', (c) => (body += c)); req.on('end', () => { if (!fromWaddle(SECRET, req.headers, body)) return res.writeHead(401).end(); const { type, data } = JSON.parse(body); if (type === 'note.saved' || type === 'meeting.noted' || type === 'meeting.summarised') save(data.note.path, data.note.markdown); if (type === 'note.moved') move(data.from, data.note.path); if (type === 'note.trashed') remove(data.note.path); res.writeHead(204).end(); }); }).listen(8787); ``` Answer 2xx quickly. A 5xx or a timeout makes Waddle try again later; any other 4xx makes it stop and tell you. ## 2. The webhook In Waddle's Preferences → Webhooks, add one with your receiver's address and pick the notes: say, meetings from your Work calendar. Leave "Send the notes already there" off unless you want the backlog too. Press **Send a test** and check your receiver got a `waddle.test`. ## 3. Sensitive notes Turn on **Ask me first**. Each send waits at the top of Preferences → Webhooks for your yes, and you can see the exact body before it goes. Every type, header and retry rule: [Webhooks](https://docs.waddle.sh/webhooks.md). --- # What listens on your Mac > Waddle's local API, what can reach it, and what it refuses. ## One port, this Mac only Waddle listens on `127.0.0.1:4404`, so nothing on your network can reach it. It checks each request: - **The host.** Only `127.0.0.1:4404`, `localhost:4404` or `[::1]:4404`, so a web page can't reach it through a DNS trick. - **No browsers.** Anything a browser sends carries an `Origin` or `Sec-Fetch-Site` header, and gets 403 `"No browsers, sorry"`. Curl, scripts, your agents' hooks and the `waddle` command never send those. - **JSON only.** A POST needs `content-type: application/json`, which a web form can't send. - **Small bodies.** 4 KB, except notes (room for 200 KB of text). ```sh curl localhost:4404/quack -H 'content-type: application/json' -H 'origin: https://example.com' -d '{}' ``` ```json { "ok": false, "error": "No browsers, sorry" } ``` ## What it trusts Any program running as you on your Mac can reach the API, the same as it can read your files. The API believes what a caller says about itself (that it's an agent, say). The rules for agents below are a guard for honest agents, not a lock. ## What never leaves your Mac The API, the hooks and `waddle mcp` all stay on this Mac. What does leave, like the weather, the update check, webhooks and notes to Limen, is listed in Waddle's Preferences → What's sent, with what's sent and the last time. --- # What agents can't do > The things in Waddle that stay yours, whatever an agent asks. ## Yours only - **Letters, friends, invites and your quack address.** Only from a terminal you're typing in. The `waddle` command treats anything else as an agent: agents run commands through pipes, whether or not they say so. - **Webhooks.** Only Preferences adds or changes one. No agent, script or API call can send your notes somewhere new. - **Your context's lessons.** An agent can propose one, with your words; it waits for your yes. There's no tool or route to answer one. - **Rewriting and trashing notes.** Off until you turn them on, in Preferences → Agents → Your notes. ## What agents can see What an agent reads through Waddle, its model sees too: for Claude Code, that's Anthropic's servers. So each agent reads only the context pages you've given it, per folder, and only the notes tools you've left on. ## Stopping secrets Waddle's secret guard, off until you turn it on, stops the agents Waddle set up before a secret goes into a command, an MCP call, a commit or a push. The agent is told why and carries on. Only you clear a false alarm, with a click in Waddle. ## Honest agents, not a lock These rules hold for agents that go through `waddle mcp` or the `waddle` command. Any program running as you can reach Waddle's API directly, the same as it can read your files. See [What listens on your Mac](https://docs.waddle.sh/local-api.md).