Browse a large CSV file in the terminal with aligned columns, horizontal scrolling, and keyboard navigation.
Search and filter rows in a CSV file using regex patterns directly from the command line.
Pipe the output of another command into csvlens to explore the data interactively in the terminal.
Use csvlens as a Rust library inside another program to display a CSV file and capture the row the user selects.
Install via Homebrew, winget, or Cargo in under a minute, run csvlens followed by a filename.
csvlens is a command line tool for viewing CSV files in the terminal. If you have ever used the less command to read text files in a terminal window, csvlens works on the same idea but designed specifically for CSV data: rows and columns stay aligned, and you can scroll both horizontally and vertically through the file without it turning into an unreadable mess. You run it by typing csvlens followed by a filename, or you can pipe data from another command directly into it. Once open, you navigate using keyboard shortcuts similar to other terminal tools. Arrow keys or the hjkl keys scroll through rows and columns. You can search within the file using a regex pattern, filter the visible rows down to just matches, sort by a column, resize column widths, freeze columns on the left side, and copy selected cells or rows to the clipboard. There are a handful of command line options for handling non-standard CSV files. You can specify a different delimiter if the file uses tabs or pipes instead of commas, tell it to ignore case during searches, skip treating the first row as headers, or pre-apply a column or row filter when you open the file. Installing csvlens is straightforward on most platforms. Mac users can install via Homebrew, Windows users via winget, Arch Linux users via the official package repositories, and several BSD systems have it in their package managers as well. If you have Rust installed, you can also install it through Cargo. Beyond the standalone viewer, csvlens can also be used as a Rust library inside other programs. You call a function, pass it a file path and optional configuration, and it returns whatever cell or row the user selected. The README includes short code examples and links to the full library documentation.
← ys-l on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.