# Install llama.cpp with Homebrew, apk, dnf, MacPorts, Nix, winget

LLM inference in C/C++. Version 9890 via Homebrew; verified 2026-07-06.

## Install

```sh
sudo av install brew:llama.cpp
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install llama.cpp
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install llama.cpp
```

  Evidence: MacPorts ports tree: llm/llama.cpp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add llama-server
```

  Evidence: Alpine Linux edge package indexes: llama-server from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install llama-cpp
```

  Evidence: Fedora Rawhide package metadata: llama-cpp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#llama-cpp
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ll/llama-cpp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- winget (92%):

```sh
winget install --id ggml.llamacpp -e
```

  Evidence: Windows Package Manager source index: ggml.llamacpp from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:llama.cpp
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/llama.cpp>
- **Version:** 9890
- **Source summary:** LLM inference in C/C++
- **Homepage:** <https://llama.app>
- **Repository:** <https://github.com/ggml-org/llama.cpp>
- **Upstream docs:** <https://github.com/ggml-org/llama.cpp#readme>
- **License:** MIT
- **Source archive:** <https://github.com/ggml-org/llama.cpp.git>
- **Last updated:** 2026-07-06T22:27:44Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- llama (cli)
- llama-batched (cli)
- llama-batched-bench (cli)
- llama-bench (cli)
- llama-cli (cli)
- llama-completion (cli)
- llama-debug (cli)
- llama-debug-template-parser (cli)
- llama-diffusion-cli (cli)
- llama-embedding (cli)
- llama-eval-callback (cli)
- llama-finetune (cli)
- llama-fit-params (cli)
- llama-gen-docs (cli)
- llama-gguf (cli)
- llama-gguf-hash (cli)
- llama-gguf-split (cli)
- llama-idle (cli)
- llama-imatrix (cli)
- llama-lookahead (cli)
- llama-lookup (cli)
- llama-lookup-create (cli)
- llama-lookup-merge (cli)
- llama-lookup-stats (cli)
- llama-mtmd-cli (cli)
- llama-parallel (cli)
- llama-passkey (cli)
- llama-perplexity (cli)
- llama-quantize (cli)
- llama-results (cli)
- llama-retrieval (cli)
- llama-server (cli)
- llama-simple (cli)
- llama-simple-chat (cli)
- llama-speculative (cli)
- llama-speculative-simple (cli)
- llama-template-analysis (cli)
- llama-tokenize (cli)
- llama-tts (cli)
- llama (alias)
- llama-batched (alias)
- llama-batched-bench (alias)
- llama-bench (alias)
- llama-cli (alias)
- llama-completion (alias)
- llama-debug (alias)
- llama-debug-template-parser (alias)
- llama-diffusion-cli (alias)
- llama-embedding (alias)
- llama-eval-callback (alias)
- llama-finetune (alias)
- llama-fit-params (alias)
- llama-gen-docs (alias)
- llama-gguf (alias)
- llama-gguf-hash (alias)
- llama-gguf-split (alias)
- llama-idle (alias)
- llama-imatrix (alias)
- llama-lookahead (alias)
- llama-lookup (alias)
- llama-lookup-create (alias)
- llama-lookup-merge (alias)
- llama-lookup-stats (alias)
- llama-mtmd-cli (alias)
- llama-parallel (alias)
- llama-passkey (alias)
- llama-perplexity (alias)
- llama-quantize (alias)
- llama-results (alias)
- llama-retrieval (alias)
- llama-server (alias)
- llama-simple (alias)
- llama-simple-chat (alias)
- llama-speculative (alias)
- llama-speculative-simple (alias)
- llama-template-analysis (alias)
- llama-tokenize (alias)
- llama-tts (alias)

## Dependencies

- ggml
- openssl@3

## Build dependencies

- cmake

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 9890
- Package-manager updated: 2026-07-06
- Local data: ok
- Upstream repository: https://github.com/ggml-org/llama.cpp
- info: No cached GitHub release or tag data was available.
## Project history and usage

llama.cpp is one of the defining packages of the local-LLM era: a C/C++ inference stack that made it practical to run quantized transformer models on laptops, desktops, servers, and small devices without a heavyweight Python runtime.

### Project history

The repository was created on GitHub on March 10, 2023, shortly after Meta's LLaMA model release changed the center of gravity for local language-model experimentation. The README states the project goal as LLM inference with minimal setup and strong performance across local and cloud hardware.

The project is closely tied to ggml. Its README describes llama.cpp as the main playground for developing new ggml features, and the implementation grew around plain C/C++, integer quantization, CPU backends, and hardware accelerators such as Metal, CUDA, Vulkan, SYCL, HIP, and related GPU paths.

As model support broadened beyond the original LLaMA family, llama.cpp became a runtime and tooling umbrella: converters, quantizers, benchmarking tools, embedding tools, an OpenAI-compatible server, multimodal support, and many model-family loaders are represented in the command set and documentation.

### Adoption history

Package adoption spread because llama.cpp lowered the cost of trying local inference: build from source, install from Homebrew, Nix, winget, conda-forge, Docker, or download release binaries, then run a model file or fetch one from Hugging Face-oriented workflows.

The README's bindings list shows the surrounding ecosystem that formed around the C/C++ core, including Python, Go, Node.js, Ruby, browser/Wasm, editor-completion plugins, and server clients. That ecosystem made llama.cpp both an end-user CLI and a library/runtime target for other packages.

Its high-frequency build-tag release pattern reflects active downstream pressure: package managers, bindings, model hubs, and local-AI applications all depend on fast propagation of backend, quantization, and model-format changes.

### How it is used

