























@@ -0,0 +1,180 @@
1+---
2+summary: "Quick examples for installing, listing, uninstalling, updating, and publishing OpenClaw plugins"
3+read_when:
4+ - You want quick plugin install, list, update, or uninstall examples
5+ - You want to choose between ClawHub and npm plugin distribution
6+ - You are publishing a plugin package
7+title: "Manage plugins"
8+sidebarTitle: "Manage plugins"
9+---
10+11+Most plugin workflows are a few commands: search, install, restart the Gateway,
12+verify, and uninstall when you no longer need the plugin.
13+14+## List plugins
15+16+```bash
17+openclaw plugins list
18+openclaw plugins list --enabled
19+openclaw plugins list --verbose
20+openclaw plugins list --json
21+```
22+23+Use `--json` for scripts. It includes registry diagnostics and each plugin's
24+static `dependencyStatus` when the plugin package declares `dependencies` or
25+`optionalDependencies`.
26+27+```bash
28+openclaw plugins list --json \
29+| jq '.plugins[] | {id, enabled, format, source, dependencyStatus}'
30+```
31+32+`plugins list` is a cold inventory check. It shows what OpenClaw can discover
33+from config, manifests, and the plugin registry; it does not prove that an
34+already-running Gateway process imported the plugin runtime.
35+36+## Install plugins
37+38+```bash
39+# Search ClawHub for plugin packages.
40+openclaw plugins search "calendar"
41+42+# Bare package specs try ClawHub first, then npm fallback.
43+openclaw plugins install <package>
44+45+# Force one source.
46+openclaw plugins install clawhub:<package>
47+openclaw plugins install npm:<package>
48+49+# Install a specific version or dist-tag.
50+openclaw plugins install clawhub:<package>@1.2.3
51+openclaw plugins install clawhub:<package>@beta
52+openclaw plugins install npm:@scope/openclaw-plugin@1.2.3
53+openclaw plugins install npm:@openclaw/codex@beta
54+55+# Install from git or a local development checkout.
56+openclaw plugins install git:github.com/acme/openclaw-plugin@v1.0.0
57+openclaw plugins install ./my-plugin
58+openclaw plugins install --link ./my-plugin
59+```
60+61+After installing plugin code, restart the Gateway that serves your channels:
62+63+```bash
64+openclaw gateway restart
65+openclaw plugins inspect <plugin-id> --runtime --json
66+```
67+68+Use `inspect --runtime` when you need proof that the plugin registered runtime
69+surfaces such as tools, hooks, services, Gateway methods, or plugin-owned CLI
70+commands.
71+72+## Update plugins
73+74+```bash
75+openclaw plugins update <plugin-id>
76+openclaw plugins update <npm-package-or-spec>
77+openclaw plugins update --all
78+```
79+80+If a plugin was installed from an npm dist-tag such as `@beta`, later
81+`update <plugin-id>` calls reuse that recorded tag. Passing an explicit npm spec
82+switches the tracked install to that spec for future updates.
83+84+```bash
85+openclaw plugins update @scope/openclaw-plugin@beta
86+openclaw plugins update @scope/openclaw-plugin
87+```
88+89+The second command moves a plugin back to the registry's default release line
90+when it was previously pinned to an exact version or tag.
91+92+## Uninstall plugins
93+94+```bash
95+openclaw plugins uninstall <plugin-id> --dry-run
96+openclaw plugins uninstall <plugin-id>
97+openclaw plugins uninstall <plugin-id> --keep-files
98+openclaw gateway restart
99+```
100+101+Uninstall removes the plugin's config entry, plugin index record, allow/deny list
102+entries, and linked load paths when applicable. Managed install directories are
103+removed unless you pass `--keep-files`.
104+105+## Publish plugins
106+107+You can publish external plugins to [ClawHub](https://clawhub.ai), npmjs.com, or
108+both.
109+110+### Publish to ClawHub
111+112+ClawHub is the primary public discovery surface for OpenClaw plugins. It gives
113+users searchable metadata, version history, and registry scan results before
114+install.
115+116+```bash
117+npm i -g clawhub
118+clawhub login
119+clawhub package publish your-org/your-plugin --dry-run
120+clawhub package publish your-org/your-plugin
121+clawhub package publish your-org/your-plugin@v1.0.0
122+```
123+124+Users install from ClawHub with:
125+126+```bash
127+openclaw plugins install clawhub:<package>
128+openclaw plugins install <package>
129+```
130+131+The bare form still checks ClawHub first.
132+133+### Publish to npmjs.com
134+135+Native npm plugins must include a plugin manifest and `package.json` OpenClaw
136+entrypoint metadata.
137+138+```json package.json
139+{
140+"name": "@acme/openclaw-plugin",
141+"version": "1.0.0",
142+"type": "module",
143+"openclaw": {
144+"extensions": ["./dist/index.js"]
145+ }
146+}
147+```
148+149+```bash
150+npm publish --access public
151+```
152+153+Users install npm-only with:
154+155+```bash
156+openclaw plugins install npm:@acme/openclaw-plugin
157+openclaw plugins install npm:@acme/openclaw-plugin@beta
158+openclaw plugins install npm:@acme/openclaw-plugin@1.0.0
159+```
160+161+If the same package is also available on ClawHub, `npm:` skips ClawHub lookup and
162+forces npm resolution.
163+164+## Source choice
165+166+- **ClawHub**: use when you want OpenClaw-native discovery, scan summaries,
167+ versions, and install hints.
168+- **npmjs.com**: use when you already ship JavaScript packages or need npm
169+ dist-tags/private registry workflows.
170+- **Git**: use when you want to install directly from a branch, tag, or commit.
171+- **Local path**: use when you are developing or testing a plugin on the same
172+ machine.
173+174+## Related
175+176+- [Plugins](/tools/plugin) - overview and troubleshooting
177+- [`openclaw plugins`](/cli/plugins) - full CLI reference
178+- [ClawHub](/tools/clawhub) - publish and registry operations
179+- [Building plugins](/plugins/building-plugins) - create a plugin package
180+- [Plugin manifest](/plugins/manifest) - manifest and package metadata
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。