← Catalog

pi-command-actions

Copy or run shell and scripting code blocks from Pi responses

Extension

Install

Install with PiG

pig install npm:pi-command-actions

Install with Pi

pi install npm:pi-command-actions
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "image": "https://unpkg.com/pi-command-actions/pi-command-actions.png",
  "extensions": [
    "./extensions/command-actions.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.

Pi Command Actions

A Pi extension for acting on shell commands from the latest assistant response.

Press Ctrl+Shift+R (or run /command-actions) after a response containing a fenced shell (bash, sh, shell, zsh, fish) or script (ruby, python, node/js, perl, php, lua, r) block. When more than one block is present, choose one first. Long blocks are previewed truncated to 15 lines.

The dialog lets you:

  • Copy the command to the system clipboard.
  • Run by pre-filling Pi's editor with !<command>; script blocks are piped to their interpreter via a heredoc. Review it and press Enter to execute it through Pi's normal user-bash flow.

Install

After publishing to npm:

pi install npm:pi-command-actions

For local development:

pi -e /path/to/pi-command-actions/extensions/command-actions.ts

Publish

Choose and add a license, then authenticate and publish:

npm login
npm publish

If pi-command-actions is already taken on npm, rename the package in package.json, preferably to a public scoped name such as @your-npm-user/pi-command-actions. Publish a scoped package with:

npm publish --access public

Packages carrying the pi-package keyword are displayed by the Pi package gallery at https://pi.dev/packages.