macOS
brew install blacklocal Homebrew formula metadata
brew
Python code formatter. Version 26.5.1 via Homebrew; verified 2026-06-09.
install
brew install blacklocal Homebrew formula metadata
sudo apk add blackAlpine Linux edge package indexes · black · source: dl-cdn.alpinelinux.org
sudo apt install blackDebian stable package indexes · black · source: deb.debian.org
sudo dnf install blackFedora Rawhide package metadata · black · source: dl.fedoraproject.org
nix profile install nixpkgs#blacknixpkgs package indexes · black · source: raw.githubusercontent.com
winget install --id psf.black -eWindows Package Manager source index · psf.black · source: cdn.winget.microsoft.com
overview
Python code formatter
history
Black is the opinionated Python code formatter whose promise is deterministic, low-choice formatting. It became one of the defining Python developer tools of the late 2010s and 2020s, normalizing gofmt-style formatting in Python projects.
Black was first published to PyPI in March 2018 and its GitHub repository was created the same day. Its README and documentation present it as 'The Uncompromising Code Formatter': users trade manual formatting control for speed, determinism, smaller diffs, and fewer style arguments.
The project is now maintained under the Python Software Foundation GitHub organization. Its documentation codifies a stability policy, preview style, and yearly stable style cadence, allowing Black to support new Python syntax while preserving formatting predictability for established projects.
Black spread rapidly through PyPI, pre-commit, CI, editor integrations, and Linux/macOS/Windows package managers. The README lists major projects and organizations using it, including pytest, Django, pandas, SQLAlchemy, Home Assistant, Zulip, Dropbox, Lyft, Mozilla, Quora, and others.
Its adoption changed Python package maintenance culture: many projects stopped debating PEP 8 edge cases in reviews and delegated whitespace, wrapping, quote normalization, and import-adjacent formatting decisions to a pinned formatter version.
The standard CLI workflow is black {source_file_or_directory}; Black reformats files in place and can also run as python -m black. Configuration normally lives in a project's pyproject.toml under [tool.black], with global fallback files at $XDG_CONFIG_HOME/black or ~/.config/black on Unix-like systems and ~/.black on Windows.
Black is commonly run from pre-commit hooks, GitHub Actions, editors, and CI jobs. Its documentation recommends the psf/black-pre-commit-mirror hook for version-control integration and warns that blackd does not use pyproject.toml configuration.
Black is package-nerd significant because it made formatter pinning a first-class dependency-management concern in Python. A Black version in pyproject.toml, pre-commit config, CI images, or distro packages can affect every formatted file in a repository, so release notes and stability guarantees matter more than they do for many CLIs.
It also helped shift Python packaging metadata toward pyproject.toml as a shared control plane: the same file that PEP 518 introduced for builds became the obvious place to store Black's project style. Black's presence in Homebrew, Debian, Ubuntu, Fedora, Alpine, Nix, and winget mirrors its role as both Python package and general developer workstation tool.
For maintainers, Black became shorthand for removing a category of bikeshed from reviews. For downstream packagers, it is a high-visibility fast-moving Python application that must track supported Python versions, parser behavior, compiled wheels, pre-commit mirrors, and reproducible CLI behavior.
security posture
formula declares a Homebrew service.
orange risk · medium confidence · infrastructure
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
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.
Config paths the tool may read or write during local use.
pyproject.toml$XDG_CONFIG_HOME/black~/.config/blackpyproject.toml~\.blackexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
black | cli | global executable | |
blackd | cli | global executable |
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.
https://black.readthedocs.io/en/stable/
install metadata
| Package key | brew:black |
|---|---|
| Version | 26.5.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/black |
| Homepage | https://black.readthedocs.io/en/stable/ |
| Repository | https://github.com/psf/black |
| Upstream docs | https://black.readthedocs.io/en/stable |
| License | MIT |
| Source archive | https://files.pythonhosted.org/packages/c0/37/5628dd55bf2b34257fc7603f0fe97c40e3aaf24265f416a9c85c95ca1436/black-26.5.1.tar.gz |
| Last updated | 2026-06-09T10:24:11Z |
| Pulse | updated |
| Dependencies | python@3.14 |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | black |
| Version Scheme | 0 |
| Revision | 1 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
black 25.1.0-3+deb13u1
uncompromising Python code formatter (Python 3)
sudo apt install blackpython-black-doc 25.1.0-3+deb13u1
uncompromising Python code formatter (common documentation)
sudo apt install python-black-docblack
nix profile install nixpkgs#blackblack 24.2.0-1ubuntu1
uncompromising Python code formatter (Python 3)
sudo apt install blackpython-black-doc 24.2.0-1ubuntu1
uncompromising Python code formatter (common documentation)
sudo apt install python-black-docblack 26.3.0-r1
The uncompromising Python code formatter
sudo apk add blackblack-bash-completion 26.3.0-r1
Bash completions for black
sudo apk add black-bash-completionblack-fish-completion 26.3.0-r1
Fish completions for black
sudo apk add black-fish-completionblack-pyc 26.3.0-r1
Precompiled Python bytecode for black
sudo apk add black-pycblack-zsh-completion 26.3.0-r1
Zsh completions for black
sudo apk add black-zsh-completionblack 25.1.0-9.fc45
The uncompromising code formatter
sudo dnf install blackpsf.black
winget install --id psf.black -esource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.