ted displays database tables as markdown table and provides spreadsheet-like editing, including mouse support for selecting/editing cells.
ted [dbname] [tbl]
ted test users
ted --pg test usersdbname can either be a database file (sqlite or duckdb) or a database name.
brew tap ehfeng/ted
brew install ted-dor--database-hor--host-por--port-uor--username--password
--postgresor--pg--mysqlor--my
- tab
- shift+tab
- arrows
- home
- end
- page up
- page down
- ctrl+home/end*
- home/end
- cmd+page up/down (fn+cmd+up/down for mac users)
*cmd+up/down are captured by Ghostty
- enter: edit/down/new row (if at bottom)
- esc: exit from editing, discarding changes
- ctrl+f: find in column
- alt+←/→: rearranges column display order
- ctrl+</>: increase/decrease column width
- ctrl+q: exit
- ctrl+r: start insert row
- ctrl+enter: execute insert row
- ctrl+del: delete row
- shift+enter: start tx
- shift+enter: commit tx
- ctrl+c: rollback tx
-
hjkl: arrows
-
g: home
-
G: end
-
ctrl+b: page up
-
i: edit mode
-
a: append mode
You can select cells, resize columns, and scroll with the mouse.
Schema changes. ted is for browsing and editing data, schema changes better done in dedicated clients
Filtering: better to use Find to jump to the value.
Sorting: better to use views and ORDER BY
# initial
go install
ted completion zsh > /usr/local/share/zsh/site-functions/_ted
exec zsh
# development
make watch
ted test.db users 2>/tmp/ted.log
tail -f /tmp/ted.log
# testing completions
ted __complete "pg" "t" 2>&1git tag -a v0.1.2 -m "Release notes"
git push origin v0.1.2
