--- id: beautysh version: "6.4.3" license: MIT license_treatment: permissive maintenance: active --- # beautysh — A Bash beautifier for the masses. License: permissive · Maintenance: active · Downloads: 152.4K/mo ## What it is and what it does Beautysh is a command-line tool and Python library that reformats Bash shell scripts to a consistent style. It parses Bash syntax—including ambiguous constructs like keywords used as variable names—and applies indentation, function formatting, and variable style transformations. The tool runs as a standalone CLI that beautifies files in place or checks them without modification, and can also be imported as a Python module for programmatic use. The package handles real-world Bash complexity: here-docs are preserved unchanged to respect original formatting intent, special comments like `@formatter:off` allow selective disabling of formatting, and configuration can come from command-line flags, pyproject.toml, or .editorconfig files. It depends on colorama for colored output, editorconfig for configuration file support, and tomli for TOML parsing. Use it for: - Enforce consistent indentation and style across a large codebase of shell scripts in CI/CD pipelines. - Reformat inherited or legacy Bash scripts to match a team's coding standards before maintenance work. - Integrate into pre-commit hooks or editor plugins to auto-beautify shell scripts on save. - Batch-process shell scripts in a repository or system directory to standardize formatting. - Programmatically format Bash code within a Python application or build tool. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Beautysh automatically formats and beautifies Bash shell scripts with configurable indentation, function styles, and variable formatting, handling complex Bash syntax including here-docs and special cases. Yes. Beautysh is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real problem—Bash formatting is genuinely difficult due to the language's ambiguous syntax. Use it if you need to standardize shell script formatting across a team or codebase. The ~99% error-free rate on large system scripts suggests it handles real-world cases well, though edge cases may exist. ## Install pip install beautysh uv add beautysh poetry add beautysh ## Installing beautysh Before you install: Low friction: pure Python wheel with only three lightweight runtime dependencies (colorama, editorconfig, tomli). Active maintenance with recent commits and no known vulnerabilities. License in practice: MIT license is permissive; you can use, modify, and distribute beautysh freely in commercial and private projects with minimal restrictions. Quickstart: pip install beautysh beautysh file1.sh file2.sh # Or as a module: from beautysh import BashFormatter formatter = BashFormatter(indent_size=4) result, error = formatter.beautify_string("echo hello") Requires Python 3.9 or later. Verify before relying: - Whether the ~99% error-free rate mentioned in the description applies to current version 6.4.3 or is historical. - Performance characteristics when processing very large Bash scripts or batch operations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 152.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bash script formatter, shell script beautifier, bash code formatter, shell indentation tool, bash linter beautify, shell script cleanup, bash style formatter, bash-formatting, code-quality, shell-scripting [View on SkillFed](https://skillfed.io/packages/beautysh) · [View on PyPI](https://pypi.org/project/beautysh/)