{"id":13447060,"url":"https://github.com/cli-table/cli-table3","last_synced_at":"2026-01-14T03:33:35.317Z","repository":{"id":37377809,"uuid":"136803521","full_name":"cli-table/cli-table3","owner":"cli-table","description":"Pretty unicode tables for the command line","archived":false,"fork":false,"pushed_at":"2024-11-21T06:44:43.000Z","size":915,"stargazers_count":596,"open_issues_count":25,"forks_count":48,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-24T19:46:25.472Z","etag":null,"topics":["cli","nodejs","tables"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cli-table.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-10T11:36:22.000Z","updated_at":"2025-12-20T14:14:58.000Z","dependencies_parsed_at":"2024-04-23T21:10:20.517Z","dependency_job_id":"3586b608-5281-4fa6-b8d4-b1d5c3694c16","html_url":"https://github.com/cli-table/cli-table3","commit_stats":{"total_commits":364,"total_committers":26,"mean_commits":14.0,"dds":0.6758241758241759,"last_synced_commit":"9577efd51114e61fb035b7cc493adf0c0dc7921b"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/cli-table/cli-table3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cli-table%2Fcli-table3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cli-table%2Fcli-table3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cli-table%2Fcli-table3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cli-table%2Fcli-table3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cli-table","download_url":"https://codeload.github.com/cli-table/cli-table3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cli-table%2Fcli-table3/sbom","scorecard":{"id":291465,"data":{"date":"2025-08-11","repo":{"name":"github.com/cli-table/cli-table3","commit":"52d57d9ea280345000e695c5fa766fc98b8b90f1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 7/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/cli-table/cli-table3/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/cli-table/cli-table3/test.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"36 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-29xr-v42j-r956","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T18:20:37.767Z","repository_id":37377809,"created_at":"2025-08-17T18:20:37.767Z","updated_at":"2025-08-17T18:20:37.767Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28024596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","nodejs","tables"],"created_at":"2024-07-31T05:01:07.134Z","updated_at":"2026-01-14T03:33:35.286Z","avatar_url":"https://github.com/cli-table.png","language":"JavaScript","readme":"cli-table3 \n===============================================================================\n\n[![npm version](https://img.shields.io/npm/v/cli-table3.svg)](https://www.npmjs.com/package/cli-table3)\n[![Build Status](https://github.com/cli-table/cli-table3/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/cli-table/cli-table3/actions/workflows/test.yml)\n\nThis utility allows you to render unicode-aided tables on the command line from\nyour node.js scripts.\n\n`cli-table3` is based on (and api compatible with) the original [cli-table](https://github.com/Automattic/cli-table),\nand [cli-table2](https://github.com/jamestalmage/cli-table2), which are both\nunmaintained. `cli-table3` includes all the additional features from\n`cli-table2`.\n\n![Screenshot](https://i.imgur.com/sYq4T.png)\n\n## Features not in the original cli-table\n\n- Ability to make cells span columns and/or rows.\n- Ability to set custom styles per cell (border characters/colors, padding, etc).\n- Vertical alignment (top, bottom, center).\n- [Word wrapping options](./basic-usage.md#set-wordwrap-to-true-to-wrap-text-on-word-boundaries).\n- More robust truncation of cell text that contains ansi color characters.\n- Better handling of text color that spans multiple lines.\n- API compatible with the original cli-table.\n- Exhaustive test suite including the entire original cli-table test suite.\n- Lots of examples auto-generated from the tests ([basic](https://github.com/cli-table/cli-table3/blob/master/basic-usage.md), [advanced](https://github.com/cli-table/cli-table3/blob/master/advanced-usage.md)).\n\n## Features\n\n- Customizable characters that constitute the table.\n- Color/background styling in the header through\n  [\u003cs\u003ecolors.js\u003c/s\u003e](https://github.com/marak/colors.js)\n  [@colors/colors](https://github.com/DABH/colors.js)\n- Column width customization\n- Text truncation based on predefined widths\n- Text alignment (left, right, center)\n- Padding (left, right)\n- Easy-to-use API\n\n## Installation\n\n```bash\nnpm install cli-table3\n```\n\n## How to use\n\nA portion of the unit test suite is used to generate examples:\n- [basic-usage](https://github.com/cli-table/cli-table3/blob/master/basic-usage.md) - covers basic uses.\n- [advanced](https://github.com/cli-table/cli-table3/blob/master/advanced-usage.md) - covers using the new column and row span features.\n\nThis package is api compatible with the original [cli-table](https://github.com/Automattic/cli-table).\nSo all the original documentation still applies (copied below).\n\n### Horizontal Tables\n```javascript\nvar Table = require('cli-table3');\n\n// instantiate\nvar table = new Table({\n    head: ['TH 1 label', 'TH 2 label']\n  , colWidths: [100, 200]\n});\n\n// table is an Array, so you can `push`, `unshift`, `splice` and friends\ntable.push(\n    ['First value', 'Second value']\n  , ['First value', 'Second value']\n);\n\nconsole.log(table.toString());\n```\n\n### Vertical Tables\n```javascript\nvar Table = require('cli-table3');\nvar table = new Table();\n\ntable.push(\n    { 'Some key': 'Some value' }\n  , { 'Another key': 'Another value' }\n);\n\nconsole.log(table.toString());\n```\n### Cross Tables\nCross tables are very similar to vertical tables, with two key differences:\n\n1. They require a `head` setting when instantiated that has an empty string as the first header\n2. The individual rows take the general form of { \"Header\": [\"Row\", \"Values\"] }\n\n```javascript\nvar Table = require('cli-table3');\nvar table = new Table({ head: [\"\", \"Top Header 1\", \"Top Header 2\"] });\n\ntable.push(\n    { 'Left Header 1': ['Value Row 1 Col 1', 'Value Row 1 Col 2'] }\n  , { 'Left Header 2': ['Value Row 2 Col 1', 'Value Row 2 Col 2'] }\n);\n\nconsole.log(table.toString());\n```\n\n### Custom styles\nThe ```chars``` property controls how the table is drawn:\n```javascript\nvar table = new Table({\n  chars: { 'top': '═' , 'top-mid': '╤' , 'top-left': '╔' , 'top-right': '╗'\n         , 'bottom': '═' , 'bottom-mid': '╧' , 'bottom-left': '╚' , 'bottom-right': '╝'\n         , 'left': '║' , 'left-mid': '╟' , 'mid': '─' , 'mid-mid': '┼'\n         , 'right': '║' , 'right-mid': '╢' , 'middle': '│' }\n});\n\ntable.push(\n    ['foo', 'bar', 'baz']\n  , ['frob', 'bar', 'quuz']\n);\n\nconsole.log(table.toString());\n// Outputs:\n//\n//╔══════╤═════╤══════╗\n//║ foo  │ bar │ baz  ║\n//╟──────┼─────┼──────╢\n//║ frob │ bar │ quuz ║\n//╚══════╧═════╧══════╝\n```\n\nEmpty decoration lines will be skipped, to avoid vertical separator rows just\nset the 'mid', 'left-mid', 'mid-mid', 'right-mid' to the empty string:\n```javascript\nvar table = new Table({ chars: {'mid': '', 'left-mid': '', 'mid-mid': '', 'right-mid': ''} });\ntable.push(\n    ['foo', 'bar', 'baz']\n  , ['frobnicate', 'bar', 'quuz']\n);\n\nconsole.log(table.toString());\n// Outputs: (note the lack of the horizontal line between rows)\n//┌────────────┬─────┬──────┐\n//│ foo        │ bar │ baz  │\n//│ frobnicate │ bar │ quuz │\n//└────────────┴─────┴──────┘\n```\n\nBy setting all chars to empty with the exception of 'middle' being set to a\nsingle space and by setting padding to zero, it's possible to get the most\ncompact layout with no decorations:\n```javascript\nvar table = new Table({\n  chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': ''\n         , 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': ''\n         , 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': ''\n         , 'right': '' , 'right-mid': '' , 'middle': ' ' },\n  style: { 'padding-left': 0, 'padding-right': 0 }\n});\n\ntable.push(\n    ['foo', 'bar', 'baz']\n  , ['frobnicate', 'bar', 'quuz']\n);\n\nconsole.log(table.toString());\n// Outputs:\n//foo        bar baz\n//frobnicate bar quuz\n```\n\n## Debugging\n\nLater versions of cli-table3 supporting debugging your table data.\n\nEnable and use debugging:\n\n```\nvar table = new Table({ debug: 1 });\ntable.push([{}, {},}); // etc.\n\nconsole.log(table.toString());\ntable.messages.forEach((message) =\u003e console.log(message));\n```\n\nIf you are rendering multiple tables with debugging on run `Table.reset()` after\nrendering each table.\n\n## Build Targets\n\nClone the repository and run `yarn install` to install all its submodules, then run one of the following commands:\n\n###### Run the tests with coverage reports.\n```bash\n$ yarn test:coverage\n```\n\n###### Run the tests every time a file changes.\n```bash\n$ yarn test:watch\n```\n\n###### Update the documentation.\n```bash\n$ yarn docs\n```\n\n## Credits\n\n- James Talmage - author \u0026lt;james.talmage@jrtechnical.com\u0026gt; ([jamestalmage](https://github.com/jamestalmage))\n- Guillermo Rauch - author of the original cli-table \u0026lt;guillermo@learnboost.com\u0026gt; ([Rauchg](https://github.com/rauchg))\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 James Talmage \u0026lt;james.talmage@jrtechnical.com\u0026gt;\n\nOriginal cli-table code/documentation: Copyright (c) 2010 LearnBoost \u0026lt;dev@learnboost.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":["Packages","JavaScript","Repository","包","Command-line utilities","目录","Output","Node.js / JavaScript 🟨"],"sub_categories":["Command-line utilities","Command-line Utilities","命令行工具","命令行实用工具"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcli-table%2Fcli-table3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcli-table%2Fcli-table3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcli-table%2Fcli-table3/lists"}