@matheusbbarni/pi-copy-button
A Pi extension that adds a copy button to each message and copies the text as shown.
Package details
Install @matheusbbarni/pi-copy-button from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@matheusbbarni/pi-copy-button- Package
@matheusbbarni/pi-copy-button- Version
0.1.2- Published
- Aug 25, 2026
- Downloads
- 301/mo · 21/wk
- Author
- matheusbbarni
- License
- MIT
- Types
- extension
- Size
- 17.6 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@matheusbbarni/pi-copy-button
Copy any Pi message as it appears in the terminal.
Every user message, assistant reply, tool box, and bash result gets a ⧉ control in the top-right. Click it to copy the visible text: rendered markdown, checkmarks, collapsed previews — not the raw session payload.
$ rtk git commit --no-verify -m "test: add failing parseFollows" ⧉
✓ ok
Features
- Adds a copy control to user, assistant, tool, custom, and bash messages
- Copies the rendered TUI text, including collapsed tool previews
- Click-to-copy in the fullscreen TUI; Cmd/Ctrl-click in the inline TUI
/copy-textand/copy-text pickwhen you would rather use the keyboard
Install
pi install npm:@matheusbbarni/pi-copy-button
From this repo:
pi -e ./pi-copy-button
Or as a local package:
pi install ./pi-copy-button
[!TIP] If Pi is already open, run
/reload.
Usage
| Action | Result |
|---|---|
Click ⧉ in fullscreen |
Copy that message as shown |
Cmd-click / Ctrl-click ⧉ inline |
Same, via OSC 8 |
/copy-text |
Copy the last shown message |
/copy-text pick |
Choose from recent messages |
[!NOTE] Built-in
/copyandCtrl+Xstill copy the last assistant message's source text. This package copies whatever is currently on screen.Collapsed tool output copies the preview. Expand it first if you want the full dump.
Development
npm install
npm test
npm run typecheck