Shallot allows you to create customised .onion addresses for Tor’s hidden services. (By customised, it is meant that part of the address can be selected. Choosing an entire address would take far longer than the universe is believed to have been in existence.) - Github

Make sure you have Homebrew installed and start by installing the Homebrew OpenSSL package:

$ brew install openssl

Set the correct path to the OpenSSL header files and libraries:

$ export CFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"

Configure and make the Shallot binary:

$ ./configure && make
$ ./shallot
Usage: shallot [-dmopv] [-f <file>] [-t count] [-x time] [-e limit] pattern
$ ./shallot ^sizeofcat

Read the Shallot and Tor documentation .