-
-
Notifications
You must be signed in to change notification settings - Fork 0
Plugins
Damir Mukimov edited this page Nov 22, 2025
·
9 revisions
Extend Namecheap DNS Manager with custom functionality
Namecheap DNS Manager features a plugin system that allows you to extend functionality for specific use cases.
The Migadu plugin helps you set up DNS records for Migadu email hosting.
| Command | Description | Example |
|---|---|---|
migadu setup <domain> |
Set up all required DNS records | namecheap-dns migadu setup example.com |
migadu verify <domain> |
Verify DNS records are correct | namecheap-dns migadu verify example.com |
migadu remove <domain> |
Remove Migadu DNS records | namecheap-dns migadu remove example.com |
Complete Migadu setup example
# 1. Preview changes (dry-run)
namecheap-dns migadu setup example.com --dry-run
# Output:
# π Dry-run mode: Previewing changes...
# Would add: MX record @ -> mx.migadu.com (priority: 10)
# Would add: TXT record @ -> "v=spf1 include:spf.migadu.com ~all"
# Would add: CNAME record autoconfig -> autoconfig.migadu.com
# ...
# 2. Apply changes
namecheap-dns migadu setup example.com
# Output:
# β
Successfully set up Migadu DNS records for example.com
# β
Added MX record
# β
Added SPF record
# β
Added DKIM records
# β
Added DMARC record
# β
Added autoconfig records
# 3. Verify setup
namecheap-dns migadu verify example.com
# Output:
# β
All Migadu DNS records are correctly configurednamecheap-dns plugin listExample Output:
Available Plugins:
π¦ migadu (v1.0.0)
Migadu email hosting setup and management
namecheap-dns plugin info migaduOutput includes:
- β Plugin name and version
- β Description
- β Available commands with details
Plugins are Go packages that implement the plugin.Plugin interface.
type Plugin interface {
Name() string
Description() string
Version() string
Commands() []Command
}-
Create plugin package:
pkg/plugin/myplugin/ - Implement interface: Implement all required methods
-
Register plugin: Add to
cmd/root.go -
Test: Use
namecheap-dns plugin listto verify
-
Plugin Registration: Plugins must be registered in
cmd/root.go -
Command Execution: Commands receive a
Contextwith DNS service access -
Output Handling: Use
ctx.Outputfor user-facing messages
- Validate all inputs
- Support
--dry-runflag - Check for existing records before modifying
- Provide clear error messages
- Use DNS constants from
pkg/dnspackage
For detailed plugin development guide, see:
If you create a useful plugin, consider contributing it back to the project:
- Fork the repository
- Create your plugin in
pkg/plugin/<plugin-name>/ - Register it in
cmd/root.go - Add tests
- Submit a pull request