# Install jags with Homebrew, apt, MacPorts, Nix

Just Another Gibbs Sampler for Bayesian MCMC simulation. Version 4.3.2 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:jags
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install jags
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install jags
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install jags
```

  Evidence: Debian stable package indexes: jags from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#jags
```

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

## Package facts

- **Package key:** brew:jags
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/jags>
- **Version:** 4.3.2
- **Source summary:** Just Another Gibbs Sampler for Bayesian MCMC simulation
- **Homepage:** <https://mcmc-jags.sourceforge.io>
- **Repository:** <https://sourceforge.net/p/mcmc-jags/code-0/ci/default/tree>
- **Upstream docs:** <https://sourceforge.net/projects/mcmc-jags/files/Manuals/4.x>
- **License:** GPL-2.0-only
- **Source archive:** <https://downloads.sourceforge.net/project/mcmc-jags/JAGS/4.x/Source/JAGS-4.3.2.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- jags (cli)
- jags (alias)

## Dependencies

- openblas

## Build dependencies

- gcc

## Install behavior

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

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 4.3.2
- Local data: ok
- Upstream repository: https://mcmc-jags.sourceforge.io
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

JAGS, Just Another Gibbs Sampler, is a Bayesian MCMC engine for models written in the BUGS language family. Its package-manager role is to provide the native sampler executable and library that statistical front ends, especially R interfaces, can call.

### Project history

Martyn Plummer presented JAGS at the 2003 Distributed Statistical Computing workshop as a program for Bayesian graphical models using Gibbs sampling, aiming at compatibility with classic BUGS while leaving room for an R package interface. The project site later summarized the same design goals as a cross-platform BUGS engine, an extensible system for custom functions, distributions, and samplers, and a platform for Bayesian modelling experiments.

The SourceForge project became the authoritative home for source, manuals, and binaries. Its code tree identifies JAGS as a C++ implementation based on the BUGS program created by the MRC Biostatistics Unit, and the project site documents binary distribution for macOS and Windows plus separate Debian, Ubuntu, and MacPorts packaging.

### Adoption history

JAGS adoption is closely tied to the BUGS ecosystem and to R. The project site explicitly points users to Debian, Ubuntu, and MacPorts packages, while the rjags documentation describes an interface to the JAGS MCMC library maintained by Martyn Plummer. Homebrew API data available during this enrichment recorded 890 installs over 365 days, which is small compared with broad CLI tools but meaningful for a specialized scientific engine.

The package has persisted because it gives statisticians a scriptable, cross-platform BUGS-language engine without depending on the WinBUGS/OpenBUGS GUI tradition. That made it a practical backend for teaching, ecological models, Bayesian hierarchical workflows, and R-driven analysis pipelines.

### How it is used

Users write Bayesian hierarchical models in a BUGS-like language, run MCMC simulation through the `jags` terminal interface or an integration such as rjags, and post-process chains in statistical software. The package is a computation backend rather than a general-purpose interactive application.

### Why package nerds care

JAGS is package-nerd interesting because it is a long-lived SourceForge-era scientific tool that still matters at the package boundary: install the native sampler once, then R, scripts, courses, and reproducible analyses can target the same engine across Unix-like systems, Windows, and macOS.

### Timeline

- 2003: Plummer's DSC paper described JAGS as a BUGS-compatible Bayesian graphical modelling program.
- 2015: JAGS 4.0.0 NEWS recorded language and library changes including log-density functions, vector indexing, additional distributions, and better compiler diagnostics.
- 2022: JAGS 4.3.1 NEWS recorded a Windows installer update for the Rtools42 toolchain.
- 2023: The project site recorded JAGS 4.3.2 as released on March 4, 2023, and the JAGS News post described it as a patch release for evolving C++ standard requirements.
- 5.0.0: The NEWS file records new monitor types for deviance-related summaries and WAIC-oriented workflows.

### Related projects

- JAGS belongs to the BUGS lineage with WinBUGS, OpenBUGS, and MultiBUGS, and it is commonly paired with R packages such as rjags. It is conceptually adjacent to later Bayesian engines such as Stan, but its historical niche is BUGS-language compatibility and Gibbs-sampling-oriented extensibility.

### Sources

- <https://cran.r-project.org/web/packages/rjags/rjags.pdf>
- <https://formulae.brew.sh/api/formula/jags.json>
- <https://martynplummer.wordpress.com/2023/03/04/jags-4-3-2-is-released/>
- <https://mcmc-jags.sourceforge.io/>
- <https://sourceforge.net/p/mcmc-jags/code-0/ci/default/tree/>
- <https://sourceforge.net/p/mcmc-jags/code-0/ci/default/tree/NEWS?format=raw>
- <https://www.r-project.org/conferences/DSC-2003/Proceedings/Plummer.pdf>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - jags - 4.3.2-1: normalized package name match | Debian stable package indexes: jags from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Just Another Gibbs Sampler for Bayesian MCMC - binary | https://mcmc-jags.sourceforge.io
- Nix - jags: normalized package name match | nixpkgs package indexes: pkgs/by-name/ja/jags/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - jags - 4.3.2-1: normalized package name match | Ubuntu 24.04 LTS package indexes: jags from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Just Another Gibbs Sampler for Bayesian MCMC - binary | https://mcmc-jags.sourceforge.io
- MacPorts - jags: normalized package name match | MacPorts ports tree: science/jags/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Scientific computing packages](https://www.automicvault.com/pkg/scientific-computing-tools/) - Matched scientific computing metadata.
- [gcc](https://www.automicvault.com/pkg/brew/gcc/) - Build dependency declared by Homebrew.
- [ent](https://www.automicvault.com/pkg/brew/ent/) - Shares av.db curated category or tags: cli, science, statistics.
- [xlispstat](https://www.automicvault.com/pkg/brew/xlispstat/) - Shares av.db curated category or tags: cli, science, statistics.
- [cp2k](https://www.automicvault.com/pkg/brew/cp2k/) - Shares av.db curated category or tags: cli, science, simulation.
- [damask-grid](https://www.automicvault.com/pkg/brew/damask-grid/) - Shares av.db curated category or tags: cli, science, simulation.
- [gibbslda](https://www.automicvault.com/pkg/brew/gibbslda/) - Shares av.db curated category or tags: cli, gibbs-sampling, science.
- [itpp](https://www.automicvault.com/pkg/brew/itpp/) - Shares av.db curated category or tags: cli, science, simulation.
- [lammps](https://www.automicvault.com/pkg/brew/lammps/) - Shares av.db curated category or tags: cli, science, simulation.
- [mrbayes](https://www.automicvault.com/pkg/brew/mrbayes/) - Shares av.db curated category or tags: cli, mcmc, science.
- [ngspice](https://www.automicvault.com/pkg/brew/ngspice/) - Local package facts share a topical domain. Shared terms: cli, science, simulation.
- [spim](https://www.automicvault.com/pkg/brew/spim/) - Local package facts share a topical domain. Shared terms: cli, science, simulation.
- [asciitex](https://www.automicvault.com/pkg/brew/asciitex/) - Local package facts share a topical domain. Shared terms: cli, science.

## Combined YAML source

View the package source record on GitHub. [combined/jags.yml](https://github.com/automic-vault/db/blob/main/combined/jags.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
