@nilskluewer/pi-copy-to-clipboard

A Pi extension that copies exact text, commands, and code to the system clipboard without executing it.

Packages

Package details

extension

Install @nilskluewer/pi-copy-to-clipboard from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@nilskluewer/pi-copy-to-clipboard
Package
@nilskluewer/pi-copy-to-clipboard
Version
1.0.2
Published
Sep 23, 2026
Downloads
204/mo · 170/wk
Author
nilskluewer
License
MIT
Types
extension
Size
5.2 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/copy-to-clipboard.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@nilskluewer/pi-copy-to-clipboard

A Pi extension that lets the model copy exact text, commands, and code to the system clipboard without executing it.

This is useful with clipboard managers such as Maccy.

Install

Install the published npm package globally:

pi install npm:@nilskluewer/pi-copy-to-clipboard

Install directly from GitHub:

pi install git:github.com/nilskluewer/pi-copy-to-clipboard

Install from a local checkout:

pi install /path/to/pi-copy-to-clipboard

Run /reload after installing it in an existing Pi session.

Usage

Ask Pi explicitly to copy something:

Copy the exact Bash command from your previous response to my clipboard history. Do not execute it. Do not include the shell prompt, Markdown fences, or explanation.

The extension registers the copy_to_clipboard tool.

The tool accepts the exact text to copy and an optional label.

It preserves whitespace and newlines and never executes the supplied text.

On macOS, the copied content is placed on the system pasteboard, where Maccy can record it.

Development

Inspect the npm tarball without publishing it:

npm run pack:dry

Load the local extension temporarily:

pi -e .

License

MIT