cmd plugin dev - nself-org/cli GitHub Wiki
Start a plugin in development mode with hot-reload.
nself plugin dev <name> [flags]Wraps the plugin SDK's dev-watch.sh script to give plugin authors a first-class
inner development loop. On first run, auto-links the plugin directory into the ɳSelf
shadow registry so changes are picked up immediately on the next nself build.
Prefers air for hot-reload. Falls back to fswatch polling if air is not installed.
Falls back to a bundled inline watch script if neither is available.
| Flag | Default | Description |
|---|---|---|
--no-link |
false | Skip auto-link step (manage linking manually) |
--debug |
false | Attach dlv debugger (delegates to nself plugin debug) |
--entrypoint |
./cmd |
Plugin entrypoint directory passed to dev-watch.sh |
# Start hot-reload watcher with auto-link
nself plugin dev myplugin
# Skip auto-link (plugin already linked)
nself plugin dev myplugin --no-link
# Start with debugger attached
nself plugin dev myplugin --debug
# Custom entrypoint
nself plugin dev myplugin --entrypoint ./cmd/serverStarting myplugin in development mode...
Plugin path: /home/user/plugins/myplugin
Auto-linking myplugin...
Plugin linked.
Using watch script: /usr/local/share/plugin-sdk-go/devkit/tools/dev-watch.sh
Entrypoint: ./cmd
Watching for changes — press Ctrl+C to stop.
Install air for the best hot-reload workflow:
go install github.com/air-verse/air@latestOr install fswatch (macOS):
brew install fswatch- cmd-plugin-link, link a local plugin directory
- cmd-plugin-debug, attach dlv debugger
- cmd-plugin-test, run plugin test suite
- cmd-plugin-logs, tail plugin container logs
- Home