{"id":51325762,"url":"https://github.com/fitchmultz/pi-copy-message","last_synced_at":"2026-07-01T18:03:09.858Z","repository":{"id":363113560,"uuid":"1262086360","full_name":"fitchmultz/pi-copy-message","owner":"fitchmultz","description":"Pi extension with a searchable TUI picker for copying raw session messages","archived":false,"fork":false,"pushed_at":"2026-06-22T15:12:56.000Z","size":139,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-22T17:09:25.966Z","etag":null,"topics":["clipboard","copy-message","copy-user","pi","pi-extension","pi-package","tui","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fitchmultz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-07T14:56:44.000Z","updated_at":"2026-06-22T15:15:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fitchmultz/pi-copy-message","commit_stats":null,"previous_names":["fitchmultz/pi-copy-message"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fitchmultz/pi-copy-message","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitchmultz%2Fpi-copy-message","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitchmultz%2Fpi-copy-message/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitchmultz%2Fpi-copy-message/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitchmultz%2Fpi-copy-message/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitchmultz","download_url":"https://codeload.github.com/fitchmultz/pi-copy-message/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitchmultz%2Fpi-copy-message/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35017091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","copy-message","copy-user","pi","pi-extension","pi-package","tui","typescript"],"created_at":"2026-07-01T18:03:09.283Z","updated_at":"2026-07-01T18:03:09.851Z","avatar_url":"https://github.com/fitchmultz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi copy-message extension\n\nA [pi](https://github.com/earendil-works/pi-mono) extension that adds `/copy-message`: a keyboard-first picker for copying raw session message text without terminal wrapping, padding, or rendered TUI artifacts. It also adds `/copy-user` as a direct shortcut for the most recent user message.\n\n`pi-copy-message` supersedes [`pi-copy-user-message`](https://github.com/fitchmultz/pi-copy-user-message), which only copied the most recent user message.\n\n## What it does\n\n- Adds `/copy-message`\n- Adds `/copy-user` for copying the most recent user message directly\n- Copies raw stored session message text, not rendered terminal lines\n- Shows messages in chat order: oldest at top, newest at bottom\n- Selects the newest visible message by default\n- Supports role filters for user, assistant, and tool/bash messages\n- Hides tool/bash messages by default\n- Supports type-to-filter search across role and message text, with `time:\u003cterm\u003e` for timestamp search\n- Supports Home/End jumps for oldest/newest visible messages\n- Includes fast paths: `/copy-message latest`, `/copy-message last`, and `/copy-message newest`\n- Supports direct numbered copies like `/copy-message 3`\n- Supports metadata copies with `--with-meta`, `--with-metadata`, or `--with-role`\n\n## Install\n\nInstall it from npm with pi:\n\n```bash\npi install npm:pi-copy-message\n```\n\nOr install it directly from GitHub with pi:\n\n```bash\npi install https://github.com/fitchmultz/pi-copy-message\n```\n\nThen reload pi from inside the app:\n\n```text\n/reload\n```\n\nIf you prefer to load it directly from a local checkout during development:\n\n```bash\npi -e ./extensions/copy-message.ts\n```\n\n## Usage\n\nOpen the picker:\n\n```text\n/copy-message\n```\n\nCopy the most recent user message directly:\n\n```text\n/copy-user\n```\n\nCopy the latest visible default message directly:\n\n```text\n/copy-message latest\n```\n\nAliases:\n\n```text\n/copy-message last\n/copy-message newest\n```\n\nCopy the 3rd default-visible message directly, matching the picker's 1-based oldest-to-newest numbering:\n\n```text\n/copy-message 3\n```\n\nCopy with role and timestamp metadata instead of raw text only:\n\n```text\n/copy-message latest --with-meta\n/copy-message 3 --with-role\n/copy-user --with-meta\n```\n\n## Keyboard controls\n\n| Key | Action |\n|---|---|\n| `↑` | Move to older visible message |\n| `↓` | Move to newer visible message |\n| `Home` | Jump to oldest visible message |\n| `End` | Jump to newest visible message |\n| Type text | Filter visible messages |\n| `time:\u003cterm\u003e` | Search timestamps |\n| `Backspace` | Delete one search character |\n| `Ctrl+U` | Toggle user messages |\n| `Ctrl+A` | Toggle assistant messages |\n| `Ctrl+T` | Toggle tool/bash messages |\n| `Tab` | Toggle a wrapped preview of the selected message |\n| `Alt+M` | Toggle raw vs metadata copy format |\n| `Enter` | Copy selected message text |\n| `Esc` | Cancel |\n\n## Behavior notes\n\n- Entry IDs are hidden from the picker.\n- The picker caps visible rows and scrolls instead of filling the screen.\n- Search preserves your original selected message and restores it when the search is cleared.\n- General search does not match timestamps; use `time:\u003cterm\u003e` when you want to search by displayed time.\n- Filter labels honor the active pi theme.\n- Copy notifications include the role and a short preview so you can verify what was copied.\n- `/copy-message latest` respects default visibility: user and assistant messages are visible, tool/bash messages are hidden. If only hidden messages exist, it falls back to the newest message so the command still does something useful.\n- `/copy-message` with no direct selector requires interactive TUI mode because the picker is a custom TUI component.\n- Direct commands such as `/copy-user`, `/copy-message latest`, and `/copy-message 3` do not require TUI mode, though non-UI modes may not display notifications.\n\n## Compatibility\n\n- Tested with pi 0.80.2\n- Supported Node.js range for local repo tooling: `\u003e=22.19.0`\n- `.nvmrc` pins Node 22.19.0 for local development\n\nThis package keeps pi core packages as wildcard peers (`*`) per pi package guidance. Pi aliases these imports to its own bundled copies when loading the extension, so the package never bundles or shadows pi core. Local development uses `@earendil-works/pi-coding-agent` and `@earendil-works/pi-tui` as dev dependencies for typechecking and tests.\n\n## Development\n\n```bash\nnpm install\nnpm run check\n```\n\nKey files:\n\n- `extensions/copy-message.ts` — publishable extension implementation\n- `tests/copy-message.test.ts` — regression tests for command wiring, filtering, search, jumps, and clipboard behavior\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitchmultz%2Fpi-copy-message","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitchmultz%2Fpi-copy-message","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitchmultz%2Fpi-copy-message/lists"}