CLI tool
sharkdp/hexyl avatar
sharkdp/hexyl

hexyl colors five byte categories with six environment variables

A command-line hex viewer

10,308 stars289 forksRustApache-2.0

At a glance

What is it?
hexyl is a Rust command-line hex viewer that separates NULL, printable ASCII, ASCII whitespace, other ASCII, and non-ASCII bytes by color. It installs from nearly every package manager on Unix, and its configuration surface is six environment variables with no config file, while the README understates the Rust version the manifest actually requires.
Who is it for?
Pick hexyl if you want a read-only terminal hex dump with byte classes already color coded and you install software through a package manager. Skip it if you need an interactive editor, a config file you can commit to a dotfiles repo, or a Windows console older than the ANSI capable builds, and check the Rust version in Cargo.toml before attempting a source install on an older toolchain.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • sharkdp/hexyl10,308 ★ · +26
Star history
Repository2026-09-222026-11-14
sharkdp/hexyl10.3k10.3k

26 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Five byte categories drive every color in the output

hexyl splits bytes into five categories and gives each one a color: NULL bytes, printable ASCII characters, ASCII whitespace characters, other ASCII characters, and non-ASCII bytes. The README notes that the whitespace color shows up only in the middle panel that prints byte values, so a space or newline is not colored in the character panel beside it.

Color configuration is six environment variables and nothing else

There is no config file to edit. Every color comes from an environment variable: `HEXYL_COLOR_ASCII_PRINTABLE`, `HEXYL_COLOR_ASCII_WHITESPACE`, `HEXYL_COLOR_ASCII_OTHER`, `HEXYL_COLOR_NULL`, `HEXYL_COLOR_NONASCII`, and `HEXYL_COLOR_OFFSET` for the lefthand file offset. Accepted values are the eight standard terminal colors, black, blue, cyan, green, magenta, red, yellow and white, the bright variants such as bright blue, or an RGB hex string in the form `#abcdef`. The README mixes all three forms in one example:

code
HEXYL_COLOR_ASCII_PRINTABLE=blue HEXYL_COLOR_ASCII_WHITESPACE="bright green"
HEXYL_COLOR_ASCII_OTHER="#ff7f99"

The three variables are set together in a single shell command.

Distro packages cover most of the Unix map, one command each

Installation is a short command on most platforms the project names; Gentoo needs an overlay enabled first and runs three commands. Ubuntu 19.10 and newer and Debian Buster and newer use apt, Fedora 35 and newer uses dnf, Arch uses pacman, Void uses xbps-install, FreeBSD uses pkg, NetBSD uses pkgin, OpenBSD uses doas pkg_add, and Nix and Guix have their own paths. macOS is covered twice, by Homebrew and by MacPorts. Termux offers both `pkg install hexyl` and `apt install hexyl`. Anything not on that list is pointed at the release page for binary builds. If your distribution is absent, the other documented route is building from source with cargo. On Ubuntu 19.10 or newer, the whole install is:

code
sudo apt install hexyl

The README asks for Rust 1.56, the manifest requires 1.88

The install instructions say that if you have Rust 1.56 or higher you can install from source with `cargo install hexyl`, but Cargo.toml sets `rust-version = "1.88"` with `edition = "2021"`. Those two numbers disagree, and the manifest is the one the build enforces. Someone following the README on an older toolchain will not get a helpful message from the docs; the install stops at the manifest requirement. Installing straight from a checkout is the alternative path, and it needs the toolchain to satisfy that same manifest floor:

code
git clone https://github.com/sharkdp/hexyl
cargo install --path ./hexyl

Building from a clone needs Pandoc before the man page exists

Converting the man page needs Pandoc, and the command is run from the project root against the Markdown source in doc/:

code
pandoc -s -f markdown -t man -o ./doc/hexyl.1 ./doc/hexyl.1.md

The rest of the release profile is tuned for the resulting binary rather than the build: LTO is on and codegen-units is set to 1, which trades compile time for a smaller or faster artifact.

The older-Ubuntu .deb instructions still point at 0.15.0

For Ubuntu releases too old for the official package, the fallback is a manual install of the latest .deb from the release page, and the command hardcodes a version and architecture: `sudo dpkg -i hexyl_0.15.0_amd64.deb # adapt version number and architecture`. The comment tells you to edit it, but the pinned 0.15.0 is two releases behind the current 0.17.0, which was published on 2026-02-14 after 0.16.0 in December 2024. So a reader who copies that line literally gets an older build than everyone else, and the only signal is the filename itself. Older Debian releases are routed back to the same manual instructions.

Windows works only if your console understands ANSI escapes

Windows users are sent to the release page for binary builds, or to `cargo`, `snap` or `scoop` for a source or package install. The caveat is the terminal, and it is stated plainly: you need a console that supports ANSI escape sequences, named as ConHost v2 since Windows 10 1703 or Windows Terminal since Windows 10 1903. The Cargo.toml lists both `supports-color` and `owo-colors` as dependencies.

No config file, no documented flag, and no way to edit a byte

Three things a hex tool user might look for are simply absent from what is published. There is no configuration file, so a color palette that works on one machine has to be re-exported in every shell profile that starts hexyl. There is no documented command-line flag for colors either, even though the project depends on clap with the `wrap_help` feature, so the environment variables are the only documented lever. And the project presents itself as a viewer, not an editor: nothing in the docs describes modifying bytes in place. A user who opens a file expecting to patch it will find a read-only dump with a considered color scheme.

Editorial conclusion

Pick hexyl if you want a read-only terminal hex dump with byte classes already color coded and you install software through a package manager. Skip it if you need an interactive editor, a config file you can commit to a dotfiles repo, or a Windows console older than the ANSI capable builds, and check the Rust version in Cargo.toml before attempting a source install on an older toolchain.

Frequently asked questions

how to use hexyl

The README does not document command-line usage syntax. Installation is given per platform, for example `sudo apt install hexyl` on Ubuntu 19.10 or newer, and colors are set with the `HEXYL_COLOR_` environment variables.

What is a hexyl?

In this project, hexyl is a command-line hex viewer for the terminal written in Rust, licensed MIT or Apache-2.0. It colors output by byte category: NULL bytes, printable ASCII, ASCII whitespace, other ASCII, and non-ASCII.

Does hexyl need a configuration file?

No. Color settings come entirely from `HEXYL_COLOR_ASCII_PRINTABLE`, `HEXYL_COLOR_ASCII_WHITESPACE`, `HEXYL_COLOR_ASCII_OTHER`, `HEXYL_COLOR_NULL`, `HEXYL_COLOR_NONASCII`, and `HEXYL_COLOR_OFFSET`. Values accept the eight standard terminal colors, bright variants, or RGB hex such as `#abcdef`.

Can I install hexyl on Windows?

Yes, from binary builds on the release page, or via `cargo`, `snap`, or `scoop`. The terminal must support ANSI escape sequences, such as ConHost v2 since Windows 10 1703 or Windows Terminal since Windows 10 1903.

What Rust version does hexyl require?

The README says Rust 1.56 or higher for `cargo install hexyl`, while Cargo.toml sets `rust-version = "1.88"`. The manifest is the value the build enforces, so check it before installing on an older toolchain.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. sharkdp/hexyl on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sharkdp-hexyl.svg)](https://hysenlabs.com/projects/sharkdp-hexyl)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/sharkdp-hexyl.svg)](https://hysenlabs.com/projects/sharkdp-hexyl)

Was this useful?