@monopi/extension-shell-format

Monopi shell-format pi extension.

Packages

Package details

extension

Install @monopi/extension-shell-format from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@monopi/extension-shell-format
Package
@monopi/extension-shell-format
Version
0.6.1
Published
Aug 28, 2026
Downloads
280/mo · 24/wk
Author
ifiokjr
License
MIT
Types
extension
Size
10.4 KB
Dependencies
0 dependencies · 5 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

@monopi/extension-shell-format

A pi extension that detects the user's login shell and keeps user-facing command examples in that shell's syntax without sending incompatible syntax to execution tools.

^pi install npm:@monopi/extension-shell-format

Execution behavior

The extension keeps two concerns separate:

  • Commands intended for the user to copy use the login shell's dialect.
  • Tool calls use the dialect declared by each tool. In particular, the bash tool always receives Bash syntax.

For a supported non-Bash login shell with a matching $SHELL executable, the extension also registers native_shell. This tool invokes the login shell directly, so Nushell, Fish, Zsh, or PowerShell-specific syntax can be executed without a Bash quoting layer.

For example, with Nushell as the login shell:

  • use git status in a bash tool call;
  • use ^git status in a native_shell tool call or a user-facing Nushell example.

Execution tools do not translate between shell dialects. Failed commands remain visible to the agent so it can correct the command and retry when safe.