Standby
Cross-platform time management for sleep, timeout, and wait operations. Full POSIX compliance and GNU coreutils compatibility with world-class terminal handling.
Production-Ready Features
Universal Time Parser
Flexible parsing: 5, 5.5, 1s, 1m, 1h, 1d, 1h30m45s, infinity.
Cross-Platform
Unix/Linux, macOS, and Windows with native signal handling.
Terminal Restoration
Auto-restores terminal state after killing TUI apps like vim.
Signal Escalation
Send SIGTERM, then SIGKILL after delay. Proper process management.
Native Performance
Rust compiled binary with minimal overhead.
GNU Compatible
Full GNU coreutils compatibility with extensions.
Three Core Commands
sleep
Suspend execution for a specified duration.
standby sleep 55 seconds
standby sleep 1m30s1 minute 30 seconds
standby sleep infinitySleep forever
timeout
Run commands with time limits and signal escalation.
standby timeout 10 sleep 6010s timeout
standby timeout -s KILL 10 cmdSend SIGKILL
standby timeout -k 2s 10 cmdEscalate after 2s
wait
Wait for processes to complete with optional timeout.
standby wait 1234Wait for PID
standby wait 1234 5678Multiple PIDs
standby wait --timeout 30s 1234With timeout
Flexible Time Formats
5Integer seconds5.5Floating-point seconds1sUnit suffix (seconds)1mMinutes1hHours1dDays1h30m45sCompound formatinfinityForeverWorld-Class Terminal Handling
Never run reset after timeout again.
- Automatically restores terminal attributes (echo, canonical mode)
- Restores cursor visibility after killing TUI apps (vim, less, top)
- Handles SIGTTIN/SIGTTOU for background process terminal access
- Uses safe process_group() API instead of unsafe pre_exec
- No need for reset or tput cnorm after timeout
Installation
$ cargo install standby