tsvpeek

tsvpeek is a small Go command-line program for reading large delimiter-separated files without loading the entire input into memory. It can select columns, filter rows, limit output and render records as a compact terminal table.

Input may be read from a file or standard input. TSV is the default format. CSV and custom single-character delimiters are also supported.

Scope

tsvpeek is intended for interactive inspection and simple streaming transformations. It does not implement a programming language, spreadsheet operations or a database engine.

Compared with awk
Column names, quoted CSV fields, header-aware selection and formatted terminal output are built in. Arbitrary expressions and general text processing are not.
Compared with csvkit
The command set is smaller and concentrated on inspection, filtering and projection. Processing is performed as a stream with minimal startup overhead.

Example

tsvpeek \
  --header \
  --columns id,name,status,size \
  --where 'status=ready' \
  --where 'size>=1000' \
  --sort size:num:desc \
  --limit 20 \
  --table \
  data.tsv

Example output:

id    name          status   size
----  ------------  -------  -----
1842  alpha.dat     ready    9812
1760  sample.bin    ready    7450
1021  records.tsv   ready    1820

Documentation sections

Processing model

Rows are parsed sequentially. Selection and filters are evaluated before formatted output is produced. Operations that require knowledge of the complete result set, such as sorting, may retain matching records in memory.

Without such operations, memory consumption is independent of total file size and is primarily determined by the largest row encountered.