retry
« Back to VersTracker
Description:
Repeat a command until the command succeeds
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: cli automation reliability devops shell
Install: brew install retry
About:
Retry is a command-line utility designed to automatically re-execute a given command until it completes successfully. It provides a robust solution for handling transient failures in network operations, API calls, or any flaky commands. This tool simplifies automation scripts by removing the need for complex custom loops or error handling logic.
Key Features:
  • Configurable number of attempts and delay between retries
  • Exponential backoff support to reduce load on failing services
  • Simple, POSIX-compliant shell syntax integration
  • Passes standard input and arguments directly to the executed command
Use Cases:
  • Automating network requests that may fail intermittently (e.g., curl, wget)
  • Ensuring database connections are established during container startup
  • Handling race conditions in distributed systems during deployment
  • Running CI/CD pipeline steps that depend on external resources
Alternatives:
  • while loop (shell built-in) – Retry offers a more concise syntax and built-in support for delays and backoff strategies compared to manual shell loops.
  • timeout – While timeout limits execution time, Retry specifically focuses on re-invoking commands upon failure, which is a distinct use case.
Version History
Detected Version Rev Change Commit
Sep 15, 2025 1:04pm 0 VERSION_BUMP a32f6843
Dec 27, 2024 3:17pm 0 VERSION_BUMP 6bd28198
Sep 14, 2024 1:55am 0 VERSION_BUMP b251a42e