cmd plugin link - nself-org/cli GitHub Wiki
Register or remove a local plugin directory as a shadow override for development.
nself plugin link <local-path> [flags]
nself plugin link --list
nself plugin unlink <name>plugin link registers a local directory as a plugin shadow. On the next nself build,
the CLI uses your local source instead of the registry version. The link persists in
~/.nself/plugin-links.json across CLI invocations until you unlink.
plugin unlink removes the shadow and restores the registry version on the next build.
| Mode | Flag | Description |
|---|---|---|
| Container-mount | (default) | Mounts source into container, runs air inside (closer to production) |
| Host-process | --host |
Runs plugin process on host (faster I/O on macOS) |
The container-mount default works well on Linux and Windows WSL2. On macOS, --host is
recommended to avoid Docker's osxfs file-watching latency.
| Flag | Default | Description |
|---|---|---|
--host |
false | Use host-process mode instead of container-mount |
--list |
false | List currently linked plugins and exit |
No additional flags. Unlinking an already-unlinked plugin is a no-op.
# Link a plugin directory
nself plugin link /path/to/myplugin
# Link using host-process mode (recommended on macOS)
nself plugin link /path/to/myplugin --host
# List all currently linked plugins
nself plugin link --list
# Unlink a plugin (restores registry version on next build)
nself plugin unlink mypluginplugin link rejects paths that:
- Do not exist or are not directories
- Do not contain a
plugin.yamlmanifest
error: path "/tmp/notaplugin" does not contain plugin.yaml — not a valid plugin directory
Links are stored in ~/.nself/plugin-links.json with 0600 permissions:
{
"myplugin": "/home/user/dev/myplugin",
"another": "/home/user/dev/another"
}- cmd-plugin-dev, start hot-reload watcher
- cmd-plugin-test, run plugin test suite
- Home