How is dog different?
Left: dog in 1.1s, right: bat in 6.9s — printing the same 260,493-line C file.
Left: dog in 1.1s, right: bat in 6.9s — printing the same 260,493-line C file.
How dog compares to bat, side by side: the parsing engine, theming, languages, syntax coverage, speed, binary size, and platforms — plus what 0.1 doesn't do yet, and when each tool is the right pick.
Engine
dog parses files into a full AST and queries the tree. bat matches regex patterns per line.
| dog | bat | |
|---|---|---|
| Parser | tree-sitter | regex |
| Library | tree-sitter C API | syntect |
| Grammars | nvim-treesitter | Sublime Text |
| AST access | Yes | No |
The AST row matters twice. Today, it's why dog colors 100% of the code while regex misses tokens — see Coverage below. Down the line, it could enable features regex can't do — like printing a single function from a file, or diffs that understand code structure. Nothing like that ships in 0.1, and none of it is promised — it's just room the engine leaves to grow.
Themes
Themes: Catppuccin Frappé, Vim Adwaita Dark, Tokyo Night, built-in --light.
Themes: Lotus Light, the built-in --light, Vim Light, Catppuccin Latte.
dog reads plain Zed JSON themes — drop a .json in your theme directory and it shows up. bat reads complex TextMate XML, popularized by the Sublime Text editor released in 2008. Because Zed themes carry editor UI info, dog can theme parts of the output that bat can't, per theme: the code background, line-number color, gutter background, and border line, plus bold and italic per token (4 font variants). Alpha channels are supported by compositing against the editor background at load time.
| dog | bat | |
|---|---|---|
| Format | Zed JSON | TextMate XML |
| Code background | Themed | Terminal |
| Line number fg | Themed | Fixed |
| Gutter bg | Themed | Fixed |
| Border / gutter line | Themed | Fixed |
| Bold & italic (all 4 font styles) | Theme-controlled | Partial — italics opt-in, never combined |
| Alpha colors | Yes | No |
| Multi-variant bundles | Yes | No |
| Use editor theme dir | --theme-dir | No |
For the schema, bundled themes, and how to point dog at an existing Zed themes directory, see Theming.
Languages
| dog | bat | |
|---|---|---|
| Count | 17 | 200+ |
| Build-time subset | Yes | No |
Supported language list: Configuration → Supported languages, with more planned.
Coverage
Coverage is how much of the code actually gets a syntax color — whatever isn't covered prints as plain, uncolored text. dog colors 100% in every language; bat averages 77% (measured 2026-07-18):
| dog | bat | |
|---|---|---|
| Average coverage | 100% | 77% |
| Languages won | 15/17 | 0/17 |
| Languages tied | 2/17 | 2/17 |
Comparing language by language: dog scores higher in 15 of the 17, and the other two (JSON and YAML) are ties where bat also reaches full coverage. Per-language breakdown and methodology: Benchmarks → Coverage.
Speed
Paired hyperfine runs, both tools on Catppuccin Mocha, pager off, auto-detected language (measured 2026-07-18):
| Size | Avg lines | dog wins | Avg ratio |
|---|---|---|---|
| tiny | 30 | 17/17 | 2.8× |
| small | 195 | 17/17 | 3.5× |
| medium | 2,175 | 17/17 | 6.0× |
| large | 16,900 | 17/17 | 7.4× |
| extreme | 157,740 | 2/2 | 8.0× |
dog wins every language at every size. Every language starts up in ~5ms — precompiled highlight queries removed the startup cost that used to let bat win small files. In a previewer like fzf or yazi, that's the latency on every keystroke.
Full matrix and methodology: Benchmarks.
Binary size
| dog | bat | |
|---|---|---|
| macOS | ~20 MB | ~5 MB |
| Linux | ~34 MB | ~7 MB |
| Runtime deps | None | None |
Most of the size is the 17 tree-sitter grammars compiled directly into the binary. Building from source, you can pick just the languages you need and shrink it — a Swift+JSON-only build is ~5 MB on macOS. The Linux binary is bigger because it also carries the whole Swift runtime — that's what buys the "None" in the runtime-deps row: it runs on a bare distro with nothing to install first.
Platforms
| dog | bat | |
|---|---|---|
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Windows | No | Yes |
Missing from dog in 0.1
- Multi-file rendering (one file at a time for now)
- Git-diff gutter
- Windows support
- Piping multiple files as one stream
- Configurable pager (dog pipes to
less -Rdirectly) - Line range output
What's next
dog is stable at 0.1 but still a puppy. We don't anticipate breaking changes, but it is in active development. Nothing here is a promise and there are no dates — these are the things most likely to get explored and added, in no particular order:
- Line range output
- Line highlighting
- Headers / footers
- TOML config file — set your defaults without flags
- More languages
- Alternative pagers —
$PAGERsupport - Git integration — gutter marks, status
man+--helphighlighting
When to use which
Stick with bat if you need 200+ languages, you're on Windows, you rely on git-gutter, or binary size matters for your setup (embedded systems).
Try dog as an alternative to cat or bat, or if you want richer previews in other tools like fzf, tv, or yazi. Or if you care about speed (especially for large files), Swift, or tree-sitter.