nushell-plugins/nu_plugin_clipboard
Jesús Pérez d9ef2f0d5b
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
Nightly Build / Check for Changes (push) Has been cancelled
Nightly Build / Validate Setup (push) Has been cancelled
Nightly Build / Nightly Build (darwin-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (darwin-arm64) (push) Has been cancelled
Nightly Build / Nightly Build (linux-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (windows-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (linux-arm64) (push) Has been cancelled
Nightly Build / Create Nightly Pre-release (push) Has been cancelled
Nightly Build / Notify Build Status (push) Has been cancelled
Nightly Build / Nightly Maintenance (push) Has been cancelled
chore: update all plugins to Nushell 0.111.0
- Bump all 18 plugins from 0.110.0 to 0.111.0
  - Update rust-toolchain.toml channel to 1.93.1 (nu 0.111.0 requires ≥1.91.1)

  Fixes:
  - interprocess pin =2.2.x → ^2.3.1 in nu_plugin_mcp, nu_plugin_nats, nu_plugin_typedialog
    (required by nu-plugin-core 0.111.0)
  - nu_plugin_typedialog: BackendType::Web initializer — add open_browser: false field
  - nu_plugin_auth: implement missing user_info_to_value helper referenced in tests

  Scripts:
  - update_all_plugins.nu: fix [package].version update on minor bumps; add [dev-dependencies]
    pass; add nu-plugin-test-support to managed crates
  - download_nushell.nu: rustup override unset before rm -rf on nushell dir replace;
    fix unclosed ) in string interpolation
2026-03-11 03:22:42 +00:00
..
2025-06-27 02:31:23 +01:00
2025-06-27 02:31:23 +01:00
2025-06-27 02:31:23 +01:00
2025-06-27 02:31:23 +01:00
2025-06-27 02:31:23 +01:00
2025-06-27 02:31:23 +01:00

📋 nu_plugin_clipboard

A nushell plugin for interacting with the clipboard, allowing you to copy/paste text, objects, and tables.

Features

  • clipboard copy: Copies input text to the clipboard.

    • Daemon Behavior: Since version 0.105.2, using env variables will try to detect display server. This config will override this behavior, if you need to override this please report and issue:

      $env.config.plugins.clipboard.NO_DAEMON = true
      
    • To make this setting permanent, add it to your config env.

  • clipboard paste: Retrieves the current clipboard content.

⚠️ Important

If you face the error Error: × Clipboard Error: The clipboard contents were not available in the requested format... Try disabling the daemon mode, as mentioned in #20.

📌 Usage Examples

Copying a string (supports only strings for now)

bash
echo "test value" | clipboard copy 

Using clipboard content

bash
clipboard paste | echo $in

Copying tables and objects

  • Tables and objects are internally converted to JSON.
  • When pasting, clipboard paste tries to parse JSON into a table or object.
  • If parsing fails, the content is returned as a string.
bash
$env | clipboard copy
clipboard paste

ps | clipboard copy
clipboard paste

🔧 Installation

This method automatically handles dependencies and features:

bash
git clone https://github.com/FMotalleb/nu_plugin_clipboard.git
nupm install --path nu_plugin_clipboard -f

⚙️ Supported Features

  • use-wayland: Prioritizes the Wayland API, but falls back to X11 if needed.

  • enforce-daemon: (Deprecated) Now always enabled on Linux. Disable with:

    $env.config.plugins.clipboard.NO_DAEMON = true
    

🛠️ Manual Compilation

bash
git clone https://github.com/FMotalleb/nu_plugin_clipboard.git
cd nu_plugin_clipboard
cargo build -r
plugin add target/release/nu_plugin_clipboard

📦 Install via Cargo (using git)

bash
cargo install --git https://github.com/FMotalleb/nu_plugin_clipboard.git
plugin add ~/.cargo/bin/nu_plugin_clipboard
  • Since I live in Iran and crates.io won't let me update my packages like a normal person, most of the time crates.io is outdated.
bash
cargo install nu_plugin_clipboard
plugin add ~/.cargo/bin/nu_plugin_clipboard