@ogulcancelik/pi-ssh-tools

Explicit SSH tools for pi. Toggle /ssh on for a host, then use ssh_read, ssh_write, ssh_edit, and ssh_bash without replacing local tools.

Package details

extension

Install @ogulcancelik/pi-ssh-tools from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@ogulcancelik/pi-ssh-tools
Package
@ogulcancelik/pi-ssh-tools
Version
0.1.2
Published
Apr 5, 2026
Downloads
416/mo · 21/wk
Author
ogulcancelik
License
MIT
Types
extension
Size
18.5 KB
Dependencies
0 dependencies · 0 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

pi-ssh-tools

Explicit SSH tools for pi.

Turn SSH mode on only when you need it, keep local tools untouched, and give the agent a separate remote toolset:

  • ssh_read
  • ssh_write
  • ssh_edit
  • ssh_bash

Install

pi install npm:@ogulcancelik/pi-ssh-tools

Or add manually to ~/.pi/agent/settings.json:

{
  "packages": ["npm:@ogulcancelik/pi-ssh-tools"]
}

What it does

This package adds a /ssh command.

  • Default is off
  • No persistence across sessions
  • Local read, write, edit, and bash stay local
  • When SSH mode is active, the agent also gets ssh_read, ssh_write, ssh_edit, and ssh_bash
  • The active remote host and cwd are injected into the system prompt while SSH mode is on

That makes remote work explicit instead of silently swapping out local tools.

Usage

/ssh
/ssh mac
/ssh clawd
/ssh mac:/Users/can/project
/ssh status
/ssh off

When /ssh is called with no arguments, the extension offers hosts from ~/.ssh/config.

You can always bypass the picker and type a host manually:

/ssh user@host
/ssh user@host:/remote/path

That means the package still works even if you do not use ~/.ssh/config.

How host selection works

The picker reads Host ... aliases from your local ~/.ssh/config.

  • wildcard entries like Host * are ignored
  • aliases are used as the SSH target directly
  • if no remote path is provided, the extension resolves it with ssh <host> pwd

This is mainly a convenience layer. SSH config is not required for the actual remote tools.

Requirements

  • pi
  • local ssh client available in $PATH
  • key-based auth or another non-interactive SSH setup
  • bash available on the remote host

Notes

  • ssh_write writes file content over stdin, which behaves better on macOS than GNU-specific base64 -d shell snippets
  • relative remote paths resolve against the active remote cwd
  • image reads are supported for common extensions: jpg, jpeg, png, gif, webp

License

MIT