@felixoid/py-yank
Pi agent copy command: enhanced /y (yank/copy) for indexed and rendered assistant message clipboard copy
Package details
Install @felixoid/py-yank from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@felixoid/py-yank- Package
@felixoid/py-yank- Version
0.1.0- Published
- May 21, 2026
- Downloads
- not available
- Author
- felixoid
- License
- MIT
- Types
- extension
- Size
- 7.7 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/yank.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@felixoid/py-yank
Enhanced /y yank (copy) command for pi coding agent.
Features
/y— yank (copy) last assistant message as rendered plain text/y 2— copy 2nd-to-last assistant message as raw markdown/y --plain— copy last assistant message as rendered plain text/y 2 --plain— indexed rendered plain-text copy
For extended forms, default mode copies raw markdown. --plain uses pi TUI Markdown renderer (@earendil-works/pi-tui) and strips ANSI, so copied text keeps structure (tables, lists, code blocks) in plain text.
Install
pi install npm:@felixoid/py-yank
Or test without installing:
pi -e npm:@felixoid/py-yank
Usage
Inside pi:
/y
/y 2
/y --plain
/y 2 --plain
Notes
- This extension registers its own
/ycommand. - Clipboard backend uses pi's built-in
copyToClipboardutility.
Development
npm install
npm run typecheck
npm test
Load locally (project mode):
pi install .
# or add this path to .pi/settings.json packages