Skip to content

Commit 0fd6e19

Browse files
docs: explain bundled plugin npm override
1 parent 823086c commit 0fd6e19

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

docs/cli/plugins.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ rewriting files.
103103

104104
```bash
105105
openclaw plugins search "calendar" # search ClawHub plugins
106-
openclaw plugins install <package> # npm by default
106+
openclaw plugins install <package> # source auto-detection
107107
openclaw plugins install clawhub:<package> # ClawHub only
108108
openclaw plugins install npm:<package> # npm only
109109
openclaw plugins install npm-pack:<path.tgz> # local npm pack through npm install semantics
@@ -123,7 +123,7 @@ sources with guarded environment variables. See
123123
[Plugin install overrides](/plugins/install-overrides).
124124

125125
<Warning>
126-
Bare package names install from npm by default during the launch cutover. Use `clawhub:<package>` for ClawHub. Treat plugin installs like running code. Prefer pinned versions.
126+
Bare package names install from npm by default during the launch cutover, unless they match an official plugin id. Raw `@openclaw/*` package specs that match bundled plugins use the bundled copy that shipped with the current OpenClaw build. Use `npm:<package>` when you deliberately want an external npm package instead. Use `clawhub:<package>` for ClawHub. Treat plugin installs like running code. Prefer pinned versions.
127127
</Warning>
128128

129129
`plugins search` queries ClawHub for installable plugin packages and prints
@@ -171,7 +171,9 @@ is available, then fall back to `latest`.
171171

172172
Npm specs are **registry-only** (package name + optional **exact version** or **dist-tag**). Git/URL/file specs and semver ranges are rejected. Dependency installs run project-local with `--ignore-scripts` for safety, even when your shell has global npm install settings. Managed plugin npm roots inherit OpenClaw's package-level npm `overrides`, so host security pins apply to hoisted plugin dependencies too.
173173

174-
Use `npm:<package>` when you want to make npm resolution explicit. Bare package specs also install directly from npm during the launch cutover.
174+
Use `npm:<package>` when you want to make npm resolution explicit. Bare package specs also install directly from npm during the launch cutover unless they match an official plugin id.
175+
176+
Raw `@openclaw/*` package specs that match bundled plugins resolve to the image-owned bundled copy before npm fallback. For example, `openclaw plugins install @openclaw/[email protected] --pin` uses the bundled Discord plugin from the current OpenClaw build instead of creating a managed npm override. To force the external npm package, use `openclaw plugins install npm:@openclaw/[email protected] --pin`.
175177

176178
Bare specs and `@latest` stay on the stable track. OpenClaw date-stamped correction versions such as `2026.5.3-1` are stable releases for this check. If npm resolves either of those to a prerelease, OpenClaw stops and asks you to opt in explicitly with a prerelease tag such as `@beta`/`@rc` or an exact prerelease version such as `@1.2.3-beta.4`.
177179

@@ -207,7 +209,7 @@ openclaw plugins install clawhub:openclaw-codex-app-server
207209
openclaw plugins install clawhub:[email protected]
208210
```
209211

210-
Bare npm-safe plugin specs install from npm by default during the launch cutover:
212+
Bare npm-safe plugin specs install from npm by default during the launch cutover unless they match an official plugin id:
211213

212214
```bash
213215
openclaw plugins install openclaw-codex-app-server
@@ -217,6 +219,7 @@ Use `npm:` to make npm-only resolution explicit:
217219

218220
```bash
219221
openclaw plugins install npm:openclaw-codex-app-server
222+
openclaw plugins install npm:@openclaw/[email protected]
220223
openclaw plugins install npm:@scope/[email protected]
221224
```
222225

docs/tools/plugin.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ Before installing a plugin, make sure you have:
4040
```
4141

4242
ClawHub is the primary discovery surface for community plugins. During the
43-
launch cutover, ordinary bare package specs still install from npm. Use an
43+
launch cutover, ordinary bare package specs still install from npm unless
44+
they match an official plugin id. Raw `@openclaw/*` package specs that match
45+
bundled plugins use the bundled copy from the current OpenClaw build. Use an
4446
explicit prefix when you need one source.
4547

4648
</Step>
@@ -126,10 +128,13 @@ Before installing a plugin, make sure you have:
126128
Bare package specs have special compatibility behavior. If the bare name matches
127129
a bundled plugin id, OpenClaw uses that bundled source. If it matches an
128130
official external plugin id, OpenClaw uses the official package catalog. Other
129-
ordinary bare package specs install through npm during the launch cutover. Use
130-
`clawhub:`, `npm:`, `git:`, or `npm-pack:` when you need deterministic source
131-
selection. See [`openclaw plugins`](/cli/plugins#install) for the full command
132-
contract.
131+
ordinary bare package specs install through npm during the launch cutover. Raw
132+
`@openclaw/*` package specs that match bundled plugins also resolve to the
133+
bundled copy before npm fallback. Use `npm:@openclaw/<plugin>@<version>` when
134+
you deliberately want the external npm package instead of the image-owned
135+
bundled copy. Use `clawhub:`, `npm:`, `git:`, or `npm-pack:` when you need
136+
deterministic source selection. See [`openclaw plugins`](/cli/plugins#install)
137+
for the full command contract.
133138

134139
### Configure plugin policy
135140

0 commit comments

Comments
 (0)