Automic VaultAutomic Vault

brew

Install clang-format with Homebrew, apt, dnf

Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript. Version 22.1.8 via Homebrew; verified 2026-06-16.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install clang-format

local Homebrew formula metadata

Linux

Debian aptverified · 92%
sudo apt install clang-format

Debian stable package indexes · clang-format · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install git-clang-format

Fedora Rawhide package metadata · git-clang-format · source: dl.fedoraproject.org

overview

Package summary

Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript

Commands and aliases

  • clang-format
  • git-clang-format

history

Project history and usage

clang-format is LLVM/Clang's source formatter and editor-integration tool for C-family and several adjacent languages. It became a standard package-manager dependency because teams can install one CLI and enforce formatting locally, in editors, in Git workflows, and in CI.

Project history

LLVM's Clang 3.3 documentation already described ClangFormat as tools built on LibFormat, with a standalone clang-format binary under clang/tools/clang-format. Later documentation expanded language coverage, configuration files, ignore files, and editor integrations.

Adoption history

The supplied package-manager data shows Homebrew, Debian, Fedora/DNF, and Ubuntu packaging. Its adoption is reinforced by direct editor integration in Vim, Emacs, BBEdit, CLion, Visual Studio, and similar tooling documented by LLVM.

How it is used

Users run clang-format over files or standard input, often with -i for in-place edits. Project style is commonly stored in .clang-format or _clang-format, generated with -dump-config, and found by using -style=file.

Why package nerds care

clang-format is significant because it decouples source formatting policy from any one IDE. Package managers provide a pinned binary that projects can call from hooks, CI jobs, editor plugins, and language-server-style workflows, making formatting reproducible across operating systems.

Timeline

  • 2013: Clang 3.3 documentation included clang-format for C/C++/Obj-C.
  • 2014: Clang 3.4 documentation documented multi-file formatting and dump-config support.
  • 2020: LLVM 11 release notes continued adding clang-format style options such as IndentExternBlock.
  • 2026: Current LLVM documentation lists broader language support including Java, JavaScript, JSON, TypeScript, C#, Protobuf, and Objective-C.

Related projects

  • Related projects include LLVM, Clang, LibFormat, git-clang-format, clang-format editor plugins, clangd, and language-specific formatters such as gofmt, rustfmt, black, and prettier.

security posture

No protected-tool coverage found yet

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

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
.clang-format_clang-format

executables

Installed executables

CommandKindExposureNote
clang-formatcliglobal executable
git-clang-formatcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version22.1.8
manager updated2026-06-16
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/llvm/llvm-project

install metadata

Package metadata

Package keybrew:clang-format
Version22.1.8
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/clang-format
Homepagehttps://clang.llvm.org/docs/ClangFormat.html
Repositoryhttps://github.com/llvm/llvm-project
Upstream docshttps://clang.llvm.org/docs/ClangFormat.html
LicenseApache-2.0 WITH LLVM-exception
Source archivehttps://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz
Last updated2026-06-16T19:45:28Z
Pulseupdated
Build dependenciescmake
Uses from macOSpython
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameclang-format
Aliases
  • clang-format@22
Version Scheme1
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

clang-format 1:19.0-63

Tool to format C/C++/Obj-C code

sudo apt install clang-format
  • Section: devel
  • Architecture: amd64
  • Source Package: llvm-defaults
  • 1 dependencies
  • normalized package name match
  • Matched by: Clang Format
Debian stable package indexes · deb.debian.org · Debian stable package indexes: clang-format from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Ubuntu apt95%

clang-format 1:18.0-59~exp2

Tool to format C/C++/Obj-C code

sudo apt install clang-format
  • Section: universe/devel
  • Architecture: amd64
  • Source Package: llvm-defaults
  • 1 dependencies
  • normalized package name match
  • Matched by: Clang Format
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: clang-format from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
dnf92%

git-clang-format 22.1.7-1.fc45

Integration of clang-format for git

http://llvm.org

sudo dnf install git-clang-format
  • License: Apache-2.0 WITH LLVM-exception OR NCSA
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: llvm
  • 4 dependencies
  • 1 provides
  • installed executable or alias match
  • Matched by: Git Clang Format
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: git-clang-format from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Nucleus package database
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment