`port-for` is a command-line utility and a python library that helps with local TCP ports managment. `port-for <foo>` script finds an unused port and associates it with `<foo>`. Subsequent calls will return the same port number.