Command-line tool
autopep8
brew/autopep8
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Automatically formats Python code to conform to the PEP 8 style guide
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 autopep8
macOS
brew install autopep8 pipx install autopep8
Linux
pipx install autopep8
Format a file to `stdout`, with a custom maximum line length
autopep8 path/to/file.py --max-line-length length
Format a file, displaying a diff of the changes
autopep8 --diff path/to/file
Format a file in-place and save the changes
autopep8 --in-place path/to/file.py
Related command-line tools
- black
Python code formatter python hacktoberfest code formatter codeformatter pre-commit-hook autopep8 gofmt yapf - yapf
Formatter for python code - chroma
General purpose syntax highlighter in pure Go accessibility color 颜色 无障碍 color-blindness 色盲 - ruff
Extremely fast Python linter, written in Rust rust python python3 static-analysis linter static-code-analysis ruff… - pycodestyle
Simple Python style checker in one Python file - google-java-format
Reformats Java source code to comply with Google Java Style - flake8
Lint your Python code for style and logical errors - @trunkio/launcher
Trunk CLI tool actionlint ansible-lint autopep8 bandit black brakeman buf buildifier cfnlint clang-format clang-tidy…
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents