{"id":16805930,"url":"https://github.com/haltcase/tablemark-cli","last_synced_at":"2025-09-04T21:33:21.006Z","repository":{"id":53743512,"uuid":"79746218","full_name":"haltcase/tablemark-cli","owner":"haltcase","description":"Generate markdown tables from JSON data at the command line.","archived":false,"fork":false,"pushed_at":"2022-04-30T04:12:25.000Z","size":79,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T05:16:49.673Z","etag":null,"topics":["array","cli","command-line","convert","generate","hacktoberfest","json","json-data","markdown","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/haltcase.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}},"created_at":"2017-01-22T21:15:36.000Z","updated_at":"2024-11-06T13:00:37.000Z","dependencies_parsed_at":"2022-09-25T15:01:27.955Z","dependency_job_id":null,"html_url":"https://github.com/haltcase/tablemark-cli","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltcase%2Ftablemark-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltcase%2Ftablemark-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltcase%2Ftablemark-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haltcase%2Ftablemark-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haltcase","download_url":"https://codeload.github.com/haltcase/tablemark-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231999638,"owners_count":18458178,"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":["array","cli","command-line","convert","generate","hacktoberfest","json","json-data","markdown","table"],"created_at":"2024-10-13T09:49:39.230Z","updated_at":"2024-12-31T14:46:38.442Z","avatar_url":"https://github.com/haltcase.png","language":"TypeScript","readme":"# tablemark-cli \u0026middot; [![Version](https://flat.badgen.net/npm/v/tablemark-cli)](https://www.npmjs.com/package/tablemark-cli) [![License](https://flat.badgen.net/npm/license/tablemark-cli)](https://www.npmjs.com/package/tablemark-cli) [![Travis CI](https://flat.badgen.net/travis/haltcase/tablemark-cli)](https://travis-ci.org/haltcase/tablemark-cli) [![JavaScript Standard Style](https://flat.badgen.net/badge/code%20style/standard/green)](https://standardjs.com)\n\n\u003e Generate markdown tables from JSON data at the command line.\n\nRender JSON input data as a markdown table from the command line,\npowered by the [`tablemark`](https://github.com/haltcase/tablemark) module.\n\n## features\n\nThis utility supports:\n\n* JSON file input from a provided path\n* data piped from `stdin`\n* NDJSON formatted data ([newline delimited JSON](http://ndjson.org/))\n\n## installation\n\n```sh\nyarn global add tablemark-cli\n\n# or\n\nnpm install --global tablemark-cli\n```\n\n## usage\n\n```sh\ntablemark 3.0.0\n\u003e Generate markdown tables from JSON data at the command line.\n\nARGUMENTS:\n  \u003cinput-file\u003e - Path to input file containing JSON data (use - for stdin)\n\nOPTIONS:\n  --column \u003cstr\u003e, -c=\u003cstr\u003e    - Custom column name, can be used multiple times (default: infer from object keys)\n  --align \u003cvalue\u003e, -a=\u003cvalue\u003e - Custom alignments, can be used multiple times, applied in order to columns (default: left)\n  --line-ending, -e \u003cstr\u003e     - End-of-line string (default: \\n) [optional]\n  --wrap-width, -w \u003cnumber\u003e   - Width at which to hard wrap cell content [default: Infinity]\n\nFLAGS:\n  --no-case-headers, -N   - Disable automatic sentence casing of inferred column names [default: false]\n  --wrap-with-gutters, -G - Add '|' characters to wrapped rows [default: false]\n  --help, -h              - show help\n  --version, -v           - print the version\n```\n\nTo apply the `align` and `column` options to multiple columns, supply the flag\nmultiple times, like this:\n\n```sh\ntablemark input.json \u003e output.md -a left -a center -a right\n```\n\n... which will align the first three columns left, center, and right respectively.\n\n## stdin\n\nIn bash-like shells:\n\n```sh\n# stdin -\u003e stdout\necho '{ \"one\": 1 }' | tablemark -\n\n# redirect input file content into stdin, then to a file\ntablemark - \u003c input.json \u003e output.md\n```\n\nIn PowerShell:\n\n```powershell\n# stdin -\u003e stdout\n'{ \"one\": 1 }' | tablemark -\n\n# redirect input file content into stdin, then to a file\ncat input.json | tablemark - \u003e output.md\n```\n\n## ndjson\n\n[NDJSON](http://ndjson.org) is a form of JSON that delimits multiple JSON objects by newlines:\n\n```js\n{\"name\":\"trilogy\",\"repo\":\"[haltcase/trilogy](https://github.com/haltcase/trilogy)\",\"desc\":\"No-hassle SQLite with type-casting schema models and support for native \u0026 pure JS backends.\"}\n{\"name\":\"strat\",\"repo\":\"[haltcase/strat](https://github.com/haltcase/strat)\",\"desc\":\"Functional-ish JavaScript string formatting, with inspirations from Python.\"}\n{\"name\":\"tablemark-cli\",\"repo\":\"[haltcase/tablemark-cli](https://github.com/haltcase/tablemark-cli)\",\"desc\":\"Generate markdown tables from JSON data at the command line.\"}\n```\n\nThis input from a file or stdin is supported just as if it were\na JSON compatible array:\n\n```sh\ntablemark input.ndjson \u003e output.md\n```\n\n## see also\n\n* [`tablemark`](https://github.com/haltcase/tablemark) \u0026ndash; the module used by this utility\n\n## contributing\n\nSearch the [issues](https://github.com/haltcase/tablemark-cli) if you come\nacross any trouble, open a new one if it hasn't been posted, or, if you're\nable, open a [pull request](https://help.github.com/articles/about-pull-requests/).\nContributions of any kind are welcome in this project.\n\nThe following people have already contributed their time and effort:\n\n* Thomas Jensen (**[@tjconcept](https://github.com/tjconcept)**)\n\nThank you!\n\n## license\n\nMIT © Bo Lingen / haltcase\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaltcase%2Ftablemark-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaltcase%2Ftablemark-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaltcase%2Ftablemark-cli/lists"}