Getting started
Install dog, highlight a file, change themes, and optionally wire it into fzf as a previewer.
Install
The quick ways — install script picks the right build for your machine, installs it, and sets up shell completions:
curl -fsSL https://sh.dog/install | shOr Homebrew:
brew tap edden27/dog
brew trust edden27/dog
brew install dogTIP
All installation options, including prebuilt binaries, building from source, custom language subsets, and no-sudo installs, can be found here.
Verify:
dog --versionExpected output:
0.1.0TIP
Tab completions are set up for you if you installed via the script or Homebrew. Installed another way? dog can generate them for your shell in one command.
First highlight
Try dog right away — no file needed:
echo 'struct Woof { let barks: Int, goodBoy: Bool = true }' | dog -l swiftTIP
dog reads from stdin when no file argument is given. The -l flag tells it the language since there's no filename to detect from. See configuration for the full flag.
Point dog at a file in one of the 17 supported languages:
dog Sources/dog/Dog.swiftdog auto-detects the language and shows you the file rendered in the default UtilityDark theme.
Change themes
Flip to the light built-in with --light:
dog --light Sources/dog/Dog.swiftList what's available:
dog --list-themesYou'll see the two built-ins (UtilityDark and UtilityBright) plus any themes in ~/.config/dog/themes/.
Any Zed-format theme works — download one into ~/.config/dog/themes/ and it shows up in --list-themes, or point --theme-dir at your existing Zed themes:
dog --theme-dir ~/.config/zed/themes --theme 'Catppuccin Mocha' Sources/dog/Dog.swiftTIP
For picking, installing, and authoring themes, see Theming.
Make a theme your default with --set-default-theme — every run uses it from then on, no --theme needed:
dog --set-default-theme 'Catppuccin Mocha'TIP
For setting, clearing, and how the default theme works, see Theming.
Watch the pager kick in
Highlight a long file. When the output exceeds your terminal height, dog hands off to less -R:
dog /path/to/long-file.rsQuit the pager with q. Disable the pager with -P or --paging=never:
dog -P /path/to/long-file.rsSee pager behavior for the full matrix.
Use dog as a file previewer
dog's ~5ms startup shines when used with tools that use preview commands.
fzf --preview 'dog --color=always {}'tv files -p 'dog --color=always {}'# Install the dog.yazi plugin, then register it — see the tip below
ya pkg add edden27/dogNavigate files with the arrow keys. The preview pane renders each file with the current theme. Exit with Esc.
Two flags worth knowing when piping into a previewer:
--color=always— forces ANSI color through the pipe. Without it, the previewer receives plain text.--wrap=never— optional.dogalready defaults to no-wrap when piped into a previewer. Pass this explicitly to force that behavior.
fzf --preview 'dog --color=always --wrap=never {}'TIP
For ways to use dog with fzf, tv, yazi, and ripgrep — including recipes that also set a theme or language filter — check out Integrate dog.
Where to go next
- Configuration — every flag, env var, and exit code.
- How to integrate dog into your workflow — fzf, tv, yazi, pagers, pipes, tab completions.
- Theming — pick, install, and author themes.
- How is dog different? — engine, themes, speed, coverage.
🦮 Dog Fact
Scientific proof confirms your dog's devotion is genuine love.