CewlAI is a domain generation tool that uses Google's Gemini AI to create potential domain variations based on seed domains. It's inspired by dnscewl which was inspired by CeWL, but this tool focuses on domain name pattern recognition and generation.
- Generate domain variations using AI pattern recognition
- Support for single domain or list of domains as input
- Control token usage and iteration count
- Output results to file or console
- Duplicate prevention
- Domain count limiting
- Verbose mode for debugging
- Python 3.x
- Google API key for Gemini AI
-
Clone the repository:
git clone https://github.com/jthack/cewlai.git
cd cewlai
-
Install required packages:
pip install -r requirements.txt
-
Set up your Google API key:
export GEMINI_API_KEY='your-api-key-here'
-
Set up OpenAI API key
export OPENAI_API_KEY='your-api-key-here'
-
(Optional) Set up White Rabbit Neo API key:
- Get your API key from Kindo AI
export KINDO_API_KEY='your-api-key-here'
- Get your API key from Kindo AI
The tool supports multiple ways to provide seed domains:
-
Single domain via command line:
python main.py -t example.com
-
List of domains from a file:
python main.py -tL domains.txt
-
Domains from stdin (pipe or redirect):
cat domains.txt | python main.py # or echo "example.com" | python main.py
Note: When using stdin, the token usage confirmation is automatically skipped.
The tool automatically manages token usage to stay within API limits:
- Input is automatically truncated if it exceeds 100,000 tokens
- Use
-v
flag to see when truncation occurs - Token usage estimates are shown before processing begins
- Use
--force
to skip the token usage confirmation prompt
Example output with truncation:
$ cat large_domain_list.txt | python main.py -v
[!] Input truncated to 15423 domains to stay under token limit
Estimated token usage:
* Per iteration: ~98750 tokens
* Total for 1 loops: ~98750 tokens
Continue? [y/N]
Basic usage: python main.py -t example.com
Using a list of domains: python main.py -tL domains.txt
Common options: python main.py -tL domains.txt --loop 3 --limit 1000 -o output.txt
-t, --target: Specify a single seed domain
-tL, --target-list: Input file containing seed domains (one per line)
--loop: Number of AI generation iterations (default: 1)
--limit: Maximum number of domains to generate (0 = unlimited)
-o, --output: Write results to specified file
-v, --verbose: Enable verbose output
--no-repeats: Prevent duplicate domains across iterations
--force: Skip token usage confirmation
--openai: Use OpenAI API instead of Gemini
-m, --model: Specify model to use (gemini, openai, whiterabbitneo, ollama)
The default model uses Google's Gemini AI. Requires GEMINI_API_KEY
to be set.
Use OpenAI's models by specifying -m openai
. Requires OPENAI_API_KEY
to be set.
Use White Rabbit Neo by specifying -m whiterabbitneo
. This model is powered by Kindo AI's WhiteRabbitNeo-33B-DeepSeekCoder model. Requires KINDO_API_KEY
to be set.
Example usage:
export KINDO_API_KEY='your-api-key-here'
python main.py -m whiterabbitneo -t example.com
Use local Ollama models by specifying -m ollama
. Requires Ollama to be installed with at least one model.
Main use case (unix-way):
cat domains.txt | python main.py
Generate domains based on a single target:
python main.py -t example.com -o results.txt
Generate domains from a list with multiple iterations:
python main.py -tL company_domains.txt --loop 3 --limit 1000 -o generated_domains.txt
Verbose output with no repeats:
python main.py -t example.com -v --no-repeats
Using White Rabbit Neo with verbose output:
python main.py -m whiterabbitneo -t example.com -v
The tool will generate new domains based on patterns it recognizes in your seed domains. Output can be directed to:
- Console (default)
- File (using -o option)
Only newly generated domains are shown in the output (seed domains are excluded).
When using -tL, your input file should contain one domain per line: example.com subdomain.example.com another-example.com
The output is a simple list of generated domains, one per line: api.example.com dev.example.com staging.example.com test.example.com
Using -v provides detailed information about the generation process:
[+] LLM Generation Loop 1/3...
[DEBUG] LLM suggested 50 new domain(s). 45 were added (others were duplicates?)
[DEBUG] Original domains: 10
[DEBUG] New domains generated: 45
[DEBUG] Total domains processed: 55
- Seed Collection: The tool takes your input domains as seeds
- AI Analysis: The selected model (Gemini, OpenAI, White Rabbit Neo, or Ollama) analyzes patterns in the seed domains
- Generation: New domains are generated based on recognized patterns
- Filtering: Results are filtered to remove duplicates and invalid formats
- Output: Unique, new domains are presented in the specified format
Remember that this tool is meant for legitimate security testing and research purposes only.