商业产业 Hacker News LLM 2026-08-17T08:49 正文 ok 393 words

🔶 Llama-macOS:面向 llama.cpp、原生支持 Agent 与 MCP 的 macOS 前端

英文标题:🔶 Llama-macOS – Agentic and MCP Native macOS Front End for Llama.cpp

Llama 是一款 macOS 菜单栏应用,可在本地运行 LLM,并通过 `http://localhost:9931/v1` 提供兼容 llama.cpp server 的 API。它会复用已有的 llama.cpp 安装和 Hugging Face 模型缓存,也可自动下载适配 Mac 硬件的预编译二进制与推荐 GGUF 模型。该应用体积仅 `4 MB`,支持内置 WebUI、外部编码 Agent、聊天界面和编辑器连接,并通过按需加载、空闲卸载降低内存占用。对开发者而言,它提供了零配置的本地模型运行环境,同时也提供了网络暴露和自定义服务器参数等高级配置能力。
打开原文相关 6 · 机会 1
media760.2 KB media40.2 KB

中文

Llama 是一款用于运行本地 LLM 的 macOS 菜单栏应用。

视频/嵌入内容:观看 2 分钟介绍 📽️

Llama

brew install --cask llama-app

或从 Releases 下载。

启动 Llama 后,它会在 http://localhost:9931/v1 运行本地服务器。

如果你已安装 llama.cpp,Llama 会直接使用它;否则,它会为你的 Mac 安装预构建二进制文件。你此前通过 llama.cpp 安装的模型会自动出现在应用中。你可以从 Hugging Face 安装任意 GGUF 模型,Llama 还会推荐适合你的 Mac 硬件运行的模型。

你可以在内置 WebUI 中与任意模型聊天,连接其他应用程序(编码 Agent、聊天 UI、编辑器),或直接使用 API。模型会在请求到来时加载,并在空闲时卸载,因此未使用时不会占用内存。

  • 100% 本地运行 — 模型在你的 Mac 上运行;数据绝不会离开设备
  • 占用空间小 — 原生 macOS 应用仅 4 MB
  • 零配置 — 模型会根据你的 Mac 自动配置为最佳设置
  • 模型推荐 — 内置可在你的 Mac 上运行的模型列表,支持一键安装
  • 标准存储 — 模型存放于 Hugging Face 缓存,可与 llama.cpp 及其他工具共享
  • 基于 llama.cpp 构建 — 来自 GGML 组织,与 llama.cpp 同步开发

列出已安装的模型:

curl http://localhost:9931/v1/models

向模型发送消息:

curl http://localhost:9931/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ggml-org/gpt-oss-20b-GGUF:MXFP4",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

完整 API 参考请参阅 llama.cpp server 文档。

暴露到网络 — 默认情况下,服务器仅可从你的 Mac(localhost)访问。该选项允许本地网络中的其他设备进行连接。仅当你了解相关安全风险时才应启用此选项。

# 绑定到所有网络接口(0.0.0.0)
defaults write app.llama.Llama exposeToNetwork -bool YES

# 或绑定到特定 IP(例如用于 Tailscale)
defaults write app.llama.Llama exposeToNetwork -string "100.x.x.x"

# 禁用(默认)
defaults delete app.llama.Llama exposeToNetwork

自定义服务器参数 — 附加到 llama serve 命令的额外 CLI 参数,适用于应用未提供的服务器标志(例如 --api-key)。这些参数位于应用自身参数之后,因此在服务器以后出现的参数为准时,它们可以覆盖应用设置。在下一次启动服务器时生效。

# 向服务器命令追加自定义参数
defaults write app.llama.Llama extraServerArgs -string "--api-key secret"

# 移除(默认)
defaults delete app.llama.Llama extraServerArgs

English / 原文

Llama is a macOS menu bar app for running local LLMs.

Watch a 2-minute intro 📽️

Llama

brew install --cask llama-app

Or download from Releases.

When you start Llama, it runs a local server at http://localhost:9931/v1.

If you have llama.cpp installed, Llama uses it. Otherwise, it installs a prebuilt binary for your Mac. Models you've already installed via llama.cpp show up in the app automatically. You can install any GGUF model from Hugging Face, and Llama also recommends models that fit your Mac's hardware.

You can chat with any model in the built-in WebUI, connect other apps (coding agents, chat UIs, editors), or use the API directly. Models load when requested and unload when idle, so they don't take up memory when not in use.

  • 100% local — Models run on your Mac; no data ever leaves it
  • Small footprint — 4 MB native macOS app
  • Zero configuration — models are auto-configured with optimal settings for your Mac
  • Model recommendations — a built-in list of models your Mac can run, installable in one click
  • Standard storage — models live in the Hugging Face cache, shared with llama.cpp and other tools
  • Built on llama.cpp — from the GGML org, developed alongside llama.cpp

List installed models:

curl http://localhost:9931/v1/models

Send a message to a model:

curl http://localhost:9931/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ggml-org/gpt-oss-20b-GGUF:MXFP4",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

See complete API reference in the llama.cpp server docs.

Expose to network — By default, the server is only accessible from your Mac (localhost). This option allows connections from other devices on your local network. Only enable this if you understand the security risks.

# bind to all interfaces (0.0.0.0)
defaults write app.llama.Llama exposeToNetwork -bool YES

# or bind to a specific IP (e.g., for Tailscale)
defaults write app.llama.Llama exposeToNetwork -string "100.x.x.x"

# disable (default)
defaults delete app.llama.Llama exposeToNetwork

Custom server arguments — Extra CLI arguments appended to the llama serve command, for server flags the app doesn't expose (e.g. --api-key). They come after the app's own flags, so where the server honors the later occurrence they can override the app's settings. Takes effect on the next server start.

# append custom arguments to the server command
defaults write app.llama.Llama extraServerArgs -string "--api-key secret"

# remove (default)
defaults delete app.llama.Llama extraServerArgs