hexyl — A Colorful Command-Line Hex Viewer
hexyl is a small, fast Rust hex viewer that colorizes bytes by category (ASCII, whitespace, non-ASCII, null) so binary inspection is actually scannable.
Installation avec revue préalable
Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.
npx -y tokrepo@latest install 44b21bb2-38c4-11f1-9bc6-00163e2b0d79 --target codexDry-run d'abord, confirmez les écritures, puis lancez cette commande.
What it is
hexyl is a small, fast command-line hex viewer written in Rust. It color-codes bytes by category: ASCII printable characters, whitespace, non-ASCII bytes, and null bytes each get a distinct color. This makes binary file inspection significantly more readable than traditional hex dump tools.
It targets developers, reverse engineers, and sysadmins who frequently inspect binary files, firmware images, or data formats from the terminal.
How it saves time or tokens
hexyl's color coding lets you spot patterns in binary data at a glance. Instead of squinting at raw hex output from xxd or od, you immediately see where ASCII strings, padding, and non-printable regions are. The --skip and --length options let you jump to specific offsets without loading the entire file.
How to use
- Install hexyl:
brew install hexyl
# Or on Linux:
cargo install hexyl
- View a binary file:
hexyl /bin/ls | head
- Inspect a specific offset range:
hexyl --skip 4096 --length 64 file.bin
Example
# Install
brew install hexyl
# View first 256 bytes of a binary
hexyl --length 256 /usr/bin/file
# View bytes at offset 0x1000
hexyl --skip 4096 --length 128 firmware.bin
# Pipe from stdin
curl -s https://example.com/image.png | hexyl --length 64
Output uses colors: blue for ASCII, green for whitespace, yellow for non-ASCII, and dim gray for null bytes.
Related on TokRepo
- AI Tools for Coding — Developer command-line tools and utilities
- Featured Workflows — Discover trending CLI tools on TokRepo
Key considerations
When evaluating hexyl for your workflow, consider the following factors. First, assess whether your team has the technical prerequisites to adopt this tool effectively. Second, evaluate the maintenance burden against the productivity gains. Third, check community activity and documentation quality to ensure long-term viability. Integration with your existing toolchain matters more than feature count alone. Start with a small pilot project before rolling out across the organization. Monitor resource usage during the initial adoption phase to identify bottlenecks early. Document your configuration decisions so team members can onboard independently.
Common pitfalls
- Piping hexyl output through a pager that does not support ANSI colors (like plain
less) strips the color coding; useless -Rinstead. - Very large files output extensive data; always use
--lengthto limit output or pipe throughhead. - Terminal themes with light backgrounds may reduce contrast for some byte categories; adjust terminal colors if needed.
Questions fréquentes
xxd outputs plain hex without color coding. hexyl adds distinct colors for each byte category, making patterns immediately visible. hexyl also provides a cleaner layout with offset, hex, and ASCII columns.
Yes. hexyl reads files efficiently and supports --skip and --length to view specific byte ranges without loading the entire file into memory.
Yes. hexyl is cross-platform Rust software that works on Windows, macOS, and Linux. Install via cargo or download pre-built binaries from the GitHub releases page.
hexyl uses built-in colors mapped to byte categories. The color scheme is not configurable via command-line options, but it respects your terminal's color palette for the ANSI color slots it uses.
Yes. hexyl is available via Homebrew (macOS), apt (Debian/Ubuntu), pacman (Arch), and cargo (Rust). Check the GitHub README for the full list of package manager commands.
Sources citées (3)
- hexyl GitHub— Colorful hex viewer written in Rust
- hexyl README— Color-codes bytes by category: ASCII, whitespace, non-ASCII, null
- hexyl GitHub— Cross-platform CLI tool available in major package managers
En lien sur TokRepo
Fil de discussion
Actifs similaires
curl — The Command Line Tool for Transferring Data with URLs
curl is the most widely used command-line tool for transferring data with URL syntax. It supports HTTP, HTTPS, FTP, SFTP, and 25+ other protocols. Installed on billions of devices, curl and libcurl are foundational internet infrastructure.
Hyperfine — Command-Line Benchmarking Tool
Hyperfine is a command-line benchmarking tool written in Rust. Run benchmarks with statistical analysis: multiple runs, warmup, outlier detection, comparison across commands, and export results. By the author of bat and fd.
Newman — Run Postman API Collections from the Command Line
Command-line collection runner for Postman that executes API tests in CI/CD pipelines with detailed reporting.
jq — Lightweight Command-Line JSON Processor
jq is the essential command-line tool for processing JSON data. It lets you slice, filter, transform, and format JSON with a concise expression language — making it indispensable for working with APIs, config files, and data pipelines in the terminal.