Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1020 Bytes

File metadata and controls

25 lines (16 loc) · 1020 Bytes

Example Buddy Plugin

This is a minimal Buddy plugin that exposes one tool:

  • hello-world: returns hello 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:

  1. Optional: run npm install inside this folder if you want local tooling while editing the example.
  2. Run npm run install:buddy to copy the plugin into ~/.buddy/plugins/example-plugin.
  3. Start Buddy and ask it to call the example_plugin__hello_world tool.

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