tblcopy reads CSV from stdin, converts it to a rich-text table, and copies the RTF table to the macOS clipboard. Useful for pasting into spreadsheets, or emails as tables.
- Node.js 20 or newer
- macOS, with
textutilandosascriptavailable onPATH
Install globally from npm:
npm install -g tblcopyOr run without installing:
npx tblcopy < table.csvcat table.csv | tblcopyAdd visible table borders with --border:
cat table.csv | tblcopy --borderExample:
printf 'Name,Amount\nCoffee,4.50\nRent,1200\n' | tblcopyThe first CSV row is rendered as table headers. Quoted CSV fields, escaped quotes, CRLF line endings, and embedded newlines are supported.
npm install
npm test
npm start < table.csv