A Node.js command-line tool that generates random domain names using customizable parameters and specified top-level domains (TLDs).
- Interactive command-line interface
- Customizable domain name length
- Option to generate domains with letters only, numbers only, or both
- Configurable number of domains to generate
- Adjustable refresh interval for continuous generation
- Optional logging to file
- Configurable TLD list via domains.txt
- Node.js installed on your system
- Clone this repository:
git clone https://github.com/theoldzoom/domainGenerator.git
cd domainGenerator- The script comes with a default
domains.txtfile containing common TLDs - You can edit
domains.txtto customize the TLD list according to your needs
Example of the domains.txt format:
com
net
org
io
- Run the script:
node index.js- Follow the interactive prompts:
- Enter desired domain length (default: 3)
- Choose character type:
- Letters only (a-z)
- Numbers only (0-9)
- Letters and numbers combined
- Specify how many domains to generate
- Set refresh interval in seconds
- Choose whether to log results to file
The script will:
- Display generated domains in the console
- Refresh the list at your specified interval
- If logging is enabled, append domains to
domains.logwith timestamps
Example output:
xyz.com
123.net
abc123.org
When logging is enabled, domains are appended to domains.log with each batch separated by a newline.
- Invalid inputs will fall back to default values
- Empty lines in
domains.txtare automatically filtered out
You can modify:
- The TLD list by editing domains.txt
- The default domain length in the source code
- The character set for domain generation
- The logging format
- Additional TLD validation rules
Feel free to submit issues and enhancement requests.
This project is licensed under the MIT License - see the LICENSE page for details.