# CmdStan

> Command-line interface to Stan for compiling and running Bayesian models

Source: https://talira.ai/catalog/cmdstan-0kddshy5
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [libraries / math / statistics](https://talira.ai/categories/libraries/math/statistics)
- Licence: BSD-3-Clause[^1][^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (BSD-3-Clause).
- Free tier: yes[^1]
- Backed by: [Stan Development Team](https://talira.ai/orgs/stan-dev.md)

CmdStan is the command-line interface to [Stan](https://talira.ai/catalog/stan-rerqryze.md), the statistical modelling language. It translates a Stan program to C++ with the stanc3 compiler and builds it into an executable you run from the shell for full Bayesian inference with the No-U-Turn sampler (NUTS), maximum likelihood estimation with BFGS and L-BFGS optimization, Pathfinder and ADVI variational inference, and Laplace sampling. It also ships stansummary and diagnose for checking the outputs. CmdStanPy and CmdStanR are thin interfaces to it for Python and R. Install it by downloading a release tarball and running make.

## Links

- GitHub: https://github.com/stan-dev/cmdstan
- Docs: https://mc-stan.org/docs/cmdstan-guide/

## Problems it solves

- fit a Bayesian model from the command line without R or Python
- run Hamiltonian Monte Carlo sampling on my Stan model in a shell script
- compile a Stan model into a standalone executable for a cluster

## Features

- MCMC sampling with NUTS (Hamiltonian Monte Carlo)
- optimization with BFGS, L-BFGS and Newton
- Pathfinder and ADVI variational inference
- Laplace sampling
- stansummary and diagnose for MCMC output
- stanc3 compiler from Stan to C++

## Trust

Overall: 0.57 out of 1.
Signals: maintenance 1.00, adoption 0.48, momentum 0.12, community 0.67, backing 0.30, extensibility 0.00.

- last commit 9 days ago
- 81 commits in the last 90 days
- latest release v2.40.0 2 months ago
- 241 GitHub stars
- 47 contributors
- accepts sponsorship (Github, Custom)
- backed by Stan Development Team

## Related

- Works with [Stan](https://talira.ai/catalog/stan-rerqryze.md)

## Alternatives

- [Stan](https://talira.ai/catalog/stan-rerqryze.md): Probabilistic programming language for Bayesian statistical modelling
- [PyMC](https://talira.ai/catalog/pymc-r67zqyr4.md): Bayesian modeling and probabilistic programming in Python
- [JAGS](https://talira.ai/catalog/jags-f2sywqaj.md): Just Another Gibbs Sampler: MCMC for Bayesian hierarchical models

## Sources

[^1]: https://github.com/stan-dev/cmdstan/blob/develop/README.md (checked 29 Nov 2026)
[^2]: https://github.com/stan-dev/cmdstan/blob/develop/LICENSE (checked 29 Nov 2026)
