GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - console-table-printer/table-printer-cli: 🦾 CLI to print table in terminal

BranchesTags
Open more actions menu

Latest commit

 

History

371 Commits
371 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
static-resources
static-resources
 
 
test
test
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.huskyrc.json
.huskyrc.json
 
 
.npmignore
.npmignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
.releaserc.json
.releaserc.json
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
PULL_REQUEST_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
 
 
README.md
README.md
 
 
codecov.yml
codecov.yml
 
 
index.test.ts
index.test.ts
 
 
index.ts
index.ts
 
 
jest.config.js
jest.config.js
 
 
jestconfig.json
jestconfig.json
 
 
package.json
package.json
 
 
renovate.json
renovate.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

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:
  -v, --version              output the current version
  -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

About

🦾 CLI to print table in terminal

Topics

cliconsoleconsole-applicationnpmjsopensourceopensource-librarytabletableviewtypescript

Resources

Readme
MIT license
Activity
Custom properties

Stars

2 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.