{"id":16347558,"url":"https://github.com/privatenumber/cli-simple-table","last_synced_at":"2025-03-23T00:32:55.172Z","repository":{"id":45304765,"uuid":"270933042","full_name":"privatenumber/cli-simple-table","owner":"privatenumber","description":"Simple CLI table for simple people","archived":false,"fork":false,"pushed_at":"2022-04-01T15:33:32.000Z","size":951,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-03-01T19:51:31.899Z","etag":null,"topics":["cli","minimal","simple","table"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/privatenumber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-09T07:27:55.000Z","updated_at":"2024-10-24T16:47:58.000Z","dependencies_parsed_at":"2022-08-04T13:30:15.081Z","dependency_job_id":null,"html_url":"https://github.com/privatenumber/cli-simple-table","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcli-simple-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcli-simple-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcli-simple-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fcli-simple-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/privatenumber","download_url":"https://codeload.github.com/privatenumber/cli-simple-table/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244257279,"owners_count":20424130,"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","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","minimal","simple","table"],"created_at":"2024-10-11T00:43:38.533Z","updated_at":"2025-03-23T00:32:54.834Z","avatar_url":"https://github.com/privatenumber.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/.github/screenshot-1.png\" width=\"70%\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://npm.im/cli-simple-table\"\u003e\u003cimg src=\"https://badgen.net/npm/v/cli-simple-table\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://npm.im/cli-simple-table\"\u003e\u003cimg src=\"https://badgen.net/npm/dm/cli-simple-table\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagephobia.now.sh/result?p=cli-simple-table\"\u003e\u003cimg src=\"https://packagephobia.now.sh/badge?p=cli-simple-table\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ci\u003eSimple CLI table for simple people\u003c/i\u003e\n\u003c/p\u003e\n\n### Install\n```sh\nnpm i cli-simple-table\n```\n\n### Basic usage\n```js\nimport SimpleTable from 'cli-simple-table'\nimport chalk from 'chalk'\n\nconst table = new SimpleTable()\n\ntable.header('Name', 'Emoji')\n\ntable.row(chalk.red('Squid'), '🦑')\ntable.row(chalk.green('Frog'), '🐸')\ntable.row(chalk.yellow('Tiger'), '🐯')\ntable.row(chalk.blue('Whale'), '🐳')\ntable.row(chalk.magenta('Unicorn'), '🦄')\ntable.row(chalk.cyan('Dolphin'), '🐬')\ntable.row(chalk.white('Panda'), '🐼')\n\nconsole.log(table.toString())\n```\n\n\n### Alignment\n```js\nconst table = new SimpleTable()\n\ntable.header(\n    'Name',\n    {\n        text: 'Age',\n        align: 'right'\n    }\n)\n\ntable.row('Steve', 26)\n\nconsole.log(table.toString())\n```\n\n\n### Max column width\n```js\nconst table = new SimpleTable()\n\ntable.header(\n    {\n        text: 'Long text',\n        maxWidth: 25\n    },\n    {\n        text: 'Long long text',\n        maxWidth: 25\n    }\n)\n\ntable.row('Truncates really really long text', chalk.magenta('Colored long long text too'))\n\nconsole.log(table.toString())\n```\n\n\n## Options\n\n- `columnPadding` `\u003cNumber\u003e` (`10`) - Number of characters to pad the column content with\n\n- `headerSeparator` `\u003cNumber\u003e` (`1`) - Number of lines that separate the header from the table body\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fcli-simple-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprivatenumber%2Fcli-simple-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fcli-simple-table/lists"}