Plugins

    Nu plugins are executables; Nu launches them as needed and communicates with them over stdin, stdout, and stderr (opens new window). Nu plugins can use either JSON or as their communication encoding.

    To add a plugin, call the register command to tell Nu where to find it. As you do, you’ll need to also tell Nushell what encoding the plugin uses.

    Windows:

    When is called:

    1. Nu launches the plugin and sends it a “Signature” message over stdin
    2. Nu saves the plugin signature in the file at , so registration is persisted across multiple launches

    Nu’s main repo contains example plugins that are useful for learning how the plugin protocol works:

    The simplest way to debug a plugin is to print to stderr; plugins’ standard error streams are redirected through Nu and displayed to the user.