This is a Homebrew tap for table-printer-cli, a Node.js CLI tool for printing beautiful tables in your terminal.
brew install console-table-printer/homebrew-console-table/ctp
After installation, you can use the ctp
command in your terminal:
# Show help
ctp --help
# Simple Table
ctp -i '[{ "id":3, "text":"like" }, {"id":4, "text":"tea"}]'
# Use custom column styles
ctp -i '[{"id":1,"status":"active"},{"id":2,"status":"inactive"}]' --tableOptions '{"columns": [{"name": "status", "color": "green"}]}'
# Change table title
ctp -i '[{"id":1,"name":"John"}]' --tableOptions '{"title": "Users List"}'
To remove the package:
# Uninstall the package
brew uninstall ctp