{"id":18320583,"url":"https://github.com/lukasbach/table-log","last_synced_at":"2025-10-26T08:39:23.539Z","repository":{"id":65513854,"uuid":"363255365","full_name":"lukasbach/table-log","owner":"lukasbach","description":"CLI logging utility that logs lines as vertically aligned tabular data","archived":false,"fork":false,"pushed_at":"2021-04-30T20:53:36.000Z","size":603,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T09:50:15.045Z","etag":null,"topics":["cli","ink","log","logging","table","tabular","typed","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukasbach.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-30T20:47:40.000Z","updated_at":"2021-04-30T20:54:02.000Z","dependencies_parsed_at":"2023-01-26T21:01:23.214Z","dependency_job_id":null,"html_url":"https://github.com/lukasbach/table-log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Ftable-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Ftable-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Ftable-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Ftable-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukasbach","download_url":"https://codeload.github.com/lukasbach/table-log/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054778,"owners_count":21040060,"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","ink","log","logging","table","tabular","typed","typescript"],"created_at":"2024-11-05T18:16:46.631Z","updated_at":"2025-10-16T17:59:52.005Z","avatar_url":"https://github.com/lukasbach.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `table-log`\n\n\u003e NPM utility tool to log lines as vertically aligned tabular data.\n\n![Demo](demo/demo-no-border.gif)\n\n## Get Started\n\nInstall the tool via `yarn add table-log` or `npm i table-log --save`. Then import\nthe utility via\n\n```typescript\nimport { CliTable } from 'table-log';\n```\n\nThen, initialize a new table with `table = CliTable.createNoBorderTable()`,\nand invoke `table.log(...lines)` to log a new line. The table is automatically adjusted\nwhenever a new longest cell is logged.\n\nComplete example:\n\n```typescript\nimport { CliTable } from 'table-log';\n\nconst table = CliTable.createNoBorderTable({\n  // Optional column alignments\n  colAligns: ['left', 'right', 'left', 'right'],\n  \n  // Optional maximum column widths\n  colWidths: [undefined, undefined, 35, undefined]\n});\n\ntable.log('Received', 'GET', '/users/obi-wan-kenobi', '(352ms)');\ntable.log('Received', 'GET', '/users/vader', '(241ms)');\ntable.log('Received', 'POST', '/lightsabers/red/vader', '(890ms)');\ntable.log('Received', 'POST', '/lightsabers/blue/obi-wan-kenobi', '(937ms)');\ntable.log('Received', 'OPTIONS', '/lightsabers/new', '(125ms)');\ntable.log('Received', 'PUT', '/lightsabers/new', '(11,335ms)');\ntable.log('Received', 'GET', '/users/yoda', '(452ms)');\ntable.log('Received', 'POST', '/lightsabers/green/yoda', '(676ms)');\n\n// There may also pass some time between renders\nawait new Promise(r =\u003e setTimeout(r, 2000));\n\ntable.log('Received', 'GET', '/lightsabers/green/yoda/handle/material', '(124ms)');\n\ntable.unmount();\n\nconsole.log(\"Table unmounted!\");\n```\n\nYou can also create a table with a border, by invoking `CliTable.createSingleBorderTable()`\nor `CliTable.createDoubleBorderTable()` instead of `CliTable.createNoBorderTable()`.\n\n![Demo](demo/demo-single-border.gif)\n![Demo](demo/demo-double-border.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasbach%2Ftable-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukasbach%2Ftable-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasbach%2Ftable-log/lists"}