{"id":20995,"library":"beautysh","title":"beautysh","description":"A bash beautifier for the masses, providing automated formatting and indentation of shell scripts. Current version is 6.4.3, with regular releases to fix bugs and update dependencies.","status":"active","version":"6.4.3","language":"python","source_language":"en","source_url":"https://github.com/lovesegfault/beautysh","tags":["bash","beautifier","formatter","shell","linting"],"install":[{"cmd":"pip install beautysh","lang":"bash","label":"install via pip"}],"dependencies":[],"imports":[{"note":null,"wrong":null,"symbol":"beautysh","correct":"from beautysh import beautysh"}],"quickstart":{"code":"from beautysh import beautysh\nimport tempfile, os\n\ncode = '''if [ -z \"$1\" ]; then\n  echo \"No argument\"\nfi'''\nwith tempfile.NamedTemporaryFile(mode='w', suffix='.sh', delete=False) as f:\n    f.write(code)\n    fname = f.name\ntry:\n    result = beautysh(files=[fname])\n    print('Formatted successfully')\nfinally:\n    os.unlink(fname)","lang":"python","description":"Basic usage: format a bash script file using beautysh."},"warnings":[{"fix":"Use beautysh with --check to only verify formatting, or pass --force to overwrite.","message":"beautysh modifies files in-place by default. Ensure you have backups or use the --check flag before formatting.","severity":"gotcha","affected_versions":"all"},{"fix":"Review changed lines after formatting, especially around heredocs and case statements.","message":"beautysh may not correctly handle shell scripts with unusual syntax (e.g., heredocs with special characters, complex case patterns). Test on your codebase before integrating.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Pass one or more shell script file paths: beautysh script.sh or beautysh *.sh","cause":"No input file was provided to beautysh.","error":"beautysh: error: argument files: expected at least one argument"},{"fix":"Install beautysh with 'pip install beautysh', then ensure you're using the same Python environment.","cause":"The library is not installed or the Python environment is wrong.","error":"ModuleNotFoundError: No module named 'beautysh'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}