An open API service indexing awesome lists of open source software.

https://github.com/ayonious/table-printer-cli

🦾 CLI to print table in terminal
https://github.com/ayonious/table-printer-cli

cli console console-application npmjs opensource opensource-library table tableview typescript

Last synced: about 1 year ago
JSON representation

🦾 CLI to print table in terminal

Awesome Lists containing this project

README

          

table-printer-cli


📟🍭Printing Pretty Tables on your terminal





codecov


npm version


install size




code style: prettier





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](https://www.npmjs.com/package/console-table-printer)

## Installation

### Using npm

```bash
npm install --global table-printer-cli
```

### Using yarn

```bash
yarn global add table-printer-cli
```

## Basic Example

Try this on your terminal.

```bash
ctp -i '[{ "id":3, "text":"like" }, {"id":4, "text":"tea"}]'
```

Output:

![Screenshot](https://cdn.jsdelivr.net/gh/ayonious/table-printer-cli@master/static-resources/quick-print.v3.png)

You can also pipe the input from stdin

```bash
echo '[{ "id":3, "text":"like" }, {"id":4, "text":"tea"}]' | ctp -s
```

## Detailed usage

```text
Usage: ctp [options]

Options:
-i, --input input string
-s, --stdin read input from stdin
-h, --help display help for command
```

## License

[MIT](https://github.com/ayonious/table-printer-cli/blob/master/LICENSE)