A powerful, user-friendly command-line interface for managing domains and DNS records through the Porkbun API.
- π Domain Management - List, register, check availability, manage nameservers
- π DNS Records - Full CRUD operations for all DNS record types (A, AAAA, CNAME, MX, TXT, SRV, etc.)
- π URL Forwarding - Configure HTTP redirects (301/302) with wildcard support
- π SSL Certificates - Retrieve and save SSL certificate bundles
- π‘οΈ DNSSEC - Manage DNSSEC records for enhanced security
- π Glue Records - Create and manage nameserver glue records
- π° Pricing - View current pricing for all TLDs
- π¨ Beautiful Output - Rich terminal formatting with tables, colors, and panels
- π Secure Configuration - API credentials stored with restricted file permissions
- β‘ Type Safe - Full type hints and validation with Pydantic
- π Easy to Use - Intuitive command structure with helpful error messages
git clone https://github.com/yourusername/porkbun-cli.git
cd porkbun-cli
# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install
pip install -e .pip install porkbun-cli- Log in to Porkbun
- Go to API Access
- Enable API access and copy your credentials
porkbun config set
# Or: python3 -m porkbun_cli.cli config setEnter your API key and secret when prompted. Your credentials will be securely stored in ~/.porkbun/config.json.
porkbun pingYou should see: β API connection successful!
# List your domains
porkbun domain list
# Check domain availability
porkbun domain check awesome-domain.com
# List DNS records
porkbun dns list example.com
# Create a DNS record
porkbun dns create example.com --type A --name www --content 192.0.2.1 --ttl 600
# View pricing
porkbun pricing --search dev# List all domains
porkbun domain list
# Check if domain is available
porkbun domain check example.com
# Register a domain (899 pennies = $8.99)
porkbun domain create example.com --cost 899
# Get nameservers
porkbun domain get-ns example.com
# Update nameservers
porkbun domain update-ns example.com ns1.example.com ns2.example.com
# Enable auto-renewal
porkbun domain auto-renew example.com --enable# List all DNS records
porkbun dns list example.com
# Create A record
porkbun dns create example.com \
--type A \
--name www \
--content 192.0.2.1 \
--ttl 600
# Create MX record
porkbun dns create example.com \
--type MX \
--content mail.example.com \
--priority 10
# Edit record
porkbun dns edit example.com RECORD_ID \
--type A \
--content 192.0.2.2
# Delete record
porkbun dns delete example.com RECORD_ID --yes
# List records by type
porkbun dns list-by-type example.com A www# List forwards
porkbun forward list example.com
# Add permanent redirect (301)
porkbun forward add example.com \
--subdomain www \
--location https://example.com \
--type permanent
# Add with wildcard
porkbun forward add example.com \
--location https://example.com \
--type permanent \
--wildcard
# Delete forward
porkbun forward delete example.com FORWARD_ID# View certificate
porkbun ssl get example.com
# Save to files
porkbun ssl get example.com --save --output ./certs/See full documentation:
- Quick Start Guide - Get started in 5 minutes
- Examples - Comprehensive usage examples and workflows
- Contributing - Development guide
porkbun
βββ ping # Test API connectivity
βββ pricing # View TLD pricing
βββ config # Manage configuration
β βββ set # Set credentials
β βββ show # Show config (masked)
β βββ path # Show config file path
βββ domain # Domain management
β βββ list # List domains
β βββ check # Check availability
β βββ create # Register domain
β βββ get-ns # Get nameservers
β βββ update-ns # Update nameservers
β βββ auto-renew # Manage auto-renewal
βββ dns # DNS records
β βββ list # List all records
β βββ get # Get specific record
β βββ create # Create record
β βββ edit # Edit record
β βββ delete # Delete record
β βββ list-by-type # Filter by type
β βββ delete-by-type
βββ forward # URL forwarding
β βββ list
β βββ add
β βββ delete
βββ ssl # SSL certificates
β βββ get
βββ glue # Glue records
β βββ list
β βββ create
β βββ update
β βββ delete
βββ dnssec # DNSSEC
βββ list
βββ create
βββ delete
Configuration is stored in ~/.porkbun/config.json with restricted permissions (0600).
# Set credentials interactively
porkbun config set
# Set credentials directly
porkbun config set --apikey pk_xxx --secret sk_xxx
# View configuration (credentials masked)
porkbun config show
# Show config file path
porkbun config path# Clone repository
git clone https://github.com/yourusername/porkbun-cli.git
cd porkbun-cli
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install in development mode
pip install -e .
# Install dev dependencies
pip install -r requirements-dev.txt# Run tests
pytest
# With coverage
pytest --cov=porkbun_cli
# Type checking
mypy porkbun_cli/
# Linting
flake8 porkbun_cli/
# Format code
black porkbun_cli/- Quick Start Guide - Get up and running in 5 minutes
- Examples - Real-world usage examples and workflows
- Contributing Guide - How to contribute to the project
- Project Summary - Technical architecture overview
- API Documentation - Official Porkbun API docs
Contributions are welcome! Please see CONTRIBUTING.md for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Typer and Rich
- Inspired by the excellent UX of Claude Code
- Powered by the Porkbun API
- π Report bugs via GitHub Issues
- π‘ Request features via GitHub Issues
- π Read the documentation
- π Visit Porkbun Support
If you find this project useful, please consider giving it a star on GitHub!
Made with β€οΈ for the domain management community