# Install cmark with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper

Strongly specified, highly compatible implementation of Markdown. Version 0.31.2 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:cmark
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cmark
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cmark
```

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

### Linux

- apk (92%):

```sh
sudo apk add cmark
```

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

- Debian apt (92%):

```sh
sudo apt install cmark
```

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

- dnf (92%):

```sh
sudo dnf install cmark
```

  Evidence: Fedora Rawhide package metadata: cmark 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#cmark
```

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

- pacman (92%):

```sh
sudo pacman -S cmark
```

  Evidence: Arch Linux sync databases: cmark from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install cmark
```

  Evidence: openSUSE Tumbleweed package metadata: cmark from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:cmark
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cmark>
- **Version:** 0.31.2
- **Source summary:** Strongly specified, highly compatible implementation of Markdown
- **Homepage:** <https://commonmark.org/>
- **Repository:** <https://github.com/commonmark/cmark>
- **Upstream docs:** <https://commonmark.org/>
- **License:** BSD-2-Clause
- **Source archive:** <https://github.com/commonmark/cmark/archive/refs/tags/0.31.2.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cmark (cli)
- cmark (alias)

## 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: 0.31.2
- Local data: ok
- Upstream repository: https://github.com/commonmark/cmark
- Upstream latest detected: 0.31.2 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

cmark is the C reference implementation of CommonMark, providing both a libcmark parsing/rendering library and a cmark command-line program. It exists to make Markdown behavior testable, portable, fast, and consistent across implementations.

### Project history

CommonMark grew out of the need for an unambiguous Markdown specification after years of divergent Markdown implementations. The CommonMark site says the effort started in 2014 with implementers and large-scale Markdown users, and the cmark README credits John MacFarlane with the original library and program alongside contributors to parsing, optimization, links, emphasis, APIs, and tests.

### Adoption history

The CommonMark site reports implementations for dozens of programming languages and lists adopters including Discourse, GitHub, GitLab, Reddit, Qt, Stack Overflow/Stack Exchange, and Swift. The batch input lists cmark packages across Homebrew, Alpine, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE/zypper.

### How it is used

The cmark program parses CommonMark documents and renders HTML, groff man, LaTeX, CommonMark, or XML AST output. The library exposes an AST for programmatic manipulation and is wrapped by bindings for multiple languages; the README also documents security behavior around raw HTML and unsafe links.

### Why package nerds care

cmark is important because it gives package ecosystems a small, fast, C99, dependency-light implementation of a standardized Markdown dialect. It is a common build or test dependency for projects that want Markdown rendering without inheriting each host language's quirks.

### Timeline

- 2004: Markdown is released by John Gruber with Aaron Swartz, providing the background problem CommonMark later addresses.
- 2014: CommonMark publishes early spec versions, with 0.5 and 0.6 appearing in October.
- 2015: the current commonmark/cmark GitHub repository is created.
- 2024: CommonMark spec 0.31.2 is listed as the latest spec version on spec.commonmark.org.

### Related projects

- cmark is related to the CommonMark spec, commonmark.js, cmark-gfm, Markdown.pl, Babelmark, and language bindings for Go, Haskell, Ruby, Lua, Perl, Python, R, Scala, and PHP listed in the README.

### Sources

- <https://commonmark.org/>
- <https://spec.commonmark.org/>
- <https://github.com/commonmark/cmark#readme>
- <https://api.github.com/repos/commonmark/cmark>


## 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:** cmark
- **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 - cmark - 0.30.2-6+b2: normalized package name match | Debian stable package indexes: cmark from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | CommonMark parsing and rendering program | https://github.com/commonmark/cmark
- Debian apt - libcmark-dev - 0.30.2-6+b2: normalized package name match | Debian stable package indexes: libcmark-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | development files for CommonMark parsing and rendering library | https://github.com/commonmark/cmark
- Debian apt - libcmark0.30.2 - 0.30.2-6+b2: normalized package name match | Debian stable package indexes: libcmark0.30.2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | CommonMark parsing and rendering library | https://github.com/commonmark/cmark
- Nix - cmark: normalized package name match | nixpkgs package indexes: pkgs/by-name/cm/cmark/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cmark - 0.30.2-6build1: normalized package name match | Ubuntu 24.04 LTS package indexes: cmark from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | CommonMark parsing and rendering program | https://github.com/commonmark/cmark
- Ubuntu apt - libcmark-dev - 0.30.2-6build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcmark-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | development files for CommonMark parsing and rendering library | https://github.com/commonmark/cmark
- Ubuntu apt - libcmark0.30.2 - 0.30.2-6build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcmark0.30.2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | CommonMark parsing and rendering library | https://github.com/commonmark/cmark
- apk - cmark - 0.31.2-r0: normalized package name match | Alpine Linux edge package indexes: cmark from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C reference implementation of CommonMark, a rationalized Markdown spec | https://github.com/commonmark/cmark
- apk - cmark-dev - 0.31.2-r0: normalized package name match | Alpine Linux edge package indexes: cmark-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C reference implementation of CommonMark, a rationalized Markdown spec (development files) | https://github.com/commonmark/cmark
- apk - cmark-doc - 0.31.2-r0: normalized package name match | Alpine Linux edge package indexes: cmark-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C reference implementation of CommonMark, a rationalized Markdown spec (documentation) | https://github.com/commonmark/cmark
- apk - libcmark - 0.31.2-r0: normalized package name match | Alpine Linux edge package indexes: libcmark from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C reference implementation of CommonMark, a rationalized Markdown spec (libraries) | https://github.com/commonmark/cmark
- dnf - cmark - 0.31.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: cmark from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | CommonMark parsing and rendering | https://github.com/jgm/cmark
- dnf - cmark-devel - 0.31.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: cmark-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for cmark | https://github.com/jgm/cmark
- dnf - cmark-lib - 0.31.1-3.fc44: normalized package name match | Fedora Rawhide package metadata: cmark-lib from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | CommonMark parsing and rendering library | https://github.com/jgm/cmark
- pacman - cmark - 0.31.2-1: normalized package name match | Arch Linux sync databases: cmark from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | CommonMark parsing and rendering library and program in C | https://github.com/commonmark/cmark
- zypper - cmark - 0.31.1-1.3: normalized package name match | openSUSE Tumbleweed package metadata: cmark from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | CommonMark parsing and rendering library and program in C | https://github.com/jgm/cmark


## 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.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [gnome-builder](https://www.automicvault.com/pkg/brew/gnome-builder/) - Popular package that depends on this formula.
- [cmark-gfm](https://www.automicvault.com/pkg/brew/cmark-gfm/) - Shares av.db curated category or tags: c, cli, commonmark, developer-tools, documentation.
- [comrak](https://www.automicvault.com/pkg/brew/comrak/) - Shares av.db curated category or tags: cli, commonmark, developer-tools, markdown, parser.
- [md4c](https://www.automicvault.com/pkg/brew/md4c/) - Shares av.db curated category or tags: c, cli, commonmark, developer-tools, markdown.
- [action-docs](https://www.automicvault.com/pkg/brew/action-docs/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [docfx](https://www.automicvault.com/pkg/brew/docfx/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [docmd](https://www.automicvault.com/pkg/brew/docmd/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [github-markdown-toc](https://www.automicvault.com/pkg/brew/github-markdown-toc/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [go-md2man](https://www.automicvault.com/pkg/brew/go-md2man/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.

## Combined YAML source

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