PRS Progress Bar
Animated PRS progress bars that automatically intercept terminal commands and re-render their real progress with a smooth block bar, spinners, stats and a mandatory credit footer.
Built by Shrimurali.
⠋ Installing packages... <- spinner during init phases
████████████░░░░ 78% 12.4MB / 500MB ⚡ 3.2MB/s ⏱ ETA 00:12
✓ pip completed
PRS-Progress-Bar built by 'Shrimurali'
What it does
Installing this package registers console scripts that shadow common
terminal commands wherever the Python environment's Scripts/bin
directory is on your PATH:
- Package managers & web tools:
pip,npm,yarn,pnpm,bun,cargo,composer,wget,curl - AI tools & CLI utilities:
ollama,git,docker,prisma - Testing & compilers:
pytest,gcc,g++,clang - File, archive & media:
zip,unzip,tar,ffmpeg,cp,mv,mkdir,rmdir,del,copy,move
Each wrapper:
- locates the real executable on
PATH(skipping its own shims, so there is no recursion), - captures stdout/stderr in real time (pseudo-tty on POSIX so tools emit progress, pipes on Windows),
- auto-detects progress frames -
45%,12.4MB/500MB,[====> ], braille spinners - and suppresses them, - re-renders the progress with the PRS block bar plus stats (speed, byte counts, counters, ETA),
- passes all other output through untouched,
- prints a
✓/✗status and the credits footer when the command ends.
Install
python -m pip install -e .
⚠️ Direct shadowing: because the scripts are named exactly like the real commands, any shell where the environment's
Scripts/binfolder is first onPATHwill routegit,pip,docker, ... through PRS. SetPRS_DISABLE=1to bypass interception for a single command, orprs-disable-global/ uninstall to remove everything.
Usage
prs git clone https://github.com/octocat/Hello-World.git
prs pip install requests
prs docker pull python:3.12
prs ffmpeg -i in.mp4 out.mp4
prs npm run build
prs wget https://example.com/file.zip
prs --list # list intercepted commands
You can also call the engine programmatically:
from prs_progress_bar.cli import run_intercepted_command
rc = run_intercepted_command(["pip", "install", "requests"])
The same commands also work directly (git clone ..., pip install ...)
thanks to the registered console scripts.
Enabling global shell hooks
PATH shadowing cannot cover everything:
- cmd.exe built-ins (
mkdir,rmdir,del,copy,move) always beat PATH executables; - PowerShell prefers aliases/cmdlets (
del,copy,move,cp,mv,mkdir,rmdir,wget) over external executables.
Run the hook installer to add per-shell wrappers that send those through
prs too:
prs-enable-global # auto-detect the current shell
prs-enable-global bash # or: zsh | powershell | cmd
What it installs:
| Shell | Mechanism |
|---|---|
| bash / zsh | marker-guarded functions in ~/.bashrc / ~/.zshrc |
| PowerShell | functions in $PROFILE (and removes the conflicting built-in aliases) |
| cmd | doskey macros in ~/.prs-progress-bar/prs-macros.doskey, registered in the HKCU\Software\Microsoft\Command Processor AutoRun registry value |
Remove the hooks anytime:
prs-disable-global [bash|zsh|powershell|cmd]
Hook limitations
- bash/zsh hooks apply only to shells that source the rc files.
- doskey macros apply only to interactive cmd.exe sessions, not batch files or non-interactive cmd launches.
- PowerShell functions apply to interactive and scripted PowerShell sessions that load the profile.
g++is not a valid shell function name, so it is installed as a bash alias and a PowerShellFunction:-drive entry instead (still fully intercepted).
How progress parsing works
A generic stream reader splits captured output on newlines and carriage returns, then classifies each segment:
45%,[====> ],⠙… → progress frame → suppressed, block bar rendered with any detected percent / bytes / counters / speed / ETA;- everything else → echoed through verbatim.
Tool-specific tweaks keep the data flowing:
pipruns withPIP_PROGRESS_BAR=rawso downloads emit parseable progress even without a tty;curlgets--progress-bar(unless you already passed-s/-#);gitgetsGIT_PAGER=catso pagers never hijack the capture;ffmpegnever prints a percent, so itsDuration:/time=stderr lines are used to derive one (██████████░░░░ 50%as it encodes);dockerbuild step lines like[+] Building 12.5s (5/12)drive the bar with the5/12step counter.
Fully interactive invocations (ollama run/chat/serve, docker exec,
docker attach, docker run -it, git commit without -m) are detected
and run with the real terminal attached - only the credits footer is added
on exit.
Windows notes
- There is no pseudo-tty for child processes on Windows, so tools that only
draw progress on a tty (e.g.
wget,git clone's bar) will simply pass through - you still get the spinner,✓status and credits. pipprogress is captured even without a tty (see above).cp/mv/mkdir/rmdir/del/copy/movefall back tocmd /cwhen no real binary exists inPATH.
Escape hatch
PRS_DISABLE=1 git clone https://github.com/octocat/Hello-World.git
Demo commands (legacy)
remove, download and ask are standalone simulations kept for backward
compatibility - they animate fake progress directly, without running a real
tool.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prs_progress_bar-0.2.0.tar.gz.
File metadata
- Download URL: prs_progress_bar-0.2.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a96ea65c42f0e1aea08c11c73af1317fe2fb2788db3abd3f493884de41f70a0
|
|
| MD5 |
93dc205d8dd379450b84367d73afadd7
|
|
| BLAKE2b-256 |
4446ddc530f72a297d03264cd726dfa3c1410e68750614650abceb0ffd865cb2
|
File details
Details for the file prs_progress_bar-0.2.0-py3-none-any.whl.
File metadata
- Download URL: prs_progress_bar-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f940c313f7f87d919d0a7675dfbbe0b8bb466d8ab9e2f3b13dddc3f77ae32df
|
|
| MD5 |
ee15a6305154e2f97e586a2953adc319
|
|
| BLAKE2b-256 |
ad4c3adb5d0c2e12d718193b65bd8e15180e7ace1ca5b1485706a794d571de04
|