A small working Lerd plugin that uses every surface a plugin can add, so you can see how each one is wired before writing your own. It is what lerd plugin new <name> generates, with this README and a license added, and it is the example submission in the plugin registry.
- CLI commands:
lerd example:greet [site]prints a greeting,lerd example:siteslists your sites through Lerd's API,lerd example:notifysends you a notification - Notifications: it asks to send them, so Lerd asks you at install, and it sends one only when you run
example:notify - Site command: Greet in every site's Commands menu and the command palette
- Hooks: on
site.linkedandsite.unlinked - MCP tool and skill:
example_greet, with a skill telling your AI assistant when to call it - API endpoint:
GET /api/plugins/example/greet?site=<name> - Dashboard page, site tab and Overview card: an Example page on the rail, an Example tab on every site, and a card on the Overview of the sites you switch it on for
- Page script: a small button on the pages of the sites you switch the plugin on for, which calls the plugin's own endpoint
- Its own card in the dashboard: an icon, screenshots and a DOCS.md, shown on the plugin's Documentation tab once it is installed
Its pages are built from the look Lerd gives every plugin page, so they follow the dashboard's light or dark mode and its theme without a line of colour of their own.
It reads only the site name Lerd hands it. The hooks append each event and its payload to events.log in the plugin's own data folder, and nothing else is written. lerd example:sites and lerd example:notify call Lerd's own API on your machine with the token Lerd gives the plugin, the second to show you a notification once you allow it. Nothing leaves your machine.
It needs curl for example:sites, and runs on Lerd 1.38 or newer.
lerd plugin install examplelerd plugin new my-pluginThen read the plugin guide, and when it is ready, submit it to the registry.
MIT
