# dog

> Command-line DNS client with colorful output, JSON support, and DNS-over-TLS/HTTPS protocols

Stars: 6.7k · Language: Rust · License: EUPL-1.2 · Categories: Network

- Repository: https://github.com/ogham/dog
- Website: https://dns.lookup.dog/
- Page: https://www.trmn.sh/tools/dog

## Install

- Homebrew: `brew install dog`
- Arch Linux: `pacman -S dog`
- Cargo: `cargo build --release`

## Overview

dog is a command-line DNS client that serves as an alternative to dig. It performs DNS queries with enhanced output formatting, including colorized results and JSON output for programmatic use. The tool supports standard DNS record types (A, MX, NS, etc.) and can query custom nameservers.

The tool distinguishes itself through support for modern DNS protocols including DNS-over-TLS and DNS-over-HTTPS, alongside traditional UDP and TCP queries. It accepts both human-readable argument syntax (like `dog example.net MX @1.1.1.1`) and explicit command-line flags for scripting scenarios.

dog includes protocol-level customization options such as EDNS support, transaction ID modification, and timing measurements. The output can be configured for different use cases: short mode for scripts, JSON format for data processing, and detailed colorized output for interactive use. Network administrators, developers, and system administrators working with DNS troubleshooting or automation would find this tool useful for both manual queries and integration into monitoring or diagnostic scripts.

### Installation

```bash
# via Homebrew
brew install dog
```

```bash
# via Arch Linux
pacman -S dog
```

```bash
# via Cargo
cargo build --release
```

![Screenshot of dog making a DNS request](https://media.trmn.sh/cached/d7e77892ae31a740987307a3887ed79564ca73576171f36843a8a1df264f64cb.png)

## Alternatives

- [spotify_player](https://www.trmn.sh/tools/spotify-player.md): Terminal Spotify client with streaming, Spotify Connect remote control, synced lyrics, audio visualization, daemon mode, and CLI commands. Requires Premium. (Rust, 7.3k stars)
- [sshx](https://www.trmn.sh/tools/sshx.md): Shares a terminal session over the web with a single command, with real-time cursors, an infinite canvas of windows, and end-to-end encryption. (Rust, 7.7k stars)
- [miniserve](https://www.trmn.sh/tools/miniserve.md): Single-binary, cross-platform CLI HTTP file server with auth, uploads, TLS, WebDAV, QR codes, and on-the-fly tar.gz/zip directory downloads. (Rust, 8.1k stars)
- [trippy](https://www.trmn.sh/tools/trippy.md): Network analysis tool combining traceroute and ping functionality for diagnosing networking issues (Rust, 8.1k stars)
- [xh](https://www.trmn.sh/tools/xh.md): HTTP client that reimplements HTTPie's syntax with focus on improved performance and speed. (Rust, 8.2k stars)

---

Canonical: https://www.trmn.sh/tools/dog
