plugin use for plugin

Load a plugin from the plugin registry file into scope.

Signature

> plugin use {flags} (name)

Flags

  • --plugin-config, - {path}: Use a plugin registry file other than the one set in $nu.plugin-path

Parameters

  • name: The name, or filename, of the plugin to load

Input/output types:

inputoutput
nothingnothing

Examples

Load the commands for the query plugin from $nu.plugin-path

> plugin use query

Load the commands for the plugin with the filename ~/.cargo/bin/nu_plugin_query from $nu.plugin-path

> plugin use ~/.cargo/bin/nu_plugin_query

Load the commands for the query plugin from a custom plugin registry file

> plugin use --plugin-config local-plugins.msgpackz query

Notes

This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html

The plugin definition must be available in the plugin registry file at parse time. Run plugin add first in the REPL to do this, or from a script consider preparing a plugin registry file and passing --plugin-config, or using the --plugin option to nu instead.

If the plugin was already loaded, this will reload the latest definition from the registry file into scope.

Note that even if the plugin filename is specified, it will only be loaded if it was already previously registered with plugin add.