@oleg_tarasov/pi-zmx-status

Show the current zmx session name in Pi's status bar.

Package details

extension

Install @oleg_tarasov/pi-zmx-status from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@oleg_tarasov/pi-zmx-status
Package
@oleg_tarasov/pi-zmx-status
Version
0.0.1
Published
May 6, 2026
Downloads
not available
Author
oleg_tarasov
License
MIT
Types
extension
Size
6.2 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/zmx-status.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-zmx-status

A tiny Pi extension that shows the current zmx session name in Pi's status area.

When Pi is running inside zmx, zmx injects the ZMX_SESSION environment variable. This extension reads that variable and publishes a compact status value via ctx.ui.setStatus().

For compatibility with custom footer extensions that replace Pi's default footer but do not render extension status entries, this extension also mirrors the zmx session into Pi's session display name for unnamed sessions. It will update or clear only zmx-prefixed display names (zmx:*) and will not overwrite a custom session name you set yourself.

Install

Install from npm with Pi's package installer:

pi install npm:@oleg_tarasov/pi-zmx-status

To pin a specific release:

pi install npm:@oleg_tarasov/pi-zmx-status@0.0.1

To try the package for a single run without adding it to settings:

pi -e npm:@oleg_tarasov/pi-zmx-status

After install, reload any running Pi session:

/reload

Usage

Start Pi inside zmx, for example:

zmx attach pi-1 pi

The Pi status area will show:

zmx:pi-1

With custom footers that show Pi's session display name instead of extension statuses, it may appear on the working-directory line as:

.../your/project • zmx:pi-1

If Pi is not running inside zmx, the extension clears its status entry and clears only zmx-prefixed session display names (zmx:*).

Configuration

No configuration is required.

If you use pi-powerline-footer, this status appears through its normal extension-status support. You can also promote it as a custom powerline item using status key zmx.

Example ~/.pi/agent/settings.json snippet:

{
  "powerline": {
    "customItems": [
      {
        "id": "zmx",
        "statusKey": "zmx",
        "position": "right",
        "prefix": "zmx",
        "color": "accent"
      }
    ]
  }
}

Local development

For ad-hoc local use from a checkout:

pi --extension ./extensions/zmx-status.ts

Check syntax:

npm run check

License

MIT