Skip to content

Products / Developer tools

Standby

Standby is a Rust command-line tool for sleep, timeout and wait operations. It is POSIX compliant with GNU coreutils compatibility, runs on Unix, macOS and Windows, and restores the terminal state after killing TUI applications.

GitHub Talk to usRustCLIPOSIXOpen source
Install
cargo install standby
3
Core commands: sleep, timeout, wait

Features

Built for production

01

Universal time parser

Accepts 5, 5.5, 1s, 1m, 1h, 1d, compound values such as 1h30m45s, and infinity.

02

Cross-platform

Unix/Linux, macOS and Windows, with native signal handling.

03

Terminal restoration

Automatically restores terminal state after killing TUI apps such as vim.

04

Signal escalation

Send SIGTERM, then SIGKILL after a delay, for proper process management.

05

GNU compatible

GNU coreutils compatibility with extensions.

In code

See it work

sleep
standby sleep 5
standby sleep 1m30s
standby sleep infinity
timeout
standby timeout 10 sleep 60
standby timeout -s KILL 10 cmd
standby timeout -k 2s 10 cmd
wait
standby wait 1234
standby wait 1234 5678
standby wait --timeout 30s 1234

Terminal handling

Never run `reset` after a timeout again.

- Automatically restores terminal attributes (echo, canonical mode) - Restores cursor visibility after killing TUI apps (vim, less, top) - Handles SIGTTIN and SIGTTOU for background process terminal access - Uses the safe process_group() API instead of unsafe pre_exec

Commands

- `sleep`: suspend execution for a specified duration - `timeout`: run commands with time limits and signal escalation - `wait`: wait for processes to complete, with an optional timeout

Putting Standby to work?

We help teams design, build and operate production systems on this stack.