bashate
A pep8 equivalent for bash scripts
What it is and what it does
bashate is a command-line linter that checks bash scripts against a fixed set of style rules modeled after Python's pep8 (pycodestyle). It identifies six categories of issues: trailing whitespace, tab indentation, non-multiple-of-4 indents, missing final newlines, missing shebangs, and line length violations. It also enforces structural rules (e.g., *then* on the same line as *if*) and flags deprecated or unsafe bash syntax like `$[` arithmetic or unsafe local declarations.
The tool outputs results in pycodestyle format and was originally developed within the OpenStack DevStack project. It depends only on pbr for packaging and has low installation friction. However, the package has been abandoned since October 2022 with no active maintenance, meaning bug fixes or updates for newer bash versions are unlikely.
Use it for:
- Enforce consistent bash indentation and whitespace in CI/CD pipelines for infrastructure-as-code projects.
- Catch deprecated bash syntax patterns (e.g., $[ arithmetic) before code review in shell-heavy DevOps teams.
- Lint deployment scripts and system administration tools for basic style compliance without external dependencies.
- Integrate into pre-commit hooks to flag trailing whitespace and structural issues in shell scripts automatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
bashate is a style checker for bash scripts that applies pep8-like automated linting rules to identify whitespace errors, structural issues, and unsafe syntax patterns in shell code.
No—unless you are maintaining legacy OpenStack infrastructure or a codebase already using bashate. The package is abandoned (last release 2022-10-06) with no active maintenance. For new projects, consider actively maintained alternatives. If you inherit a bashate-based workflow, the low install friction and permissive license make it safe to keep, but do not adopt it for new linting setups.
Install
bashate on PyPI
pip
pip install bashateuv
uv add bashatepoetry
poetry add bashateInstalling bashate
Before you install
Low install friction with a single runtime dependency (pbr). However, the package is abandoned—last release was 2022-10-06, over 1408 days ago. No active maintenance or security updates should be expected.
License in practice
Licensed under Apache License (permissive). No licensing restrictions on use or modification in most contexts.
Quickstart
pip install bashate
bashate script.sh
Requires Python >=3.5; designed for POSIX/Linux environments.
Verify before relying
- Whether the E-code checks (E001–E044) remain accurate for modern bash versions and syntax.
- Current compatibility with Python versions beyond 3.9, given the package's abandoned status.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pbr |
| Maintenance | abandoned — 1,408 days since the last release |
| First released | |
| Downloads | 80,810/month — #14,268 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bashate-2.1.1-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
pycodestylepycodestyle checks Python code against PEP 8…
permissive · top 1,000 on PyPI
autopep8autopep8 automatically reformats Python code to…
permissive · top 5,000 on PyPI
pep8Checks Python code against PEP 8 style…
permissive · top 5,000 on PyPI
yapfYAPF automatically reformats Python code to…
permissive · top 5,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
doc8doc8 is a style checker for reStructuredText…
permissive · top 5,000 on PyPI
pytest-pep8A pytest plugin that integrates PEP8 style…
permissive · top 15,000 on PyPI
yamllintyamllint checks YAML files for syntax errors,…
copyleft · top 1,000 on PyPI
pytest-flake8A pytest plugin that runs flake8 PEP8…
permissive · top 15,000 on PyPI
tclinttclint is a CLI linter, formatter, and language…
permissive · top 15,000 on PyPI