csvlens
Terminal CSV file viewer with spreadsheet-like navigation and filtering capabilities
csvlens is a terminal-based CSV file viewer that provides spreadsheet-like navigation for CSV data. It accepts CSV files as arguments or reads from stdin, making it suitable for piping data from other commands. The tool displays CSV data in a structured table format with vim-like navigation keybindings (hjkl) and supports standard paging controls.
The viewer includes filtering and search capabilities through regex patterns, allowing users to filter rows or columns with commands like &<regex> and *<regex>. It supports row sorting by column values, including natural ordering for alphanumeric data. Users can mark specific rows, copy selected cells to clipboard, and print filtered data to stdout. The tool handles different delimiters including auto-detection, tab-separated values, and custom separators.
Advanced features include column width adjustment, freezing columns from the left, line wrapping controls, and colored column display. The tool can be configured with command-line options for case-insensitive searching, custom prompts, and default filters. It also functions as a Rust library, enabling integration into other applications that need CSV viewing capabilities.
Installation
# via Homebrew
brew install csvlens
# via Cargo
cargo install csvlens
# via Arch Linux
pacman -S csvlens

Alternatives & related tools
qsv
Rust CLI toolkit of composable commands for querying, transforming, validating, joining, and describing CSV, Excel, and other tabular data.
gojq
Pure Go implementation of jq command-line JSON processor with arbitrary-precision arithmetic and YAML support
angle-grinder
Command-line log analysis tool that parses, filters, and aggregates log data with a pipeline query language and a live-updating terminal UI.
lazysql
Cross-platform TUI database management tool for MySQL, PostgreSQL, SQLite, and MSSQL with SQL editor and table operations.
litecli
Command-line client for SQLite databases with auto-completion and syntax highlighting.
add a badge to your README
Maintain csvlens? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/csvlens?utm_source=badge)<a href="https://www.trmn.sh/tools/csvlens?utm_source=badge"><img src="https://www.trmn.sh/badge/csvlens.svg" alt="Featured on trmn" height="20"></a>