Socket
Book a DemoInstallSign in
Socket

table-printer-cli

Package Overview
Dependencies
Maintainers
1
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

table-printer-cli

console table printer cli. Print table on bash terminal

1.2.5
Source
npmnpm
Version published
Weekly downloads
15
-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

table-printer-cli

📟🍭Printing Pretty Tables on your terminal

codecov npm version install size semantic-release

Synopsis

Printing Simple Table on your bash terminal. Its useful when you want to present some tables on console. There is a library that you can use similar way in nodejs/typescript Projects. console-table-printer

Installation

Using npm

npm install --global table-printer-cli

Using yarn

yarn global add table-printer-cli

Basic Example

Try this simple example first:

ctp -i '[{"name":"Alice","score":95},{"name":"Bob","score":82}]'

Basic Example

You can also pipe JSON data from other commands:

# Pipe data from another command
echo '[{"name":"Alice","role":"Developer"},{"name":"Bob","role":"Designer"}]' | ctp -s

Pipe Example

Using Table Options

Customize your tables with colors, styles, and more using the --tableOptions parameter. These options are compatible with console-table-printer library.

# Colorize specific columns
ctp -i '[
  {"name": "John", "status": "active", "score": 95},
  {"name": "Jane", "status": "inactive", "score": 82},
  {"name": "Bob", "status": "active", "score": 78}
]' --tableOptions '{
  "title": "Employee Status",
  "columns": [
    {"name": "status", "color": "green", "alignment": "right"},
    {"name": "score", "color": "yellow"}
  ]
}'

Complex Example

Detailed Usage

Usage: ctp [options]

Options:
  -i, --input <value>         input string
  -s, --stdin                read input from stdin
  -t, --tableOptions <value> table options in JSON format
  -h, --help                display help for command

License

MIT

Keywords

console-table

FAQs

Package last updated on 11 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.