Command-line tool
yapf
brew/yapf
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Formatter for python code
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
pipx install yapf
macOS
brew install yapf pipx install yapf
Linux
brew install yapf pipx install yapf
Simulate formatting and display a diff of the changes that would be made
yapf -d path/to/file
Recursively format all Python files in a directory, concurrently
yapf -ri --style pep8 -p path/to/directory
Related command-line tools
- black
Python code formatter python hacktoberfest code formatter codeformatter pre-commit-hook autopep8 gofmt yapf - ruff
Extremely fast Python linter, written in Rust rust python python3 static-analysis linter static-code-analysis ruff… - chroma
General purpose syntax highlighter in pure Go accessibility color 颜色 无障碍 color-blindness 色盲 - gdscript-formatter
A fast code formatter for GDScript in Godot 4. - ktfmt
Kotlin code formatter - dfmt
Formatter for D source code - fnlfmt
Formatter for Fennel code - air
Fast and opinionated formatter for R code r language-server lsp formatter rstats
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents