← Catalog

pi-copy-mode-ime

Switch macOS input sources for copy-mode navigation and comments in Pi

Extension

Install

Install with PiG

pig install npm:pi-copy-mode-ime

Install with Pi

pi install npm:pi-copy-mode-ime
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.

{
  "extensions": [
    "./extensions/copy-mode-ime/index.ts"
  ]
}

README

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

pi_setup

A package for the Pi coding agent. It includes copy-mode-ime, a macOS extension that switches to an English input source for copy-mode shortcuts and restores your writing input source for comments and after you exit copy mode.

Included resources

ResourcePathDescription
copy-mode-imeextensions/copy-mode-ime/index.tsmacOS input source companion for @luan.sh/pi-copy-mode that switches to an English input source for copy-mode navigation and restores your writing input source for comments and exit.
Copy-mode hook exampleconfig/copy-mode-ime.example.jsonOptional JSON hook configuration example for customizing copy-mode-ime transition policies.

Install and quick start

Use Pi's interactive fullscreen TUI on macOS. The companion was developed against Pi 1.5.2 and @luan.sh/pi-copy-mode 0.3.4. Install macism or im-select on the PATH used by Pi. Enable the macOS ABC input source (com.apple.keylayout.ABC) or set PI_COPY_MODE_IME_NAV_SOURCE to another enabled English source ID.

Install both extensions from npm.

pi install npm:@luan.sh/pi-copy-mode@0.3.4
pi install npm:pi-copy-mode-ime

You can also install the companion from GitHub with pi install git:github.com/MimeLyc/pi_setup or from a local clone with pi install /path/to/pi_setup. Use one installation source for the companion. If you switch sources, remove its old package entry and keep the separate @luan.sh/pi-copy-mode entry. Use pi config to enable or disable either extension.

For a one-off session without registering this package, run the following from a local clone with @luan.sh/pi-copy-mode@0.3.4 already installed.

pi -e ./extensions/copy-mode-ime/index.ts

Start Pi in fullscreen TUI mode, or use /reload if Pi is already running. With the default settings, entering copy mode selects the navigation source. Opening a comment restores the writing source, and closing the comment returns to the navigation source if copy mode is still active. Leaving copy mode restores the most recently remembered writing source.

To disable switching for a session, start Pi with PI_COPY_MODE_IME_ENABLED=0.

Configuration and troubleshooting

To customize when sources switch, copy the example configuration to a local file, edit the hooks, and set PI_COPY_MODE_IME_CONFIG_FILE in the shell that starts Pi. Restart Pi after changing environment variables. See the configuration reference for available policies and settings.

If switching fails, check the enabled input sources and the CLI from the same terminal that launches Pi. See troubleshooting and manual verification.

Contributing

From a local clone, use a Node.js version supported by Pi and run the development checks.

npm install
npm run typecheck
npm run check:hygiene

npm run check:hygiene also runs without npm install. See the extension development guide and configuration template guide.

License

Released under the MIT License.