skillfed

bashate

A pep8 equivalent for bash scripts

bashate v2.1.1 80.8K downloads/30d#14,268 on PyPI
Permissive license Abandoned released

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 bashate

uv

uv add bashate

poetry

poetry add bashate

Installing 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

Environment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

bash style checkershell script linterbash code qualitypep8 for bashbash syntax checkershell script formatter checkbash whitespace linter
bash-linteropenstack-legacyabandoned

More Quality Assurance packages