lume 是一个轻量级的命令行界面 (CLI) 和本地 API 服务器,用于在 Apple Silicon 上创建、运行和管理 macOS 和 Linux 虚拟机 (VM)。它利用 Apple 的 Virtualization.Framework,提供接近原生性能的虚拟机体验。

只需一步即可运行预构建的 macOS 镜像

lume cli
lume run macos-sequoia-vanilla:latest

如需 Python 接口,请查看 pylume

用法

lume <command>

Commands:
  lume create <name>            Create a new macOS or Linux VM
  lume run <name>               Run a VM
  lume ls                       List all VMs
  lume get <name>               Get detailed information about a VM
  lume set <name>               Modify VM configuration
  lume stop <name>              Stop a running VM
  lume delete <name>            Delete a VM
  lume pull <image>             Pull a macOS image from container registry
  lume clone <name> <new-name>  Clone an existing VM
  lume images                   List available macOS images in local cache
  lume ipsw                     Get the latest macOS restore image URL
  lume prune                    Remove cached images
  lume serve                    Start the API server

Options:
  --help     Show help [boolean]
  --version  Show version number [boolean]

Command Options:
  create:
    --os <os>            Operating system to install (macOS or linux, default: macOS)
    --cpu <cores>        Number of CPU cores (default: 4)
    --memory <size>      Memory size, e.g., 8GB (default: 4GB)
    --disk-size <size>   Disk size, e.g., 50GB (default: 40GB)
    --display <res>      Display resolution (default: 1024x768)
    --ipsw <path>        Path to IPSW file or 'latest' for macOS VMs

  run:
    --no-display         Do not start the VNC client app
    --shared-dir <dir>   Share directory with VM (format: path[:ro|rw])
    --mount <path>       For Linux VMs only, attach a read-only disk image
    --registry <url>     Container registry URL (default: ghcr.io)
    --organization <org> Organization to pull from (default: trycua)
    --vnc-port <port>    Port to use for the VNC server (default: 0 for auto-assign)

  set:
    --cpu <cores>        New number of CPU cores (e.g., 4)
    --memory <size>      New memory size (e.g., 8192MB or 8GB)
    --disk-size <size>   New disk size (e.g., 40960MB or 40GB)
    --display <res>      New display resolution in format WIDTHxHEIGHT (e.g., 1024x768)

  delete:
    --force              Force deletion without confirmation

  pull:
    --registry <url>     Container registry URL (default: ghcr.io)
    --organization <org> Organization to pull from (default: trycua)

  serve:
    --port <port>        Port to listen on (default: 3000)

安装

brew tap trycua/lume
brew install lume

您也可以从最新版本下载 lume.pkg.tar.gz 压缩包,解压并手动安装软件包。

预构建镜像

预构建镜像可在注册表 ghcr.io/trycua 中找到。 这些镜像预配置了 SSH 服务器并启用了自动登录。

为了您的 VM 安全,请在首次登录后立即更改默认密码 lume

镜像 标签 描述 大小
macos-sequoia-vanilla latest, 15.2 macOS Sequoia 15.2 40GB
macos-sequoia-xcode latest, 15.2 macOS Sequoia 15.2,带有 Xcode 命令行工具 50GB
ubuntu-noble-vanilla latest, 24.04.1 Ubuntu Server for ARM 24.04.1 LTS,带有 Ubuntu 桌面 20GB

如需额外磁盘空间,请在使用 lume set <name> --disk-size <size> 命令拉取镜像后调整 VM 磁盘大小。

本地 API 服务器

lume 公开了一个本地 HTTP API 服务器,监听 https://:3000/lume,从而实现虚拟机的自动化管理。

lume serve

有关详细的 API 文档,请参阅 API 参考

文档

贡献

我们欢迎并非常感谢您对 lume 的贡献! 无论您是改进文档、添加新功能、修复错误还是添加新的 VM 镜像,您的努力都有助于使 lume 变得更好。 有关如何贡献的详细说明,请参阅我们的贡献指南

加入我们的 Discord 社区 讨论想法或获得帮助。

许可证

lume 在 MIT 许可证下开源 - 有关详细信息,请参阅 LICENSE 文件。

商标

Apple、macOS 和 Apple Silicon 是 Apple Inc. 的商标。 Ubuntu 和 Canonical 是 Canonical Ltd. 的注册商标。 本项目与 Apple Inc. 或 Canonical Ltd. 没有任何关联,也未获得其认可或赞助。

Stargazers 随时间推移

Stargazers over time