npm installcp .env.example .envEdit .env with your EPP server details:
EPP_HOST=epp.your-registry.com
EPP_PORT=700
EPP_USERNAME=your-username
EPP_PASSWORD=your-passwordchmod +x src/cli/index.js./src/cli/index.js check-domain example.com
# Or use the epp-cli command after npm link
npm link
epp-cli check-domain example.comepp-cli check-domain example.comepp-cli info-domain example.comepp-cli create-contact CONTACT-001 \
--name "John Doe" \
--email john@example.com \
--city "New York" \
--state NY \
--postcode 10001 \
--country US \
--phone "+1.2125551234"epp-cli create-domain newdomain.com \
--registrant CONTACT-001 \
--ns ns1.example.com,ns2.example.com \
--period 1epp-cli update-nameservers example.com \
--ns ns1.new.com,ns2.new.com# Add clientHold status
epp-cli update-domain example.com --add-status clientHold
# Remove clientHold status
epp-cli update-domain example.com --remove-status clientHold# Enable auto-renew
epp-cli update-auto-renew example.com --enable
# Disable auto-renew
epp-cli update-auto-renew example.com --disableepp-cli check-domain example.comOutput:
[12:34:56] [INFO] Connecting to EPP server...
[12:34:56] [SUCCESS] Logged in successfully
[12:34:57] [INFO] Checking domain: example.com
[12:34:57] [SUCCESS] Command completed successfully
[12:34:57] [INFO] Result: {
"domain": "example.com",
"available": false,
"status": "registered"
}
epp-cli --json check-domain example.comOutput:
{
"domain": "example.com",
"available": false,
"status": "registered",
"reason": null
}epp-cli --verbose check-domain example.comShows:
- Connection details
- XML sent/received
- Detailed timing
- Full response data
epp-cli --quiet check-domain example.comOnly shows errors.
#!/bin/bash
for domain in $(cat domains.txt); do
result=$(epp-cli --json check-domain "$domain")
available=$(echo "$result" | jq -r '.available')
echo "$domain: $available"
done#!/bin/bash
CONTACT="CONTACT-001"
while IFS= read -r domain; do
echo "Registering: $domain"
epp-cli create-domain "$domain" \
--registrant "$CONTACT" \
--ns ns1.example.com,ns2.example.com
done < domains.txt#!/bin/bash
NEW_NS="ns1.new.com,ns2.new.com"
while IFS= read -r domain; do
echo "Updating: $domain"
epp-cli update-nameservers "$domain" --ns "$NEW_NS"
done < domains.txtif epp-cli check-domain example.com; then
echo "Command succeeded"
else
echo "Command failed with code: $?"
firesult=$(epp-cli --json check-domain example.com 2>&1)
if [ $? -eq 0 ]; then
echo "Success: $result"
else
echo "Error: $result"
fiepp-cli --config production.env check-domain example.comepp-cli \
--host epp.test.com \
--username test-user \
--password test-pass \
check-domain example.com# 60 second timeout
epp-cli --timeout 60000 create-domain example.com ...# Test with verbose output
epp-cli --verbose check-domain example.com
# Check server accessibility
telnet epp.your-registry.com 700- Verify EPP_USERNAME and EPP_PASSWORD in .env
- Ensure account has proper permissions
- Check if IP address is whitelisted
# Increase timeout to 2 minutes
epp-cli --timeout 120000 your-commandDEBUG=1 epp-cli --verbose check-domain example.comepp-cli --helpepp-cli --versionAdd to ~/.bashrc or ~/.zshrc:
alias epp='epp-cli'Then use:
epp check-domain example.com# Get just the availability status
epp-cli --json check-domain example.com | jq -r '.available'
# Pretty print JSON
epp-cli --json info-domain example.com | jq .check-available() {
epp-cli --json check-domain "$1" | jq -r '.available'
}
# Usage
check-available example.com- Read the full README.md for comprehensive documentation
- Check CONTRIBUTING.md to add custom commands
- Run examples.sh to see more usage examples
- Explore the EPP protocol documentation for your registry
- GitHub Issues: Report bugs or request features
- Documentation: Check README.md for detailed info
- Examples: Run examples.sh for working examples