mesh-plugin — Hot-loadable tool plugin system for Hive37 Mesh Protocol
mesh plugin [args...]
---
tool: mesh-plugin
layer: infrastructure
status: active
commands: install,remove,list,info,enable,disable,run,init,validate,dispatch
cli: mesh plugin|plug|pl
ledger: plugins.d/plugin-ledger.jsonl
---
# mesh-plugin — Hot-Loadable Tool Plugin System
Extends the mesh protocol without modifying mesh.sh. Plugins are bash scripts
with metadata headers that register commands. Once installed, plugin commands
are auto-dispatched from the mesh CLI.
## Plugin Format
```bash
# PLUGIN_NAME: my-tool
# PLUGIN_VERSION: 1.0
# PLUGIN_COMMANDS: mycmd,myalias
# PLUGIN_DESC: What it does
plugin_run() { echo "hello"; }
plugin_run "$@"
```
## Key Commands
- `mesh plugin install <path|url>` — Install from file or URL
- `mesh plugin list` — Show installed plugins
- `mesh plugin disable <name>` — Disable without removing
- `mesh <plugin-command> [args]` — Auto-dispatched via fallback
## Architecture
- Registry: `plugins.d/registry.json`
- Scripts: `plugins.d/<name>.sh`
- Dispatch: mesh.sh falls through to plugin system for unknown commands