local-dns
DNS management for local development. Profile-based, wildcard-ready, cross-platform.
Installation
`# macOS (Homebrew) brew install dnsmasq cargo install local-dns # Linux sudo apt install dnsmasq cargo install local-dns # Windows (winget) winget install dnsmasq cargo install local-dns`Quick start
1
Initialize
$ local-dns init2
Add a domain
$ local-dns add myapp.test 127.0.0.13
Verify
$ ping myapp.test4
Add with zone
$ local-dns add api.test 127.0.0.1 --zone projects5
List entries
$ local-dns listCommands
local-dns add <domain> <ip>Add a DNS entry--zone, --group, --commentlocal-dns remove <domain>Remove a DNS entrylocal-dns move <domain>Move entry to another zone/group--zone, --grouplocal-dns copy <domain>Copy entry to another zone/group--zone, --grouplocal-dns edit <domain>Edit IP or comment--ip, --commentlocal-dns listList all entries in active profilelocal-dns initInitialize configuration and serviceslocal-dns resetDelete database and re-initialize from scratchlocal-dns statusShow system statuslocal-dns applyApply DNS configurationlocal-dns detectDetect system DNS configurationlocal-dns check <domain>Check entry status (created date, loaded state)local-dns logsView dnsmasq logs--follow, --errors, --lineslocal-dns telemetry statusView telemetry settingsProfiles
Profiles let you switch between different DNS configurations. Perfect for separating work projects from personal projects.
`# Create a profile local-dns profile create work # Switch to a profile local-dns profile switch work # List profiles local-dns profile list # Show active profile local-dns profile show`Zones and Groups
Zones group related DNS entries. Groups within zones add another level of organization.
`# Create a zone local-dns zone create services # Create a group in a zone local-dns group create api --zone services # Add entry to group local-dns add myapp.test 127.0.0.1 --zone services --group api`