https://github.com/tekumara/tblcopy
Copy CSVs so they can be pasted as tables on macOS
https://github.com/tekumara/tblcopy
clipboard pbcopy
Last synced: 17 days ago
JSON representation
Copy CSVs so they can be pasted as tables on macOS
- Host: GitHub
- URL: https://github.com/tekumara/tblcopy
- Owner: tekumara
- Created: 2026-05-24T05:19:56.000Z (21 days ago)
- Default Branch: main
- Last Pushed: 2026-05-24T05:46:48.000Z (21 days ago)
- Last Synced: 2026-05-24T07:21:45.933Z (21 days ago)
- Topics: clipboard, pbcopy
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# tblcopy
`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.
## Requirements
- Node.js 20 or newer
- macOS, with `textutil` and `osascript` available on `PATH`
## Install
Install globally from npm:
```sh
npm install -g tblcopy
```
Or run without installing:
```sh
npx tblcopy < table.csv
```
## Usage
```sh
cat table.csv | tblcopy
```
Add visible table borders with `--border`:
```sh
cat table.csv | tblcopy --border
```
Example:
```sh
printf 'Name,Amount\nCoffee,4.50\nRent,1200\n' | tblcopy
```
The first CSV row is rendered as table headers. Quoted CSV fields, escaped quotes, CRLF line endings, and embedded newlines are supported.
## Development
```sh
npm install
npm test
npm start < table.csv
```