Menu

1 / 2

csv-peek — A 700-Line Rust CLI That Pretty-Prints CSV in the Terminal With a Hand-Rolled RFC 4180 Parser, Type Inference, and One Dependency

DEV Community·SEN LLC·6 months ago
#CaCQYMug
#rust#cli#csv#terminal#enter
Reading 0:00
15s threshold

cat customers.csv and the columns slide off the right edge of your terminal. You don't really want to open a spreadsheet just to spot-check eight rows. csv-peek customers.csv prints an aligned table in 1 ms — numbers right-aligned in cyan, dates in yellow, booleans in magenta, the embedded comma in "hello, world" not breaking alignment because the parser actually understands quoting. Single dependency ( clap ), sub-1 MB stripped binary, 51 tests.

📦 GitHub : https://github.com/sen-ltd/csv-peek

$ cat customers.csv id ,name,email,signup_date,active,balance,note 1,Alice Suzuki,[email protected],2024-01-15,true,1280.50, "first 10 customers" 2,Bob Tanaka,[email protected],2024-02-03,true,42.00, …

$ csv-peek customers.csv ┌────┬──────────────┬───────────────────┬─────────────┬────────┬─────────┬────────────────────┐ │ id │ name │ email │ signup_date │ active │ balance │ note │ ├────┼──────────────┼───────────────────┼─────────────┼────────┼─────────┼────────────────────┤ │ 1 │ Alice Suzuki │ [email protected] │…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.