Users run llama-cli for local prompts, llama-server for an OpenAI-compatible HTTP API, llama-bench for performance testing, llama-quantize for smaller model files, and many auxiliary tools for embeddings, perplexity, retrieval, tokenization, and model-file manipulation.

The package is especially useful when a developer wants a self-contained inference engine: compile once, point it at a model, and choose a CPU/GPU backend without adopting a full ML framework stack.

### Why package nerds care

For package maintainers, llama.cpp is unusually dynamic: hardware backend flags, model-format transitions, CLI renames, bundled tools, and release cadence all matter. It turned local AI into something package managers had to treat like a fast-moving systems tool rather than a single Python application.

It is also a packaging bridge between model hubs and Unix tooling. The same project can be installed as a formula, used as a server daemon, linked by language bindings, wrapped by desktop apps, or embedded in another inference product.

### Timeline

- 2023: ggml-org/llama.cpp repository created on March 10.
- 2023: The project manifesto discussion documented goals and direction for the early community.
- 2024: llama.cpp issue trackers began maintaining separate API changelogs for libllama and llama-server.
- 2025: Multimodal support reached llama-server through the upstream pull request and documentation referenced from the README.
- 2026: Homebrew, Nix, winget, conda-forge, Docker, and release binaries were documented installation paths in the upstream README.

### Related projects

- ggml is the closest related project, because llama.cpp is the main development playground for that tensor library.
- Important downstream and adjacent projects include llama-cpp-python, node-llama-cpp, go-llama.cpp, wllama, llama.vscode, llama.vim, and applications that wrap llama-server's OpenAI-compatible API.

### Sources

- <https://api.github.com/repos/ggml-org/llama.cpp>
- <https://formulae.brew.sh/formula/llama.cpp>
- <https://github.com/ggml-org/ggml>
- <https://github.com/ggml-org/llama.cpp>
- <https://github.com/ggml-org/llama.cpp/discussions/205>
- <https://github.com/ggml-org/llama.cpp/issues/9289>
- <https://github.com/ggml-org/llama.cpp/issues/9291>
- <https://github.com/ggml-org/llama.cpp/pull/12898>
- <https://github.com/ggml-org/llama.cpp/releases>
- <https://raw.githubusercontent.com/ggml-org/llama.cpp/master/README.md>


## Security Notes

No matching local secret-handling manifest was found for llama.cpp. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** llama.cpp
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - llama-cpp: normalized package name match | nixpkgs package indexes: pkgs/by-name/ll/llama-cpp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - llama-server - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama-server from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | llama.cpp server | https://github.com/ggml-org/llama.cpp
- apk - llama-server-openrc - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama-server-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | llama.cpp server (OpenRC init scripts) | https://github.com/ggml-org/llama.cpp
- apk - llama.cpp - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama.cpp from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LLM inference in C/C++ (with Vulkan GPU acceleration) | https://github.com/ggml-org/llama.cpp
- apk - llama.cpp-cpu - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama.cpp-cpu from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LLM inference in C/C++ (with Vulkan GPU acceleration) | https://github.com/ggml-org/llama.cpp
- apk - llama.cpp-dev - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama.cpp-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LLM inference in C/C++ (with Vulkan GPU acceleration) (development files) | https://github.com/ggml-org/llama.cpp
- apk - llama.cpp-extras - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama.cpp-extras from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | llama.cpp additional binaries | https://github.com/ggml-org/llama.cpp
- apk - llama.cpp-libs - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama.cpp-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LLM inference in C/C++ (with Vulkan GPU acceleration) (shared libraries) | https://github.com/ggml-org/llama.cpp
- apk - llama.cpp-vulkan - 0.0.9564-r0: normalized package name match | Alpine Linux edge package indexes: llama.cpp-vulkan from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LLM inference in C/C++ (with Vulkan GPU acceleration) | https://github.com/ggml-org/llama.cpp
- dnf - llama-cpp - b8064-1.fc45: normalized package name match | Fedora Rawhide package metadata: llama-cpp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Port of Facebook's LLaMA model in C/C++ | https://github.com/ggerganov/llama.cpp
- dnf - llama-cpp-devel - b8064-1.fc45: normalized package name match | Fedora Rawhide package metadata: llama-cpp-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Port of Facebook's LLaMA model in C/C++ | https://github.com/ggerganov/llama.cpp
- MacPorts - llama.cpp: normalized package name match | MacPorts ports tree: llm/llama.cpp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - ggml.llamacpp: normalized package name match | Windows Package Manager source index: ggml.llamacpp from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [ramalama](https://www.automicvault.com/pkg/brew/ramalama/) - Popular package that depends on this formula.
- [mlx](https://www.automicvault.com/pkg/brew/mlx/) - Shares av.db curated category or tags: c-plus-plus, cli, developer-tools, machine-learning.
- [crf++](https://www.automicvault.com/pkg/brew/crf/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [dvc](https://www.automicvault.com/pkg/brew/dvc/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [hf](https://www.automicvault.com/pkg/brew/hf/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [hf-mcp-server](https://www.automicvault.com/pkg/brew/hf-mcp-server/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [mlx-lm](https://www.automicvault.com/pkg/brew/mlx-lm/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [pytorch](https://www.automicvault.com/pkg/brew/pytorch/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [text-embeddings-inference](https://www.automicvault.com/pkg/brew/text-embeddings-inference/) - Shares av.db curated category or tags: cli, developer-tools, machine-learning.
- [magika](https://www.automicvault.com/pkg/brew/magika/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, learning, machine.

## Combined YAML source

View the package source record on GitHub. [combined/llama.cpp.yml](https://github.com/automic-vault/db/blob/main/combined/llama.cpp.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
