The query language of the tsvsheet ecosystem. A
|-separated pipeline of relational verbs —select,where,derive,sort,group, … — over a TSV or tsvt table, with every embedded expression written in the tsvsheet formula language so the two languages can never drift apart. TSV in, TSV out; betweencutandjq.
where and([stars] > 1000, [lang] = "go") | derive ratio = round([stars] / [forks], 2) | select name, stars, ratio | sort -stars | limit 10
Grammar-first, exactly like tsvsheet and isnow: TqLexer.g4 + TqParser.g4 are the source of truth, importing the tsvsheet expression grammar vendored at a pinned commit (imports/VENDORED.md). SPECIFICATION.md is normative. Every implementation is generated from the grammars (make gen, Docker-isolated ANTLR — docker/antlr); generated parsers are never committed here.
- Canonical engine: tsvsheet/go-tq — the single implementation of tq semantics.
- CLI: tsvsheet/tq.go — the
tqbinary.