- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
DNS TUI
A small, keyboard-first terminal UI for managing DNS records in Cloudflare and AdGuard Home.
Features
- Cloudflare DNS records with zone selection, proxied state, TTL, and record-type editing.
- AdGuard Home DNS rewrites with HTTP Basic Auth and per-rewrite enable/disable state.
- Multiple named instances in one configuration.
- Explicit editing scope for AdGuard Home: active instance only or all AdGuard instances.
- Safe bulk behavior: add applies to every target; edit/toggle/delete apply only to matching records and report partial failures.
- Replace an IPv4 or IPv6 address across selected Cloudflare and AdGuard Home instances.
- Masked credential fields, clear connection errors, refreshable data, details, and help overlays.
Quick start
cargo run --release --bin dns
The optimized executable is written to target/release/dns.
Open Connections with c or Ctrl+, to add and edit provider instances. The Connections dialog starts on the instance list; press Tab to enter its fields. Use n and x there to add/remove instances, [ and ] to switch the instance being edited, and ←/→ on Provider to choose Cloudflare or AdGuard Home. Open UI Settings with u to adjust the record preview and status glyphs.
AdGuard Home instances use the base URL of the web/API server, for example http://192.168.1.10:3000. A /control suffix is accepted and normalized; API requests use AdGuard Home's /control prefix automatically. The account must have permission to manage DNS rewrites.
Keybindings
| Key | Action |
|---|---|
j/k, arrows |
Navigate |
a |
Add record/rewrite |
e |
Edit selected record |
d |
Delete with confirmation |
space, enter |
Toggle proxied/enabled |
i, I |
Next / previous instance |
1–9 |
Select instance directly |
m |
Toggle instance-only / all-AdGuard editing |
p |
Replace an IP address on selected instances |
z |
Cycle Cloudflare zone |
r |
Refresh |
c, Ctrl+, |
Connections and credentials |
u |
UI settings |
o |
Details |
h, ? |
Help |
q |
Quit |
Replacing an IP address
Press p, enter the current and replacement IP addresses, then use Tab to focus the server list. Use ↑/↓ to choose servers and Space to select them. Press Enter to replace exact matches. Cloudflare updates only A and AAAA records; AdGuard Home updates matching DNS rewrites.
Configuration
Stored at ~/.config/cloudflare-tui/config.json. The app migrates the previous single-Cloudflare base_url and auth_by_base format into the new instances list on load.
An instance has a name, provider, base URL, and provider-specific credentials. Cloudflare uses an API token. AdGuard Home uses username/password Basic Auth. Credentials are stored in the local configuration file, so protect that file appropriately.
Verification
cargo test
cargo build --release