A Python CLI tool for monitoring domain availability and sending Slack alerts when domains become available. Perfect for tracking expired or dropping domains that you want to register.
- π Automated Domain Monitoring: Hourly checks via GitHub Actions
- π± Slack Notifications: Instant alerts when domains become available
- β‘ Fast CLI Interface: Check individual domains or batch process from file
- π‘οΈ Robust Error Handling: Graceful failure handling with notification alerts
- π§ Easy Configuration: Simple environment variable setup
- π WhoisXML API Integration: Reliable domain availability checking
# Clone the repository
git clone https://github.com/darylkang/domain-tracker.git
cd domain-tracker
# Install dependencies (using hatch)
make install
# OR install with pip in a virtual environment
pip install -e .# Copy environment template
cp .env.example .env
# Edit .env with your actual keys
WHOIS_API_KEY=your_whoisxml_api_key_here
SLACK_WEBHOOK_URL=your_slack_webhook_url_hereEdit domains.txt and add domains you want to monitor (one per line):
spectre.cx
example-domain.com
another-domain.org
# Check a single domain
vibe check example.com
# Check all domains from domains.txt
vibe check-domains
# Check with debug logging
vibe check-domains --debug# Check availability of a specific domain
vibe check example.com
vibe check spectre.cx# Check all domains from domains.txt
vibe check-domains
# Check with notifications for all domains (not just available ones)
vibe check-domains --notify-all
# Enable debug logging
vibe check-domains --debug# Show help
vibe --help
vibe check --help
vibe check-domains --help
# Show version
vibe --versionCreate a .env file in the project root with the following variables:
# WhoisXML API Key (Required)
# Get your free API key at: https://whoisxml.whoisapi.com/
WHOIS_API_KEY=at_1234567890abcdef...
# Slack Webhook URL (Required)
# Create a webhook at: https://api.slack.com/messaging/webhooks
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX# Check interval for automated runs (default: 1 hour)
CHECK_INTERVAL_HOURS=1
# Custom path to domains file (default: domains.txt)
DOMAINS_FILE_PATH=custom-domains.txt- Go to Slack API: Incoming Webhooks
- Click "Create your Slack app"
- Choose "From scratch"
- Name your app (e.g., "Domain Tracker") and select your workspace
- Go to "Incoming Webhooks" and activate it
- Click "Add New Webhook to Workspace"
- Choose the channel for notifications
- Copy the webhook URL to your
.envfile
# This should send a test message to your Slack channel
vibe check example.com- Available Domain: "β Domain available: example.com"
- Unavailable Domain: "β Domain NOT available: example.com" (only with
--notify-all) - Error Alert: "π¨ Domain Tracker Error: [error details]" (when automation fails)
- Visit WhoisXML API
- Sign up for a free account
- Go to your dashboard and find your API key
- Add it to your
.envfile asWHOIS_API_KEY
- Free Tier: 500 requests/month
- Paid Plans: Higher limits available
- The tool handles rate limiting and errors gracefully
The project includes a GitHub Actions workflow that automatically checks your domains every hour.
-
Fork/Clone the Repository
-
Configure GitHub Secrets:
- Go to your repo β Settings β Secrets and variables β Actions
- Add these secrets:
WHOIS_API_KEY: Your WhoisXML API keySLACK_WEBHOOK_URL: Your Slack webhook URL
-
Enable GitHub Actions:
- The workflow file is already included:
.github/workflows/check-domains.yml - It runs automatically every hour at minute 0
- You can also trigger it manually from the Actions tab
- The workflow file is already included:
# Go to your repo β Actions β "Automated Domain Availability Checker" β "Run workflow"- Automated Runs: Every hour using cron schedule
- Error Handling: Failures are reported to Slack
- Environment Setup: Python 3.13 with all dependencies
- Timeout Protection: 10-minute safety timeout
For detailed setup instructions, see GITHUB_ACTIONS_SETUP.md.
domain-tracker/
βββ .github/
β βββ workflows/
β βββ check-domains.yml # Automated domain checking
β βββ python-ci.yml # CI/CD pipeline
βββ src/
β βββ domain_tracker/
β βββ __init__.py # Package initialization
β βββ cli.py # Command-line interface
β βββ core.py # Core business logic
β βββ domain_management.py # Domain file handling
β βββ settings.py # Configuration management
β βββ slack_notifier.py # Slack integration
β βββ whois_client.py # WhoisXML API client
βββ tests/ # Comprehensive test suite
βββ domains.txt # Domains to monitor
βββ .env.example # Environment template
βββ pyproject.toml # Project configuration
βββ Makefile # Development commands
βββ README.md # This file
# Run all tests
make test
# Run tests with coverage
make test-cov
# Run specific test
pytest tests/test_cli.py -v
# TDD watch mode
pytest --looponfail# Lint code
make lint
# Format code
make format
# Type checking
make type-check
# Run all quality checks
make lint format type-check test# Install development dependencies
make install
# Install pre-commit hooks
pre-commit install
# Clean up build artifacts
make clean- API Keys: Never commit API keys to version control
- Webhook URLs: Keep Slack webhook URLs secure
- Rate Limiting: The tool respects API rate limits
- Error Handling: Sensitive data is not logged in error messages
1. "Invalid API Key" Error
# Check your .env file has the correct API key
cat .env | grep WHOIS_API_KEY2. Slack Notifications Not Working
# Test your webhook URL
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"Test message"}' \
$SLACK_WEBHOOK_URL3. GitHub Actions Failing
- Check that GitHub Secrets are configured correctly
- Review the Actions log for specific error messages
- Ensure domains.txt is not empty
# Enable detailed logging
vibe check-domains --debug# Test individual components
python -c "from domain_tracker.settings import Settings; print(Settings())"
python -c "from domain_tracker.domain_management import load_domains; print(load_domains())"
python -c "from domain_tracker.whois_client import check_domain_availability; print(check_domain_availability('google.com'))"- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Write tests first (TDD approach)
- Implement your changes
- Run tests:
make test - Submit a pull request
This project follows Test-Driven Development (TDD):
- Write failing tests first
- Implement minimal code to pass
- Refactor and improve
- All tests must pass before merging
This project is licensed under the MIT License - see the LICENSE file for details.
- Run locally with cron job
- Use GitHub Actions (recommended)
- Deploy to cloud server with scheduled tasks
- Use container deployment (Docker)
- Integrate with existing monitoring systems
- Issues: GitHub Issues
- Documentation: This README and inline code documentation
- API Documentation: WhoisXML API Docs
Happy Domain Hunting! π―
Made with β€οΈ for domain enthusiasts and developers who want to automate their domain monitoring workflow. Test.