一个轻量级、低内存占用的 SSH / 终端客户端(A lightweight, low-memory SSH / terminal client)
一个轻量级、低内存占用的 SSH / 终端客户端(A lightweight, low-memory SSH / terminal client)
简体中文 | English
一个轻量级、低内存占用的 SSH / 终端客户端,灵感来自 FinalShell,但完全由 Rust + Slint 实现。目标是保留 FinalShell 的核心体验 (资源监控侧栏、会话管理、多标签页终端)的同时,把内存占用从 400 MB+ 的 JVM 压到几十 MB 原生级别。
欢迎页:会话管理 + 左侧本机资源监控
多标签页终端(htop 全屏渲染)+ 底部 SFTP 文件浏览 + 远端资源监控
每次打 v* 标签,GitHub Actions 会自动构建 Windows / Linux / macOS 三平台二进制,
发布到 Releases 页面。
下载 meatshell-*-windows-x86_64.zip,解压后双击 meatshell.exe。
tar -xzf meatshell-*-linux-x86_64.tar.gz
cd meatshell-*-linux-x86_64
./meatshell # 直接运行
# 可选:系统级安装程序、图标和启动器入口(需要 sudo)
chmod +x install-linux.sh && ./install-linux.sh一键安装会将程序安装到 /usr/local/bin/meatshell,启动器安装到
/usr/local/share/applications/meatshell.desktop,图标安装到
/usr/local/share/icons/hicolor/512x512/apps/meatshell.png,并清理旧版 tar 包留下的用户级同名启动器。
需要 glibc ≥ 2.35(Ubuntu 22.04+ / Debian 12+)。Wayland 下首次装完图标可能要注销重登一次。
从源码 cargo run(Linux Mint / Ubuntu / Debian)需要先安装 Slint/winit/rfd 等用到的系统开发包:
sudo apt update
sudo apt install -y --no-install-recommends \
build-essential pkg-config cmake \
libfontconfig1-dev libfreetype6-dev \
libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
libgl1-mesa-dev libegl1-mesa-dev libgtk-3-dev \
libudev-dev下载得到的是 .zip,里面是 meatshell.app 应用程序包:
# 解压(aarch64 = Apple 芯片,x86_64 = Intel)
unzip meatshell-*-macos-*.zip
# 移到「应用程序」(可选,留在原地也行)
mv meatshell.app /Applications/
# 去掉「未签名应用」的隔离属性,否则会提示「meatshell 已损坏,无法打开」
xattr -dr com.apple.quarantine /Applications/meatshell.app
# 打开(或在「访达」里双击)
open /Applications/meatshell.app若未移到
/Applications,把上面两条路径换成.app实际所在位置(如~/Downloads/meatshell.app)即可。
需要 macOS 11 Big Sur 或更高版本,支持 Apple Silicon 和 Intel Mac。
从源码构建见下方 运行。
%APPDATA%/meatshell/sessions.json(Windows)
/ ~/.config/meatshell/sessions.json(Linux)
/ ~/Library/Application Support/meatshell/sessions.json(macOS)russh,纯 Rust):密码 / 私钥 / 加密私钥(密码短语)sz 下载 / rz 多文件上传)~/.ssh/configknown_hosts)校验 + 首次连接确认彩色 emoji 图形来自 Twemoji,按 CC BY 4.0 使用;完整署名见 THIRD_PARTY_NOTICES.md。
| 模块 | 选型 |
|---|---|
| UI | Slint(纯 Rust 编译,无 GC) |
| 异步运行时 | tokio |
| SSH 协议 | russh(无 libssh 依赖) |
| 系统指标 | sysinfo |
| 序列化 | serde + serde_json |
| 日志 | tracing + tracing-subscriber |
cargo run --release首次启动会在 %APPDATA%/meatshell/sessions.json 建立空的会话库。点击右上
角 “+ 新建会话” 添加第一台服务器。
MeatShell 的 CLI 和 MCP 共用 GUI 中保存的会话及 SSH / SFTP 实现。CLI 适合脚本、 CI 和手动执行明确的命令;MCP 则让支持 MCP 的 AI 客户端通过自然语言完成服务器 巡检、日志分析和文件传输。两者只是调用入口不同,不需要重新维护一份服务器配置。
使用前请先在 GUI 中创建并成功连接一次目标会话,以完成主机密钥确认。密码、私钥等 凭据不会出现在 CLI/MCP 返回结果中,也不要把明文密码写进提示词或 MCP 配置。
查看所有可用命令:
meatshell cli help常用示例:
# 列出已保存的会话,第一列是后续命令使用的 session-id
meatshell cli sessions
meatshell cli sessions --json
# 查看单个会话的非敏感信息
meatshell cli session
# 执行非交互式 SSH 命令;远端命令必须放在 -- 后面
meatshell cli exec -- free -h
meatshell cli exec --timeout 60 --json -- journalctl -n 100 --no-pager
# 浏览、读取和传输远端文件
meatshell cli files /var/log
meatshell cli read /var/log/example.log
meatshell cli upload ./local.txt /tmp
meatshell cli download /tmp/result.txt ./downloadsCLI 的 `` 可由 meatshell cli sessions 获取。文件下载要求本地目标目录已经
存在,且不会覆盖同名文件。
先打开 MeatShell 的 设置 → 界面 → MCP:
然后在支持 stdio MCP 的客户端中添加名为 meatshell 的服务:
{
"mcpServers": {
"meatshell": {
"command": "/absolute/path/to/meatshell",
//Mac OS
//"command": "/Applications/MeatShell.app/Contents/MacOS/meatshell",
//Linux
//your path
"args": ["mcp", "serve"]
}
}
}Windows 下 command 可以填写 C:\\path\\to\\meatshell.exe。重启或刷新 MCP 客户端
后,应能看到 meatshell 服务以及会话查询、远程命令、目录浏览、文本读取、上传和下载
等工具。不同 AI 客户端的 MCP 配置文件位置不同,请以对应客户端文档为准。
一般情况下由 AI 客户端自动生成这些请求,无需手工输入。调试 stdio 连接时,每个请求
必须是独立的一行 JSON,依次完成初始化和 notifications/initialized 通知:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"example-client","version":"1.0.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}查询已保存会话并获取 ``:
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_sessions","arguments":{}}}
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_session","arguments":{"session_id":""}}}执行 OOM 只读诊断并浏览堆转储目录:
{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"run_command","arguments":{"session_id":"","command":"free -h; printf '\\n=== kernel OOM ===\\n'; dmesg 2>/dev/null | grep -iE 'oom|out of memory|killed process' | tail -50 || true; printf '\\n=== Java ===\\n'; ps -ef | grep '[j]ava'","timeout_seconds":30,"max_output_bytes":1048576}}}
{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"list_remote_files","arguments":{"session_id":"","path":"/home/jeff/test/heapdumps"}}}读取日志或下载一个堆文件:
{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"read_remote_text_file","arguments":{"session_id":"","path":"/home/jeff/test/logs/meatshell-log-demo-error.log"}}}
{"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"download_file","arguments":{"session_id":"","remote_path":"/home/jeff/test/heapdumps/example.hprof","local_directory":"/existing/local/directory","timeout_seconds":120}}}read_remote_text_file 只接受有大小和行数限制的 UTF-8 文本;HPROF 等二进制文件应使用
download_file。下载目标目录必须已经存在,且工具不会覆盖同名文件。
配置完成后,可以直接对 AI 客户端说:
用
meatshellMCP 排查一下:我的192.168.100.41服务器出现 OOM,堆转储位于/home/jeff/test/heapdumps。请检查系统内存、内核 OOM 记录、Java 进程、应用日志和 HPROF 文件,判断根因;先只读排查,不要重启服务或删除文件。
MCP 会先通过 list_sessions 查找匹配的已保存会话,再按已授予的权限调用远程命令或
SFTP 工具。若存在多条同主机会话,可在提示词中补充 GUI 中的会话名称。建议诊断提示词
明确写出目标主机、日志或堆文件路径,以及是否允许重启、修改配置、下载文件等操作边界。
….slint 后 cargo check 是最快的
反馈方式。slint::invoke_from_event_loop 回调。known_hosts 校验逻辑:首次连接会确认并记住主机密钥,
后续密钥变化会再次提示。不要直接手动修改 Cargo.toml 后再打标签。使用发布脚本,让 Git tag 指向的提交本身就已经包含正确版本号:
.\scripts\release.ps1 v0.6.0 -Push脚本会更新 Cargo.toml / Cargo.lock,运行 cargo check --locked,验证 meatshell --version,提交 Release v0.6.0,创建 annotated tag,并推送当前分支和 tag。更多细节见 docs/release.md。
扫描二维码加入 QQ 群,与其他用户交流使用经验、反馈问题或获取最新动态
MIT OR Apache-2.0(双许可)。
暂无开放 Issues,或尚未同步最近议题。