Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 5, 2026·3 min de lecture

csvlens — Interactive CSV Viewer for the Terminal

csvlens is a Rust-based command-line tool that renders CSV files as scrollable, searchable tables in the terminal with column sorting and filtering.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
csvlens Overview
Commande d'installation directe
npx -y tokrepo@latest install b636edc5-784d-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

csvlens brings spreadsheet-like navigation to CSV files directly in the terminal. Rather than opening a heavyweight application or writing parsing scripts, you can scroll through rows, sort columns, search for values, and filter data interactively from the command line.

What csvlens Does

  • Renders CSV data as an aligned, scrollable table in the terminal
  • Supports column-based sorting in ascending or descending order
  • Provides search to locate specific values across all columns
  • Handles large files efficiently with streaming row loading
  • Supports TSV and other delimiter-separated formats

Architecture Overview

csvlens reads the CSV file incrementally, parsing rows on demand as the user scrolls. The TUI is built using the ratatui library for Rust terminal applications. Column widths are calculated from visible data, and the table view maintains a scrollable viewport over the full dataset. Search and filter operations scan rows in the background while keeping the UI responsive.

Self-Hosting & Configuration

  • Install via Cargo with cargo install csvlens
  • Also available through Homebrew and Nix package managers
  • Pass the file path as an argument or pipe CSV data through stdin
  • Use -d flag to specify a custom delimiter (e.g., -d '\t' for TSV)
  • No configuration file is needed; all options are command-line flags

Key Features

  • Vim-style navigation with j/k for rows and h/l for columns
  • Column sorting by pressing s on any column header
  • Regex-powered search with / to find matching values
  • Filter mode to show only rows matching a search query
  • Automatic column width detection and horizontal scrolling

Comparison with Similar Tools

  • xsv — Fast CSV toolkit for slicing and statistics, not interactive
  • Miller — Powerful CSV/JSON processor with its own query language
  • VisiData — Feature-rich TUI for exploring tabular data, heavier and Python-based
  • column — Basic Unix tool for aligning text, no interactivity

FAQ

Q: Can csvlens handle files with millions of rows? A: csvlens streams data incrementally, so it can open large files without loading everything into memory at once.

Q: Does it support Excel or Google Sheets formats? A: No. csvlens reads plain CSV and other delimiter-separated text files. Convert spreadsheets to CSV first.

Q: How do I change the delimiter? A: Use the -d flag followed by the delimiter character, for example -d ';' for semicolon-separated files.

Q: Can I export filtered results? A: csvlens is currently a viewer only. For filtering and exporting, pair it with tools like xsv, Miller, or awk.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires