### Common CLI usage examples Source: https://github.com/yituorou/meatshell/blob/main/README.md Examples for listing sessions, executing remote commands, and managing files. ```bash # 列出已保存的会话,第一列是后续命令使用的 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 ./downloads ``` -------------------------------- ### Install meatshell on Linux Source: https://github.com/yituorou/meatshell/blob/main/README.md Commands to extract the Linux binary archive and optionally run the system-wide installation script. ```bash tar -xzf meatshell-*-linux-x86_64.tar.gz cd meatshell-*-linux-x86_64 ./meatshell # 直接运行 # 可选:系统级安装程序、图标和启动器入口(需要 sudo) chmod +x install-linux.sh && ./install-linux.sh ``` -------------------------------- ### Initialize the AUR package repository Source: https://github.com/yituorou/meatshell/blob/main/packaging/aur/README.md Perform the initial manual setup of the meatshell-bin repository on AUR to enable automated updates. ```sh git clone ssh://aur@aur.archlinux.org/meatshell-bin.git cd meatshell-bin # 把本仓库的 packaging/aur/PKGBUILD 复制进来,按需把 pkgver 改成最新 release 版本 cp /path/to/meatshell/packaging/aur/PKGBUILD . # 填邮箱、刷新校验和、生成 .SRCINFO updpkgsums makepkg --printsrcinfo > .SRCINFO # 本地装一下验证能跑 makepkg -si # 推到 AUR git add PKGBUILD .SRCINFO git commit -m "Initial import: meatshell-bin" git push ``` -------------------------------- ### Install Linux build dependencies Source: https://github.com/yituorou/meatshell/blob/main/README.md Required system development packages for building meatshell from source on Debian-based Linux distributions. ```bash 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 ``` -------------------------------- ### Install and configure meatshell on macOS Source: https://github.com/yituorou/meatshell/blob/main/README.md Commands to extract the application, move it to the Applications folder, and remove the quarantine attribute to allow execution. ```bash # 解压(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 ``` -------------------------------- ### Common MeatShell CLI operations Source: https://github.com/yituorou/meatshell/blob/main/README.en.md Examples for managing sessions, executing remote commands, and performing file operations via the CLI. ```bash # List saved sessions; the first column is the session-id used below meatshell cli sessions meatshell cli sessions --json # Show non-secret metadata for one session meatshell cli session # Run a non-interactive SSH command; the remote command must follow -- meatshell cli exec -- free -h meatshell cli exec --timeout 60 --json -- journalctl -n 100 --no-pager # Browse, read, and transfer remote files meatshell cli files /var/log meatshell cli read /var/log/example.log meatshell cli upload ./local.txt /tmp meatshell cli download /tmp/result.txt ./downloads ``` -------------------------------- ### View CLI help Source: https://github.com/yituorou/meatshell/blob/main/README.md Display all available CLI commands. ```bash meatshell cli help ``` -------------------------------- ### Initialize the backend Source: https://github.com/yituorou/meatshell/blob/main/vendor/i-slint-backend-winit/README.md Set the platform backend as the first step in the main function to ensure the runtime backend is selected. ```rust slint::platform::set_platform(Box::new(i_slint_backend_winit::Backend::new().unwrap())); // ... ``` -------------------------------- ### Run MeatShell from source Source: https://github.com/yituorou/meatshell/blob/main/README.md Use Cargo to build and run the application. ```bash cargo run --release ``` -------------------------------- ### Build MeatShell for Android with cargo-apk Source: https://github.com/yituorou/meatshell/blob/main/android/README.md Use this command to build the Android package. Requires the Android SDK/NDK, Java, and the aarch64-linux-android Rust target to be installed. ```sh cargo apk build --manifest-path android/Cargo.toml \ --locked --release --target aarch64-linux-android --lib ``` -------------------------------- ### Initialize MCP connection Source: https://github.com/yituorou/meatshell/blob/main/README.md Required JSON-RPC messages to initialize the stdio connection. ```jsonl {"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":{}} ``` -------------------------------- ### Configure Cargo.toml dependencies Source: https://github.com/yituorou/meatshell/blob/main/vendor/i-slint-backend-winit/README.md Specify the exact version of the backend and winit to ensure compatibility with the Slint crate. ```toml [dependencies] slint = { version = "x.y.z", ... } i-slint-backend-winit = "=x.y.z" winit = "0.w" ``` -------------------------------- ### Run release script with push Source: https://github.com/yituorou/meatshell/blob/main/docs/release.md Executes the release script to update versions and push changes to the remote repository. ```powershell .\scripts\release.ps1 v0.5.7 -Push ``` -------------------------------- ### Execute Release Script Source: https://github.com/yituorou/meatshell/blob/main/README.md Command to run the release script, which updates versioning, validates the build, and pushes tags to the repository. ```powershell .\scripts\release.ps1 v0.6.0 -Push ``` -------------------------------- ### Configure MCP server Source: https://github.com/yituorou/meatshell/blob/main/README.md Add the MeatShell service to your MCP client configuration. ```json { "mcpServers": { "meatshell": { "command": "/absolute/path/to/meatshell", "args": ["mcp", "serve"] } } } ```