mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
Add plugin install command to controller, host and ctl
Installing a plugin used to take two steps, npm install followed by plugin add, and both silently did their work in whatever directory they were run from. The new plugin install <package> subcommand runs npm install --save and then discovers the plugin through the existing loadPluginList logic, so the plugin list is updated in the same step. The command refuses to run outside a Clusterio installation, detected by the package.json the installer writes or one that depends on a Clusterio package. plugin add with a bare package name warns in the same situation. Reinstalling a plugin that is already listed reports it as such instead of failing. Installing a package without the clusterio-plugin keyword fails. Fixes #1008 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
7987a5d925
commit
5606d5d553
6 files changed
+292
-24
No files matched your search
@@ -167,16 +167,12 @@ Your instances (save files etc) will be stored there.
|
||||
### Installing Plugins
|
||||
|
||||
For well-known plugins you can select them during installation and no further steps are necessary to make them work.
|
||||
Installing plugins that are not offered by the installer consists of two steps.
|
||||
First install the package the plugin is provided by via npm, for example
|
||||
Plugins that are not offered by the installer can be installed by the name of the npm package that provides them, for example
|
||||
|
||||
npm install @clusterio/plugin-subspace_storage
|
||||
npx clusteriocontroller plugin install @clusterio/plugin-subspace_storage
|
||||
|
||||
Then tell clusterio that this plugin exists by adding it as a plugin.
|
||||
|
||||
npx clusteriocontroller plugin add @clusterio/plugin-subspace_storage
|
||||
|
||||
This adds it to the default `plugin-list.json` file which in the shared folder setup is loaded by controller, host and ctl.
|
||||
This installs the package with npm and adds it to the default `plugin-list.json` file which in the shared folder setup is loaded by controller, host and ctl.
|
||||
The command must be run from the directory clusterio was installed in and will refuse to run anywhere else.
|
||||
If you have hosts or ctl installed on separate computers (or directories) then you need to repeat the plugin install process for all of them.
|
||||
The clusteriocontroller, clusteriohost and clusterioctl commands has the plugin sub-command so you do not need to install clusteriocontroller to add plugins, instead use the clusterio command you have available.
|
||||
|
||||
|
||||
Reference in new issue
Block a user