npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@liziy/ssh-manager

v1.1.1

Published

AI 远程操作服务器扩展 —— 添加/编辑/删除 SSH 连接,AI 通过 ssh_exec 远程执行命令,受权限控制

Downloads

83

Readme

@liziy/ssh-manager

版本 1.1.0 — AI 远程操作服务器扩展

通过 /ssh 命令管理 SSH 连接,AI 可通过 ssh_exec / ssh_list_servers 工具远程执行命令,受权限控制。

特性

  • AI 远程操作 — 注册 ssh_execssh_list_servers 工具,AI 可远程执行命令
  • 安全控制 — 3 层防护:硬限制危险命令、只读模式、执行确认策略
  • 导航菜单/ssh 默认显示 5 选项菜单(查看/新增/编辑/删除/配置)
  • 连接测试 — 添加时自动测试连接是否可达
  • OS 自动探测 — 自动扫描 ~/.ssh/ 下的 ed25519 / rsa / ecdsa / dsa 密钥
  • 本地存储 — 配置保存到 ~/.pi/agent/ssh-configs.json

安装

pi install npm:@liziy/ssh-manager

依赖 ssh2 npm 包,pi install 会自动安装。

使用

/ssh 子命令

| 命令 | 作用 | |------|------| | /ssh | 打开导航菜单(查看/新增/编辑/删除/配置) | | /ssh add | 新增连接 | | /ssh edit | 编辑已有连接 | | /ssh rm | 删除连接 | | /ssh ls | 列出并选择连接查看详情 | | /ssh config | 查看/修改插件配置 |

新增流程

1. IP 地址          [必填]
2. 用途说明          [可选]
3. 用户名           [默认: 当前系统用户]
4. 端口             [默认: 22]
5. 密码             [可选,留空使用密钥]
6. 密钥路径          [从 ~/.ssh/ 自动探测]
7. 连接名称          [默认: 从 host 派生]

编辑流程

  • 顶部明确回显所有当前值
  • 每个字段标题包含"当前: x"
  • 留空 = 保持当前值
  • - = 清空说明字段

插件配置

通过 /ssh config 或导航菜单「配置」修改全局配置:

| 配置项 | 默认值 | 说明 | |--------|--------|------| | AI 只读模式 | 是 | AI 只能执行 ls/cat/ps 等读命令 | | 执行确认 | 写操作确认 | 不确认 / 写操作确认 / 每次都确认 | | 命令超时 | 30s | 单条命令超时秒数 |

AI 工具

| 工具 | 说明 | |------|------| | ssh_exec | 在指定服务器上执行命令,返回 stdout/stderr/退出码 | | ssh_list_servers | 列出所有已配置的 SSH 服务器 |

安全检查

  • 硬限制rm -rf /shutdownrebootddmkfs 等危险命令直接禁止
  • 只读模式:只允许 50+ 种读命令(ls/cat/ps/df/git log 等)
  • 确认策略:AI 执行写操作时需用户手动确认

版本历史

1.1.1

  • 删除连接前新增确认对话框,防止误删

1.1.0

  • 新增 AI 工具:ssh_exec 远程命令执行、ssh_list_servers 列出服务器
  • 新增全局配置系统:ai_readonlyconfirm_before_execcommand_timeout
  • 新增 /ssh 导航菜单(查看/新增/编辑/删除/配置)
  • 新增安全控制:硬限制危险命令、只读命令列表、执行确认策略
  • 更新 /db 命令描述为"AI 远程操作服务器"

1.0.1

  • 修复连接测试超时问题

1.0.0

  • 初始发布:SSH 连接管理,添加/编辑/删除/查看配置

许可

MIT