{"library":"powerline-shell","title":"powerline-shell","description":"Powerline-shell is a Python-based utility that generates a beautiful and highly customizable prompt for various shells including Bash, ZSH, Fish, and tcsh. It enhances the command-line experience by displaying contextual information such as version control status (Git, SVN, Mercurial), the current Python virtual environment, command exit codes, and a shortened current working directory. It is configured via a JSON file to define segments and themes. The current version is 0.7.0 and it is actively maintained.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install powerline-shell"],"cli":{"name":"powerline-shell","version":"usage: powerline-shell [-h] [--generate-config] [--shell {bash,tcsh,zsh,bare}]"}},"imports":["powerline-shell is primarily configured via shell scripts and JSON files, not typically imported as a Python library for direct programmatic use. For extending it, segments are Python scripts located in powerline_shell/segments."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# 1. Install powerline-shell (if not already done)\npip install powerline-shell\n\n# 2. Install Powerline-compatible fonts (if not already done)\n# This is crucial for correct symbol rendering. Restart your terminal after installing.\ngit clone --depth=1 https://github.com/powerline/fonts.git\ncd fonts\n./install.sh\ncd ..\nrm -rf fonts\n\n# 3. Configure your shell (example for Bash - add to ~/.bashrc)\n# Find your powerline-shell.py path, e.g., using 'pip show powerline-shell' and looking at 'Location'\n# Example path: $HOME/.local/bin/powerline-shell\n\n# Ensure .local/bin is in PATH for pip-installed executables\nexport PATH=\"$PATH:$HOME/.local/bin\"\n\nfunction _update_ps1() {\n    PS1=$(powerline-shell $?)\n}\n\nif [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then\n    PROMPT_COMMAND=\"_update_ps1; $PROMPT_COMMAND\"\nfi\n\n# 4. Apply changes (or open a new terminal)\nsource ~/.bashrc\n\n# 5. (Optional) Customize by copying the default config to your home directory\n# and editing ~/.config/powerline-shell/config.json\nmkdir -p ~/.config/powerline-shell\ncp $(pip show powerline-shell | grep Location | cut -d ' ' -f 2)/powerline_shell/config.json.dist ~/.config/powerline-shell/config.json","lang":"bash","description":"This quickstart demonstrates how to install powerline-shell, set up required fonts for proper rendering, and integrate it into a Bash shell environment. It also includes steps for initial configuration file setup for customization.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"0.7.0","pypi_latest":"0.7.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"18.3M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"20.2M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.7,"import_time_s":null,"mem_mb":null,"disk_size":"21M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"12.1M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.8M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.8M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"powerline-shell","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"18M"}]}}