### Devbox setup and build commands Source: https://github.com/514-labs/dnsglobe/blob/main/README.md Set up a reproducible development environment with Devbox. Install Devbox first if not already installed, then initialize the environment and build the project. ```bash # Install Devbox first (if not already installed) curl -fsSL https://get.jetify.dev/devbox | bash # Initialize the environment devbox shell # Build the project devbox run build ``` -------------------------------- ### Install Devbox via Homebrew Source: https://github.com/514-labs/dnsglobe/blob/main/README.md Alternative installation method for Devbox using Homebrew. ```bash brew install jetify-com/devbox/devbox ``` -------------------------------- ### Install dnsglobe via package managers Source: https://github.com/514-labs/dnsglobe/blob/main/README.md Install dnsglobe using Homebrew, cargo, Arch Linux AUR, Nix flakes, or eget. The AUR packages offer both source compilation and prebuilt binary options; Nix builds from source. Prebuilt binaries are also available from GitHub Releases. ```sh brew install 514-labs/tap/dnsglobe # Homebrew (macOS/Linux) cargo install dnsglobe # from crates.io yay -S dnsglobe # from archlinux aur (compile from source) yay -S dnsglobe-bin # from archlinux aur (install prebuilt binary) nix run github:514-labs/dnsglobe # Nix flakes (builds from source) x eget use 514-labs/dnsglobe # from (from its GitHub release) # or grab a prebuilt binary from the GitHub Releases page ``` -------------------------------- ### Run dnsglobe with various options Source: https://github.com/514-labs/dnsglobe/blob/main/README.md Start dnsglobe in TUI mode or run a one-shot query with --once for scripting. Use --ecs to specify client subnets; multiple subnets produce one table per subnet plus a convergence summary. ```sh dnsglobe # start empty, type a domain dnsglobe example.com # query immediately and watch dnsglobe example.com TXT # same, starting on TXT records dnsglobe --once example.com TXT # no TUI: print results, exit (for scripts) dnsglobe example.com --ecs 203.0.113.0/24 # see the zone as that client network does dnsglobe --once example.com --ecs 203.0.113.0/24,198.51.100.0/24 # one table per subnet + a convergence summary ``` -------------------------------- ### PTY setup for expect: stty rows and columns Source: https://github.com/514-labs/dnsglobe/blob/main/AGENTS.md An expect-spawned PTY starts with zero size. Fix by setting rows and columns after spawn. ```tcl stty rows 30 columns 110 < $spawn_out(slave,name) ``` -------------------------------- ### Nix flake run commands Source: https://github.com/514-labs/dnsglobe/blob/main/README.md Run DNSGlobe from source or a specific release using Nix. The flake builds from source and exposes packages..default, apps..default, devShells..default, and overlays.default. ```bash # Latest source from default branch nix run github:514-labs/dnsglobe # Specific release (uses the flake at that git tag) nix run github:514-labs/dnsglobe/v0.4.0 # Named outputs (if the flake exposes them): #latest, #source nix run github:514-labs/dnsglobe#source # Build / develop nix build github:514-labs/dnsglobe nix develop github:514-labs/dnsglobe ``` -------------------------------- ### DNSGlobe TOML configuration file Source: https://github.com/514-labs/dnsglobe/blob/main/README.md Optional configuration file at ~/.config/dnsglobe/config.toml ($XDG_CONFIG_HOME/dnsglobe/config.toml if set). Set DNSGLOBE_CONFIG to use a different path. Use 'replace = true' to replace the built-in resolver list instead of extending it. The 'ecs' key sets EDNS Client Subnets (Ctrl+N cycles; --ecs overrides). 'view' sets world-view style (auto, map, or globe; --view overrides). Each [[resolvers]] entry requires 'name' and 'ip' (IPv4 or IPv6, port 53); 'location', 'lat', and 'lon' are optional. The [theme] section is optional; every key is optional and unset roles keep defaults. Colors are ANSI names, 256-color indexes, or hex (needs truecolor support). Invalid config (bad IP, unknown key, unrecognized color, bad ecs subnet, lat without lon, replace = true with no resolvers) is reported at startup with the offending entry named. ```toml # Set to true to replace the built-in list instead of extending it — # e.g. to watch propagation across your own nameservers only. replace = false # EDNS Client Subnet(s) to query with (Ctrl+N cycles; --ecs overrides). ecs = ["203.0.113.0/24"] # World-view style: auto (default — pick by terminal width), map, or globe. # The --view flag overrides this. view = "auto" [[resolvers]] name = "Corp DNS" # required — shown in the Resolver column ip = "10.0.0.53" # required — IPv4 or IPv6, queried on port 53 location = "HQ" # optional — Loc column / location sort lat = 40.7 # optional — position on the world map; lon = -74.0 # omit both to leave it off the map [[resolvers]] name = "NS1 (public)" ip = "198.51.100.53" # Optionally recolor the UI. Every key is optional; unset roles keep their # defaults. Colors are ANSI names ("lightcyan"), 256-color indexes ("208"), # or hex ("#ff8700" — needs truecolor support). [theme] accent = "lightcyan" # borders, titles, cursor, anycast sites agree = "lightgreen" # answers matching the majority; fast latency differ = "lightmagenta" # answers disagreeing with the majority error = "white on lightred" # ERR / SERVFAIL / NONE; slow latency. Written # " on ", it becomes a filled badge on the # status glyph and word — legible on any background; # a plain color like "lightred" drops the badge pending = "lightyellow" # queries in flight; middling latency stale = "208" # caches serving an answer past its own TTL upstream = "lightblue" # refetched but upstream still has the old data muted = "faint" # labels, hints, countdowns, quiet borders — # "faint" dims your terminal's default foreground; # set a color if your terminal renders faint poorly coastline = "gray" # map/globe land outline grid = "244" # globe graticule and limb ``` -------------------------------- ### Run quality gates: cargo fmt, clippy, test Source: https://github.com/514-labs/dnsglobe/blob/main/AGENTS.md CI enforces these exact commands on every PR. Run them locally before pushing changes. ```sh cargo fmt --check cargo clippy --all-targets -- -D warnings cargo test ``` -------------------------------- ### End-to-end query check: cargo run --once Source: https://github.com/514-labs/dnsglobe/blob/main/AGENTS.md Prints a plain table without needing a TTY. Use to verify query/output logic. ```sh cargo run -- example.com --once ``` -------------------------------- ### Wait while draining PTY output: expect -timeout Source: https://github.com/514-labs/dnsglobe/blob/main/AGENTS.md Tcl's sleep stops reading the PTY, so a continuously-redrawing app fills the ~16KB kernel buffer and blocks mid-write. Use this instead to keep draining output. ```tcl expect -timeout N "ZZZ_never_matches" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.