What Is psleep?
psleep is a tiny Rust CLI utility maintained by Yesh-02 that behaves like sleep but shows a live progress bar, and psleep is one of the best CLI tools for terminal-first developers. It supports human-friendly durations like 1m30s, emits native OSC 9;4 progress in capable terminals, and ships pre-built binaries for five platform/architecture combinations, which makes it practical for laptops, CI shells, and ops workstations alike.
Quick Overview
| Attribute | Details |
|---|---|
| Type | CLI Tools |
| Best For | terminal-first developers and DevOps engineers |
| Language/Stack | Rust, ANSI terminal control, OSC 9;4 native progress, indicatif fallback |
| License | Apache-2.0 |
| GitHub Stars | N/A as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | N/A |
Who Should Use psleep?
- Shell-heavy developers who want the behavior of
sleepwithout losing terminal context during long waits. - DevOps and SRE teams running deploy scripts, maintenance jobs, or pause gates where visible progress reduces operator uncertainty.
- Indie hackers who build small automation scripts and want one static binary instead of a full runtime dependency.
- Terminal power users on Windows Terminal, iTerm2, WezTerm, Kitty, Ghostty, or VS Code terminal who can benefit from native progress reporting.
Not ideal for:
- Batch jobs that must be completely silent, because psleep is designed to render progress unless you explicitly disable it.
- Workflows that need sub-millisecond timing guarantees, since the project TODO explicitly calls out higher-resolution timing as unfinished.
- Environments that only accept strict POSIX coreutils behavior, because psleep adds parsing, styling, and progress semantics that differ from plain
sleep.
Key Features of psleep
- Native OSC 9;4 progress — psleep writes progress into the terminal tab bar, taskbar, or title when the emulator supports it. That means the UI stays clean in the pane while the user still gets a visible countdown signal.
- Human-friendly duration parsing — inputs like
10,0.5,1m30s,2h5m, and1h2m3sare accepted directly. This is better than forcing manual second math in shell scripts. - Multiple rendering styles — the
--styleflag supportsbar,blocks,dots,emoji,classic, andspinner, which gives you a predictable inline fallback when OSC 9;4 is unavailable or disabled. - Environment-variable configuration —
PSLEEP_STYLE,PSLEEP_TICK_MS,PSLEEP_TEMPLATE, andPSLEEP_NO_OSClet you set defaults once and keep scripts shorter. Flags still override env vars, which is the right precedence model for automation. - Script-friendly cleanup — psleep clears the progress bar on completion, so it does not pollute pipelines or subsequent command output. That matters in deploy scripts where leftover control codes are operational noise.
- Fast Rust distribution model — the project publishes to crates.io and GitHub Releases, so you can install it with
cargo install psleep, Homebrew, or a downloaded binary without adding a language runtime. - Cross-platform binary support — the page lists Linux, macOS, and Windows builds, including x86_64 and aarch64 coverage where available. That reduces friction for mixed workstation fleets and CI runners.
psleep vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| psleep | Terminal-visible sleeps with progress | Native OSC 9;4 plus inline bar fallback in one binary | Open-Source |
| GNU sleep | POSIX-compatible delays | Zero extra behavior, minimal coreutils semantics | Free |
| timeout | Enforcing max runtime on a command | Wraps processes instead of only delaying execution | Free |
| pv | Visualizing stream throughput | Progress for pipes and byte streams, not time-based waiting | Open-Source |
Pick GNU sleep when you need the exact baseline behavior that exists on every Unix-like system and you do not want any output. Pick timeout when the real requirement is bounding runtime or killing hung jobs, not showing a countdown.
Pick pv when you care about byte throughput or pipe progress. If you want another small shell utility that pairs naturally with psleep in terminal workflows, Ghist is useful for command-history retrieval, and for a broader scan of adjacent utilities you can browse all CLI Tools.
How psleep Works
psleep is built around a simple runtime model: parse a duration, choose a rendering path, tick at a fixed interval, and clear the output when the timer ends. The main design choice is the split between native terminal progress and in-terminal rendering. When the terminal advertises OSC 9;4 support, psleep sends progress updates out-of-band; otherwise it falls back to an indicatif-style bar in the pane.
The config surface is intentionally small. Command-line flags override environment variables, and environment variables override built-in defaults, which is the correct order for shell automation. That means a team can standardize PSLEEP_TICK_MS=50 or PSLEEP_STYLE=blocks in dotfiles while still letting ad-hoc invocations override behavior for a single deploy or maintenance window.
# getting started example
cargo install psleep
psleep 1m30s --style blocks
psleep 10 --no-osc
The first command installs the Rust binary from crates.io. The second command runs a human-friendly delay with inline blocks, and the third forces the non-native path even on OSC-capable terminals. In practice, you should expect a visible progress indicator during the wait and a clean terminal once the command exits.
Pros and Cons of psleep
Pros:
- Single static binary workflow — no Node, Python, or shell framework dependency is required to use it.
- Native progress integration — OSC 9;4 support means progress can appear in the terminal UI instead of consuming pane space.
- Friendly duration grammar — compound units and decimal seconds reduce operator error in scripts.
- Multiple installation paths — Homebrew, crates.io, GitHub Releases, and source install options cover most developer machines.
- Script hygiene — the bar clears on completion, which keeps pipelines and deploy logs readable.
- Good default precedence — flags beat environment variables, so automation stays explicit.
Cons:
- Not a strict drop-in for every
sleepuse case — the extra features change the surface area compared with the POSIX baseline. - Sub-millisecond timing is not finished — the project TODO still lists higher-resolution timers as work in progress.
- No quiet mode yet — the TODO list includes
--quiet, so silent parity withsleepstill needs an explicit feature. - No config file or shell completions yet — persistent defaults and completion generation are planned, not shipped in the scraped page.
- Fallback rendering depends on terminal width and font support — emoji and block styles can look inconsistent across terminals.
Getting Started with psleep
# macOS with Homebrew
brew install Yesh-02/tap/psleep
# Cross-platform via Rust tooling
cargo install psleep
# First run
psleep 10
psleep 1m30s
psleep 30 --style spinner
The install path you pick depends on whether you want package-manager convenience or a source-of-truth from crates.io. After the first run, psleep will auto-detect whether your terminal supports OSC 9;4 and either show native progress or render an inline bar.
If you want consistent behavior across sessions, export PSLEEP_STYLE, PSLEEP_TICK_MS, or PSLEEP_NO_OSC before you call it from scripts. The tool does not require initial configuration, but those variables are useful when you want a team-wide default in shell startup files or CI environments.
Verdict
psleep is the strongest option for terminal-visible sleeps when you want progress feedback without changing your scripting model. Its biggest strength is native OSC 9;4 support with a clean fallback path, and its main caveat is that it is still missing quiet mode and some advanced timing features. If you want a small Rust binary that makes waits observable, psleep is worth standardizing on.



