{"id":17398454,"url":"https://github.com/vweevers/tabular-cli","last_synced_at":"2025-10-25T18:39:44.359Z","repository":{"id":33016152,"uuid":"36650413","full_name":"vweevers/tabular-cli","owner":"vweevers","description":"Detects, normalizes and converts tabular data (spreadsheets, dsv or json)","archived":false,"fork":false,"pushed_at":"2015-06-01T14:08:43.000Z","size":312,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T21:39:07.684Z","etag":null,"topics":[],"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/vweevers.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":"2015-06-01T09:19:15.000Z","updated_at":"2018-02-16T11:18:04.000Z","dependencies_parsed_at":"2022-08-07T19:17:14.607Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/tabular-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ftabular-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ftabular-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ftabular-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ftabular-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/tabular-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246237436,"owners_count":20745348,"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":[],"created_at":"2024-10-16T14:56:43.797Z","updated_at":"2025-10-17T23:01:57.485Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tabular-cli\r\n\r\n**[Detects and normalizes tabular data](https://www.npmjs.com/package/tabular-stream) (dsv, json, ndjson, xls, xlsx, xml, ods or sylk) and converts it to [dsv, json, ndjson, or ssejson](https://www.npmjs.com/package/format-data). Spreadsheets and DSV must have a header.**\r\n\r\n[![npm status](http://img.shields.io/npm/v/tabular-cli.svg?style=flat-square)](https://www.npmjs.org/package/tabular-cli) [![Travis build status](https://img.shields.io/travis/vweevers/tabular-cli.svg?style=flat-square\u0026label=travis)](http://travis-ci.org/vweevers/tabular-cli) [![AppVeyor build status](https://img.shields.io/appveyor/ci/vweevers/tabular-cli.svg?style=flat-square\u0026label=appveyor)](https://ci.appveyor.com/project/vweevers/tabular-cli) [![Dependency status](https://img.shields.io/david/vweevers/tabular-cli.svg?style=flat-square)](https://david-dm.org/vweevers/tabular-cli)\r\n\r\n## examples\r\n\r\n**To CSV**\r\n\r\n```\r\nnpm i tabular-cli -g\r\ntabular -o csv \u003c input.xlsx \u003e output.csv\r\n```\r\n\r\n**To SSE JSON with snake_case keys**\r\n\r\n```\r\nnpm i snake-case\r\ntabular -o sse -k snake-case --event status \u003c status.tsv \u003e\u003e events.sse\r\n```\r\n\r\n**To JSON in the form of `{ \"rows\": .. }` with missing values set to `null`**\r\n\r\n```\r\ntabular -o json --style object -d null \u003c input.ndjson \u003e output.json\r\n```\r\n\r\n## options\r\n\r\n#### `--keys module` (shorthand `-k`)\r\n \r\nAn optional function to [transform and/or filter keys](https://www.npmjs.com/package/map-tabular-keys), passed as a module name or location - relative to the current working directory or something installed alongside tabular-cli. For example: `tabular -k snake-case` or `-k camel-case`. Everything at [change-case](https://www.npmjs.com/package/change-case) works well.\r\n\r\n#### `--output format` (shorthand `-o`)\r\n\r\nOutput format, one of:\r\n\r\n* json: via [format-data/json](https://github.com/finnp/format-data/blob/master/json.js) with additional options `style`, `prefix`, `separator` and `suffix`\r\n* ndjson: via [ndjson](https://npmjs.com/package/ndjson)\r\n* dsv: via [csv-write-stream](https://npmjs.com/package/csv-write-stream) with additional options `separator` and `no-headers` (a boolean flag)\r\n* csv: shorthand for `-o dsv --separator ,`\r\n* tsv: shorthand for `-o dsv --separator \\t`\r\n* sse: [ssejson](https://npmjs.com/package/ssejson) with additional option `event`\r\n\r\nThe **default is json.**\r\n\r\n#### `--default value` (shorthand `-d`)\r\n\r\nFallback value to use for `null` and `undefined` values. **Default is `0`**. The CLI app coerces `null`, `undefined`, `true`, `false` or any number to a javascript type.\r\n\r\n#### `--version`\r\n\r\nPrint version and exit.\r\n\r\n#### `--help`\r\n\r\nOpen this readme in a browser and exit.\r\n\r\n## install\r\n\r\nWith [npm](https://npmjs.org) do:\r\n\r\n```\r\nnpm install tabular-cli -g\r\n```\r\n\r\n## license\r\n\r\n[MIT](http://opensource.org/licenses/MIT) © [Vincent Weevers](http://vincentweevers.nl). Test data © Statistics Netherlands, The Hague/Heerlen.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Ftabular-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Ftabular-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Ftabular-cli/lists"}