Registry / other / nu-plugin

nu-plugin

JSON →
library0.110.0rscratesunverified

Functionality for building Nushell plugins, enabling custom commands and extensions.

# Cargo.toml [dependencies] nu-plugin = "0.110.0"
INSTALL
IMPORT
SIG · NU-PLUGIN
N
nu-plugin
otherrustv0.110.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin
use nu_plugin::Plugin;

Defines a minimal Nushell plugin that passes input through.

use nu_plugin::{Plugin, EvaluatedCall, EngineInterface}; use nu_protocol::{LabeledError, Value}; struct MyPlugin; impl Plugin for MyPlugin { fn name(&self) -> &str { "my_plugin" } fn signature(&self) -> Vec<nu_protocol::Signature> { vec![] } fn run(&self, engine: &EngineInterface, call: &EvaluatedCall, input: &Value) -> Result<Value, LabeledError> { Ok(input.clone()) } } fn main() { nu_plugin::serve_plugin(&MyPlugin); }
Debug
Known issues
gotchaRequires Nushell runtime; not standalone.
fix
Install Nushell and register the plugin.
affects: >=0.110.0
Upgrade
Version history
0.110.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
nu-plugin — cargo add nu-plugin · libregistry