#cli #wait

bin+lib wait-for-them

Waits for TCP ports to be opened or for 200 status on http(s) urls

4 releases (breaking)

0.4.0 Feb 17, 2023
0.3.1 May 29, 2020
0.2.0 Mar 20, 2020
0.1.0 Mar 13, 2020

#956 in Command line utilities

Download history 20/week @ 2023-02-09 49/week @ 2023-02-16 14/week @ 2023-02-23 9/week @ 2023-03-02 7/week @ 2023-03-09 34/week @ 2023-03-16 8/week @ 2023-03-23 10/week @ 2023-03-30 21/week @ 2023-04-06 12/week @ 2023-04-13 19/week @ 2023-04-20 24/week @ 2023-04-27 42/week @ 2023-05-04 14/week @ 2023-05-11 18/week @ 2023-05-18 36/week @ 2023-05-25

116 downloads per month

GPL-3.0 license

595 lines

Security audit Code Quality Release Documentation Downloads


Waits until all provided host and port pairs are opened or return status 200 in case of http(s) url. It is written using async rust.



There are currently two way how to install the app.

You can install the binary only with a minimal subset of features.

cargo install wait-for-them --no-default-features

Or you can install it with all its features (including the nice progressbars and http(s) support).

cargo install wait-for-them


Wait forever

wait-for-them host1:port1 host2:port2 http://host3:8080/

Wait with timeout (in miliseconds)

wait-for-them -t 5000 host1:port1 host2:port2 http://host3:8080/

Note that it returns a number of unopened host:port combinations. So if it worked ok it returns standard 0.

Execute a command after all hosts have opened ports

wait-for-them host1:port1 host2:port2 http://host3:8080/ -- cmd arg1 arg2

Note that if the ports are opened it returns the status code of cmd.


The main motivation of this program was to use it within docker-compose config file (see docker-compose.yml). To support waiting for multiple hostname:port records in parallel.


~240K SLoC