Lima
$ limactl 基金会 中风险Lima(limactl)在 macOS 与 Linux 上运行轻量 Linux 虚拟机,自动完成文件共享、SSH 配置集成与端口转发。工具面向自动化场景设计,支持 limactl list --format json、--log-format json 以及 --yes 非交互确认参数。
brew install lima limactl 直接在工作站管理本地虚拟化与 SSH 客户机执行,无需接入 MCP。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持 --format json(及 Go 模板)、全局 --log-format json 与 --yes 无头参数,不易在非 TTY 下卡住。
limactl list --format jsonand Go template formatting- Global
--log-format jsonand--yesflags prevent TTY hangs
纯本地虚拟机引擎,创建与删除需显式确认(或 --yes),但 delete 缺少 --dry-run。
- Requires
--yesor TTY confirmation before provisioning/deleting limactl deleteremoves local VM disks permanently
在 macOS 与 Linux 上可通过 brew install lima 安装,基于 Virtualization.framework 或 QEMU,无原生 Windows 支持。
- Available on macOS and Linux via Homebrew and GitHub Releases
Colima 与 Rancher Desktop 等工具的底层基座,内置丰富 template:// 预设与单命令 shell 执行。
- Supports
limactl shellsingle-command execution and built-in templates
CNCF 孵化项目(lima-vm/lima),Apache-2.0 协议。
- CNCF
lima-vm/limarepository
lima-vm.io 提供详尽的 CLI 参考与模板说明。
- CLI docs at lima-vm.io/docs/reference/limactl/
安全边界、鉴权与放权指南
在本地 ~/.lima/ 目录保存虚拟机实例、SSH 密钥与 lima.yaml 配置。
CNCF 开源项目(Apache-2.0),仅消耗本地算力与存储。
# Lima (limactl) Agent Rules - Always inspect `limactl list --format json` before creating or shelling into VMs. - Pass `--yes` (or `--tty=false`) on `limactl start` so template confirmation prompts do not hang. - Never run `limactl delete -f` without explicit user confirmation.
Agent 高频安全命令配方
只读查询(安全推荐)
limactl list --format json
按行输出各虚拟机的名称、状态、架构、CPU、内存与 SSH 端口等 JSON 字段。
limactl shell default -- uname -a
非交互式地在 default Linux 虚拟机中运行一条诊断命令并立即退出。
受控写入与预演
limactl start --yes --name dev template://docker
跳过交互式编辑器提示,直接使用内置 Docker 模板启动名为 dev 的虚拟机。
核心优势
- +
limactl list --format json与--log-format json让虚拟机状态与日志易于结构化解析。 - +
--yes可跳过交互式模板编辑提示,适配无头自动化。 - + 内置
template://预设开箱支持 Docker、containerd、k3s 等环境。
注意事项与踩坑点
- ! 不原生支持 Windows 平台。
- ! 宿主机目录挂载到虚拟机内时,客户机侧写入可能因
mounts配置而影响宿主机文件。