New Tool Radar

Local AI

How to Install llama.cpp on a Mac with Homebrew

Install llama.cpp with Homebrew on an Apple Silicon Mac and check the tools are on your PATH.

Schematic illustration with three step boxes: Check Homebrew; Install the formula; Verify the tools.

Homebrew maintains a llama.cpp formula that installs the tools with Metal enabled by default on Apple Silicon, so there is no need to compile from source. The install gives you llama-cli, llama-server and the other tools, and newer builds also provide a single llama command with subcommands. This guide installs it and checks the tools.

Before you start

  • An Apple Silicon Mac with Homebrew installed.
  • A terminal with the Homebrew prefix on PATH, usually /opt/homebrew/bin.
  • An internet connection for the download.

Check Homebrew first

Confirm Homebrew works and the formula exists:

brew --version
brew info llama.cpp

The info output shows the version Homebrew will install. If brew itself is missing, install it from the Homebrew site first.

Install the formula

Update Homebrew and install the formula:

brew update
brew install llama.cpp

Homebrew downloads a bottle, so this is a download rather than a compile, and it should finish in a minute or two.

Verify the tools

Check the tools are on your PATH:

brew list --versions llama.cpp
command -v llama-cli
command -v llama-server

On newer builds, the tools are also available through a single dispatcher: llama version prints the build number, and llama cli and llama serve are the chat and server subcommands.

Worked example

Worked example: after the install, brew list --versions llama.cpp should print a version such as 1.1.0, and llama-server --version should print its version. Download a small GGUF model and run llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF:Q8_0 to confirm the tools work end to end.

Expected result

UNTESTED in this guide: no install was run while writing it. The expected result is that the formula installs, both commands resolve on PATH, and the small model chats.

Limitations

The Homebrew formula may lag the main branch by a few weeks, so the newest flags may not be present yet. For the latest features, build from source instead; for a working install, Homebrew is the faster path.

Sources

See all