This is a minimal Buddy plugin that exposes one tool:
hello-world: returnshello world
Buddy plugin folders need a package.json with buddy.entry, plus an ESM entrypoint that default-exports a plugin object. This example uses the published SDK import:
import { definePlugin, defineTool } from "@teichai/buddy/plugin";To try it locally:
- Optional: run
npm installinside this folder if you want local tooling while editing the example. - Run
npm run install:buddyto copy the plugin into~/.buddy/plugins/example-plugin. - Start Buddy and ask it to call the
example_plugin__hello_worldtool.
The installer copies the plugin files, skips the local node_modules/, and installs any extra runtime dependencies into the shared ~/.buddy/plugins/node_modules location. The Buddy SDK package itself is excluded because Buddy resolves @teichai/buddy/plugin automatically at runtime.
To remove the example plugin again, run:
npm run uninstall:buddy