{"id":13583149,"url":"https://github.com/Yord/pxi","last_synced_at":"2025-04-06T18:32:00.335Z","repository":{"id":57135990,"uuid":"224534563","full_name":"Yord/pxi","owner":"Yord","description":"🧚 pxi (pixie) is a small, fast, and magical command-line data processor similar to jq, mlr, and awk.","archived":false,"fork":false,"pushed_at":"2020-08-24T15:43:17.000Z","size":20540,"stargazers_count":266,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-11T13:32:46.881Z","etag":null,"topics":["csv","data-processing","deserializer","dsv","json","marshaller","parser","pixie","pxi","serializer","ssv","tsv"],"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/Yord.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-27T23:33:51.000Z","updated_at":"2024-04-04T16:31:58.000Z","dependencies_parsed_at":"2022-09-03T15:01:46.896Z","dependency_job_id":null,"html_url":"https://github.com/Yord/pxi","commit_stats":null,"previous_names":["yord/pf"],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fpxi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fpxi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fpxi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fpxi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yord","download_url":"https://codeload.github.com/Yord/pxi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531063,"owners_count":20953885,"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":["csv","data-processing","deserializer","dsv","json","marshaller","parser","pixie","pxi","serializer","ssv","tsv"],"created_at":"2024-08-01T15:03:17.205Z","updated_at":"2025-04-06T18:31:55.325Z","avatar_url":"https://github.com/Yord.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"![pxi teaser][teaser]\n\n🧚`pxi` (pixie) is a small, fast, and magical command-line data processor similar to `jq`, `mlr`, and `awk`.\n\n[![node version][shield-node]][node]\n[![npm version][shield-npm]][npm-package]\n[![license][shield-license]][license]\n[![PRs Welcome][shield-prs]][contribute]\n[![linux unit tests status][shield-unit-tests-linux]][actions]\n[![macos unit tests status][shield-unit-tests-macos]][actions]\n[![windows unit tests status][shield-unit-tests-windows]][actions]\n\n## Installation\n\nInstallation is done using [`npm`][npm-install].\n\n```bash\n$ npm i -g pxi\n```\n\nTry `pxi --help` to see if the installation was successful.\n\n## Features\n\n+   🧚 **Small:** Pixie [does one thing and does it well][unix-philosophy] (processing data with JavaScript).\n+   :zap: **Fast:** `pxi` is as fast as `gawk`, 3x faster than `jq` and `mlr`, and 15x faster than `fx`.\n+   :sparkles: **Magical:** It is trivial to write your own ~~spells~~ *plugins*.\n+   :smile_cat: **Playful:** Opt-in to more data formats by installing plugins.\n+   :tada: **Versatile:** Use Ramda, Lodash and any other JavaScript library to process data on the command-line.\n+   :heart: **Loving:** Pixie is made with love and encourages a positive and welcoming environment.\n\n## Getting Started\n\n\u003cdetails open\u003e\n\u003csummary\u003e\nPixie reads in big structured text files, transforms them with JavaScript functions, and writes them back to disk.\nThe usage examples in this section are based on the following large JSONL file.\nInspect the examples by clicking on them!\n\n\u003cp\u003e\n\n```bash\n$ head -5 2019.jsonl # 2.6GB, 31,536,000 lines\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\n```json\n{\"time\":1546300800,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":0}\n{\"time\":1546300801,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":1}\n{\"time\":1546300802,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":2}\n{\"time\":1546300803,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":3}\n{\"time\":1546300804,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":4}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nExecute any JavaScript function:\n\n\u003cp\u003e\n\n```bash\n$ pxi \"json =\u003e json.time\" \u003c 2019.jsonl\n$ pxi \"({time}) =\u003e time\" \u003c 2019.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nYou may use JavaScript arrow functions, destructuring, spreading,\nand any other feature of your current NodeJS version.\n\n```json\n1546300800\n1546300801\n1546300802\n1546300803\n1546300804\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nConvert between JSON, CSV, SSV, and TSV:\n\n\u003cp\u003e\n\n```bash\n$ pxi --from json --to csv \u003c 2019.jsonl \u003e 2019.csv\n$ pxi --deserializer json --serializer csv \u003c 2019.jsonl \u003e 2019.csv\n$ pxi -d json -s csv \u003c 2019.jsonl \u003e 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nUsers may extend pixie with (third-party) plugins for many more data formats.\nSee the [`.pxi` module section][pxi-module] on how to do that and the [plugins](#plugins) section for a list.\nPixie deserializes data into JSON, applies functions, and serializes JSON to another format.\nIt offers the telling aliases `--from` and `--to` alternative to `--deserializer` and `--serializer`.\n\n```json\ntime,year,month,day,hours,minutes,seconds\n1546300800,2019,1,1,0,0,0\n1546300801,2019,1,1,0,0,1\n1546300802,2019,1,1,0,0,2\n1546300803,2019,1,1,0,0,3\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nUse Ramda, Lodash or any other JavaScript library:\n\n\u003cp\u003e\n\n```bash\n$ pxi \"o(obj =\u003e _.omit(obj, ['seconds']), evolve({time: parseInt}))\" --from csv \u003c 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie may use any JavaScript library, including Ramda and Lodash.\nRead the [`.pxi` module section][pxi-module] to learn more.\n\n```json\n{\"time\":1546300800,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\"}\n{\"time\":1546300801,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\"}\n{\"time\":1546300802,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\"}\n{\"time\":1546300803,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\"}\n{\"time\":1546300804,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nProcess data streams from REST APIs and other sources and pipe pixie's output to other commands:\n\n\u003cp\u003e\n\n```bash\n$ curl -s \"https://swapi.co/api/films/\" |\n  pxi 'json =\u003e json.results' --with flatMap --keep '[\"episode_id\", \"title\"]' |\n  sort\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie follows the [unix philosophy][unix-philosophy]:\nIt does one thing (processing structured data), and does it well.\nIt is written to work together with other programs and it handles text streams because that is a universal interface.\n\n```json\n{\"episode_id\":1,\"title\":\"The Phantom Menace\"}\n{\"episode_id\":2,\"title\":\"Attack of the Clones\"}\n{\"episode_id\":3,\"title\":\"Revenge of the Sith\"}\n{\"episode_id\":4,\"title\":\"A New Hope\"}\n{\"episode_id\":5,\"title\":\"The Empire Strikes Back\"}\n{\"episode_id\":6,\"title\":\"Return of the Jedi\"}\n{\"episode_id\":7,\"title\":\"The Force Awakens\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nUse pixie's ssv deserializer to work with command line output:\n\n\u003cp\u003e\n\n```bash\n$ ls -ahl / | pxi '([,,,,size,,,,file]) =\u003e ({size, file})' --from ssv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie's space-separated values deserializer makes it very easy to work with the output of other commands.\nArray destructuring is especially helpful in this area.\n\n```json\n{\"size\":\"704B\",\"file\":\".\"}\n{\"size\":\"704B\",\"file\":\"..\"}\n{\"size\":\"1.2K\",\"file\":\"bin\"}\n{\"size\":\"4.4K\",\"file\":\"dev\"}\n{\"size\":\"11B\",\"file\":\"etc\"}\n{\"size\":\"25B\",\"file\":\"home\"}\n{\"size\":\"64B\",\"file\":\"opt\"}\n{\"size\":\"192B\",\"file\":\"private\"}\n{\"size\":\"2.0K\",\"file\":\"sbin\"}\n{\"size\":\"11B\",\"file\":\"tmp\"}\n{\"size\":\"352B\",\"file\":\"usr\"}\n{\"size\":\"11B\",\"file\":\"var\"}\n```\n\n\u003c/details\u003e\n\nSee the [usage](#usage) section below for more examples.\n\n### Introductory Blogposts\n\nFor a quick start, read the following blog posts:\n\n+   [Exploring Large Data Files with pxi][post-exploring-large-data-files-with-pxi]\n+   [How I Tamed a Pixie][post-how-tamed-pixie]\n\n## 🧚 Pixie\n\nPixie's philosophy is to provide a small, extensible frame\nfor processing large files and streams with JavaScript functions.\nDifferent data formats are supported through plugins.\nJSON, CSV, SSV, and TSV are supported by default, but users can customize their pixie\ninstallation by picking and choosing from more available (including third-party) plugins.\n\nPixie works its magic by chunking, deserializing, applying functions, and serializing data.\nExpressed in code, it works like this:\n\n```javascript\nfunction pxi (data) {                // Data is passed to pxi from stdin.\n  const chunks = chunk(data)         // The data is chunked.\n  const jsons  = deserialize(chunks) // The chunks are deserialized into JSON objects. \n  const jsons2 = apply(f, jsons)     // f is applied to each object and new JSON objects are returned.\n  const string = serialize(jsons2)   // The new objects are serialized to a string.\n  process.stdout.write(string)       // The string is written to stdout.\n}\n```\n\nFor example, chunking, deserializing, and serializing JSON is provided by the [`pxi-json`][pxi-json] plugin.\n\n### Plugins\n\nThe following plugins are available:\n\n|                            | Chunkers  | Deserializers              | Appliers                   | Serializers                | `pxi` |\n|----------------------------|-----------|----------------------------|----------------------------|----------------------------|:-----:|\n| [`pxi-dust`][pxi-dust]     | `line`    |                            | `map`, `flatMap`, `filter` | `string`                   |   ✓   |\n| [`pxi-json`][pxi-json]     | `jsonObj` | `json`                     |                            | `json`                     |   ✓   |\n| [`pxi-dsv`][pxi-dsv]       |           | `csv`, `tsv`, `ssv`, `dsv` |                            | `csv`, `tsv`, `ssv`, `dsv` |   ✓   |\n| [`pxi-sample`][pxi-sample] | `sample`  | `sample`                   | `sample`                   | `sample`                   |   ✕   |\n\nThe last column states which plugins come preinstalled in `pxi`.\nRefer to the `.pxi` Module section to see how to enable more plugins and how to develop plugins.\nNew experimental pixie plugins are developed i.a. in the [`pxi-sandbox`][pxi-sandbox] repository.\n\n### Performance\n\n`pxi` is very fast and beats several similar tools in [performance benchmarks][pxi-benchmarks].\nTimes are given in CPU time (seconds), wall-clock times may deviate by ± 1s.\nThe benchmarks were run on a 13\" MacBook Pro (2019) with a 2,8 GHz Quad-Core i7 and 16GB memory.\nFeel free to run the [benchmarks][pxi-benchmarks] on your own machine\nand if you do, please [open an issue][issues] to report your results!\n\n| [Benchmark][pxi-benchmarks] | Description                                   | `pxi` | `gawk` | `jq` | `mlr` | `fx` |\n|-----------------------------|-----------------------------------------------|------:|-------:|-----:|------:|-----:|\n| **JSON 1**                  | Select an attribute on small JSON objects     |   11s |    15s |  46s |     – | 284s |\n| **JSON 2**                  | Select an attribute on large JSON objects     |   20s |    20s |  97s |     – | 301s |\n| **JSON 3**                  | Pick a single attribute on small JSON objects |   15s |    21s |  68s |   91s | 368s |\n| **JSON 4**                  | Pick a single attribute on large JSON objects |   26s |    27s | 130s | 257s† | 420s |\n| **JSON to CSV 1**           | Convert a small JSON to CSV format            |   15s |      – |  77s |   60s |    – |\n| **JSON to CSV 2**           | Convert a large JSON to CSV format            |   38s |      – | 264s | 237s† |    – |\n| **CSV 1**                   | Select a column from a small csv file         |   11s |     8s |  37s |   23s |    – |\n| **CSV 2**                   | Select a column from a large csv file         |   19s |     9s |  66s |   72s |    – |\n| **CSV to JSON 1**           | Convert a small CSV to JSON format            |   15s |      – |    – |  120s |    – |\n| **CSV to JSON 2**           | Convert a large CSV to JSON format            |   42s |      – |    – |  352s |    – |\n\n† `mlr` appears to load the whole file instead of processing it in chunks if reading JSON.\nThis is why it fails on large input files.\nSo in these benchmarks, the first 20,000,000 lines are processed first, followed by the remaining 11,536,000 lines.\nThe times of both runs are summed up.\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\u003ccode\u003epxi\u003c/code\u003e and \u003ccode\u003egawk\u003c/code\u003e notably beat\n\u003ccode\u003ejq\u003c/code\u003e, \u003ccode\u003emlr\u003c/code\u003e, and \u003ccode\u003efx\u003c/code\u003e in every benchmark.\nHowever, due to its different data processing approach, \u003ccode\u003epxi\u003c/code\u003e is more versatile than \u003ccode\u003egawk\u003c/code\u003e\nand is e.g. able to transform data formats into another.\nFor a more detailed interpretation, open this box.\n\u003c/summary\u003e\n\u003cp\u003e\n\n`pxi` and `gawk` differ greatly in their approaches to transforming data:\nWhile `gawk` manipulates strings, `pxi` parses data according to a format, builds an internal JSON representation,\nmanipulates this JSON, and serializes it to a different format.\nSurprisingly, they perform equally well in the benchmarks,\nwith `pxi` being a little faster in JSON and `gawk` in CSV.\nHowever, the more attributes JSON objects have and the more columns CSV files have,\nthe faster `gawk` gets compared to `pxi`, because it does not need to build an internal data representation.\nOn the other hand, while `pxi` is able to perform complex format transformations,\n`gawk` is unable to do it because of its different approach.\n\n`jq` and `mlr` share `pxi`'s data transformation approach, but focus on different formats:\nWhile `jq` specializes in transforming JSON, `mlr`'s focus is CSV.\nAlthough `pxi` does not prefer one format over the other,\nit beats both tools in processing speed on their preferred formats.\n\n`fx` and `pxi` are very similar in that both are written in JavaScript and use JavaScript as their processing language.\nHowever, although `fx` specializes in just the JSON format, `pxi` is at least 15x faster in all benchmarks.\n\nAll tools differ in their memory needs.\nSince `pxi` and `fx` are written in an interpreted language, they need approx. 70 MB due to their runtime.\nSince `gawk` and `jq` are compiled binaries, they only need approx. 1MB.\n`mlr` needs the most memory (up to 11GB), since it appears to load the whole file before processing it in some cases.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Usage\n\n\u003cdetails open\u003e\n\u003csummary\u003e\nThe examples in this section are based on the following big JSONL file.\nInspect the examples by clicking on them!\n\n\u003cp\u003e\n\n```bash\n$ head -5 2019.jsonl # 2.6GB, 31,536,000 lines\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\n```json\n{\"time\":1546300800,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":0}\n{\"time\":1546300801,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":1}\n{\"time\":1546300802,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":2}\n{\"time\":1546300803,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":3}\n{\"time\":1546300804,\"year\":2019,\"month\":1,\"day\":1,\"hours\":0,\"minutes\":0,\"seconds\":4}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nSelect the time:\n\n\u003cp\u003e\n\n```bash\n$ pxi \"json =\u003e json.time\" \u003c 2019.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nGo ahead and use JavaScript's arrow functions.\n\n```json\n1546300800\n1546300801\n1546300802\n1546300803\n1546300804\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nSelect month and day:\n\n\u003cp\u003e\n\n```bash\n$ pxi '({month, day}) =\u003e ({month, day})' \u003c 2019.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nUse destructuring and spread syntax.\n\n```json\n{\"month\":1,\"day\":1}\n{\"month\":1,\"day\":1}\n{\"month\":1,\"day\":1}\n{\"month\":1,\"day\":1}\n{\"month\":1,\"day\":1}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nConvert JSON to CSV:\n\n\u003cp\u003e\n\n```bash\n$ pxi --from json --to csv \u003c 2019.jsonl \u003e 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie has deserializers (`--from`) and serializers (`--to`) for various data formats, including JSON and CSV.\nJSON is the default deserializer and serializer, so no need to type `--from json` and `--to json`.\n\n```json\ntime,year,month,day,hours,minutes,seconds\n1546300800,2019,1,1,0,0,0\n1546300801,2019,1,1,0,0,1\n1546300802,2019,1,1,0,0,2\n1546300803,2019,1,1,0,0,3\n1546300804,2019,1,1,0,0,4\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nConvert JSON to CSV, but keep only time and month:\n\n\u003cp\u003e\n\n```bash\n$ pxi '({time, month}) =\u003e [time, month]' --to csv \u003c 2019.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nSerializers can be freely combined with functions.\n\n```json\n1546300800,1\n1546300801,1\n1546300802,1\n1546300803,1\n1546300804,1\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nRename time to timestamp and convert CSV to TSV:\n\n\u003cp\u003e\n\n```bash\n$ pxi '({time, ...rest}) =\u003e ({timestamp: time, ...rest})' --from csv --to tsv \u003c 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nRead in CSV format.\nUse destructuring to select all attributes other than time.\nRename time to timestamp and keep all other attributes unchanged.\nWrite in TSV format.\n\n```json\ntimestamp       year    month   day     hours   minutes seconds\n1546300800      2019    1       1       0       0       0\n1546300801      2019    1       1       0       0       1\n1546300802      2019    1       1       0       0       2\n1546300803      2019    1       1       0       0       3\n1546300804      2019    1       1       0       0       4\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nConvert CSV to JSON:\n\n\u003cp\u003e\n\n```bash\n$ pxi --deserializer csv --serializer json \u003c 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\n`--from` and `--to` are aliases for `--deserializer` and `--serializer` that are used to convert between formats.\n\n```json\n{\"time\":\"1546300800\",\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"0\"}\n{\"time\":\"1546300801\",\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"1\"}\n{\"time\":\"1546300802\",\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"2\"}\n{\"time\":\"1546300803\",\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"3\"}\n{\"time\":\"1546300804\",\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"4\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nConvert CSV to JSON and cast time to integer:\n\n\u003cp\u003e\n\n```bash\n$ pxi '({time, ...rest}) =\u003e ({time: parseInt(time), ...rest})' -d csv \u003c 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nDeserializing from CSV does not automatically cast strings to other types.\nThis is intentional, since some use cases may need casting, and others don't.\nIf you need a key to be an integer, you need to explicitly transform it.\n\n```json\n{\"time\":1546300800,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"0\"}\n{\"time\":1546300801,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"1\"}\n{\"time\":1546300802,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"2\"}\n{\"time\":1546300803,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"3\"}\n{\"time\":1546300804,\"year\":\"2019\",\"month\":\"1\",\"day\":\"1\",\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"4\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nUse Ramda (or Lodash):\n\n\u003cp\u003e\n\n```bash\n$ pxi 'evolve({year: parseInt, month: parseInt, day: parseInt})' -d csv \u003c 2019.csv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie may use any JavaScript library, including Ramda and Lodash.\nThe [`.pxi` module section][pxi-module] tells you how to install them.\n\n```json\n{\"time\":\"1546300800\",\"year\":2019,\"month\":1,\"day\":1,\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"0\"}\n{\"time\":\"1546300801\",\"year\":2019,\"month\":1,\"day\":1,\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"1\"}\n{\"time\":\"1546300802\",\"year\":2019,\"month\":1,\"day\":1,\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"2\"}\n{\"time\":\"1546300803\",\"year\":2019,\"month\":1,\"day\":1,\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"3\"}\n{\"time\":\"1546300804\",\"year\":2019,\"month\":1,\"day\":1,\"hours\":\"0\",\"minutes\":\"0\",\"seconds\":\"4\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nSelect only May the 4th:\n\n\u003cp\u003e\n\n```bash\n$ pxi '({month, day}) =\u003e month == 5 \u0026\u0026 day == 4' --applier filter \u003c 2019.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nAppliers determine how functions are applied.\nThe default applier is `map`, which applies the function to each element.\nHere, we use the `filter` applier that keeps only elements for which the function yields true.\n\n```json\n{\"time\":1556928000,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":0}\n{\"time\":1556928001,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":1}\n{\"time\":1556928002,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":2}\n{\"time\":1556928003,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":3}\n{\"time\":1556928004,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":4}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nUse more than one function:\n\n\u003cp\u003e\n\n```bash\n$ pxi '({month}) =\u003e month == 5' '({day}) =\u003e day == 4' -a filter \u003c 2019.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nFunctions are applied in the given order on an element to element basis.\nIn this case, each element is first checked for the month, then for the day.\n\n```json\n{\"time\":1556928000,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":0}\n{\"time\":1556928001,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":1}\n{\"time\":1556928002,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":2}\n{\"time\":1556928003,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":3}\n{\"time\":1556928004,\"year\":2019,\"month\":5,\"day\":4,\"hours\":0,\"minutes\":0,\"seconds\":4}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nKeep only certain keys and pretty-print JSON:\n\n\u003cp\u003e\n\n```bash\n$ pxi --keep '[\"time\"]' --spaces 2 \u003c 2019.jsonl \u003e pretty.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nThe `--keep` attribute takes a stringified JSON array and narrows each element to only the keys in it.\nUsing `--spaces` with any value other than `0` formats the serialized JSON using the provided number as spaces.\n\n\n```json\n{\n  \"time\": 1546300800\n}\n{\n  \"time\": 1546300801\n}\n{\n  \"time\": 1546300802\n}\n{\n  \"time\": 1546300803\n}\n{\n  \"time\": 1546300804\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nDeserialize JSON that is not given line by line:\n\n\u003cp\u003e\n\n```bash\n$ pxi --by jsonObj \u003c pretty.jsonl\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nThe `--chunker` or `--by` attribute defines how data is turned into chunks that are deserialized.\nThe default chunker is `line` which treats each line as a chunk.\nIn cases where JSON is not given line by line, e.g. if it is pretty-printed, the `jsonObj` chunker helps.\n\n```json\n{\"time\":1546300800}\n{\"time\":1546300801}\n{\"time\":1546300802}\n{\"time\":1546300803}\n{\"time\":1546300804}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nSuppose you have to access a web API:\n\n\u003cp\u003e\n\n```bash\n$ curl -s \"https://swapi.co/api/people/\"\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nThe returned JSON is one big mess and needs to be tamed.\n\n```json\n{\"count\":87,\"next\":\"...\",\"results\":[{\"name\":\"Luke Skywalker\",\"height\":\"172\",\"mass\":\"77\" [...]\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nUse pixie to organize the response:\n\n\u003cp\u003e\n\n```bash\n$ curl -s \"https://swapi.co/api/people/\" |\n  pxi \"json =\u003e json.results\" --with flatMap --keep '[\"name\",\"height\",\"mass\"]'\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nHere, the `--with` alias for `--applier` is used.\nThe function selects the results array.\nIf it were applied with `map`, it would return the whole array as an element.\nBut since we use the `flatMap` applier, each array item is returned as an element, instead.\nThe `--keep` attribute specifies, which keys to keep from the returned objects:\n\n```json\n{\"name\":\"Luke Skywalker\",\"height\":\"172\",\"mass\":\"77\"}\n{\"name\":\"C-3PO\",\"height\":\"167\",\"mass\":\"75\"}\n{\"name\":\"R2-D2\",\"height\":\"96\",\"mass\":\"32\"}\n{\"name\":\"Darth Vader\",\"height\":\"202\",\"mass\":\"136\"}\n{\"name\":\"Leia Organa\",\"height\":\"150\",\"mass\":\"49\"}\n{\"name\":\"Owen Lars\",\"height\":\"178\",\"mass\":\"120\"}\n{\"name\":\"Beru Whitesun lars\",\"height\":\"165\",\"mass\":\"75\"}\n{\"name\":\"R5-D4\",\"height\":\"97\",\"mass\":\"32\"}\n{\"name\":\"Biggs Darklighter\",\"height\":\"183\",\"mass\":\"84\"}\n{\"name\":\"Obi-Wan Kenobi\",\"height\":\"182\",\"mass\":\"77\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nCompute all Star Wars character's \u003ca href=\"https://en.wikipedia.org/wiki/Body_mass_index\"\u003eBMI\u003c/a\u003e:\n\n\u003cp\u003e\n\n```bash\n$ curl -s \"https://swapi.co/api/people/\" |\n  pxi \"json =\u003e json.results\" -a flatMap -K '[\"name\",\"height\",\"mass\"]' |\n  pxi \"ch =\u003e (ch.bmi = ch.mass / (ch.height / 100) ** 2, ch)\" -K '[\"name\",\"bmi\"]'\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nWe use pixie to compute each character's BMI.\nThe default chunker `line` and the default applier `map` are suitable to apply a BMI-computing function to each line.\nBefore serializing to the default format JSON, we only keep the name and bmi fields.\nThe `map` applier supports mutating function inputs, which might be a problem for other appliers, so be careful.\n\n```json\n{\"name\":\"Luke Skywalker\",\"bmi\":26.027582477014604}\n{\"name\":\"C-3PO\",\"bmi\":26.89232313815483}\n{\"name\":\"R2-D2\",\"bmi\":34.72222222222222}\n{\"name\":\"Darth Vader\",\"bmi\":33.33006567983531}\n{\"name\":\"Leia Organa\",\"bmi\":21.77777777777778}\n{\"name\":\"Owen Lars\",\"bmi\":37.87400580734756}\n{\"name\":\"Beru Whitesun lars\",\"bmi\":27.548209366391188}\n{\"name\":\"R5-D4\",\"bmi\":34.009990434690195}\n{\"name\":\"Biggs Darklighter\",\"bmi\":25.082863029651524}\n{\"name\":\"Obi-Wan Kenobi\",\"bmi\":23.24598478444632}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nIdentify all obese Star Wars characters:\n\n\u003cp\u003e\n\n```bash\n$ curl -s \"https://swapi.co/api/people/\" |\n  pxi \"json =\u003e json.results\" -a flatMap -K '[\"name\",\"height\",\"mass\"]' |\n  pxi \"ch =\u003e (ch.bmi = ch.mass / (ch.height / 100) ** 2, ch)\" -K '[\"name\",\"bmi\"]' |\n  pxi \"ch =\u003e ch.bmi \u003e= 30\" -a filter -K '[\"name\"]'\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nFinally, we use the `filter` applier to identify obese characters and keep only their names.\n\n```json\n{\"name\":\"R2-D2\"}\n{\"name\":\"Darth Vader\"}\n{\"name\":\"Owen Lars\"}\n{\"name\":\"R5-D4\"}\n```\n\nAs it turns out, Anakin could use some training.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nSelect PID and CMD from \u003ccode\u003eps\u003c/code\u003e:\n\n\u003cp\u003e\n\n```bash\n$ ps | pxi '([pid, tty, time, cmd]) =\u003e ({pid, cmd})' --from ssv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie supports space-separated values, which is perfect for processing command line output.\n\n```json\n{\"pid\":\"42978\",\"cmd\":\"-zsh\"}\n{\"pid\":\"42988\",\"cmd\":\"-zsh\"}\n{\"pid\":\"43006\",\"cmd\":\"-zsh\"}\n{\"pid\":\"43030\",\"cmd\":\"-zsh\"}\n{\"pid\":\"43067\",\"cmd\":\"-zsh\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nSelect file size and filename from \u003ccode\u003els\u003c/code\u003e:\n\n\u003cp\u003e\n\n```bash\n$ ls -ahl / | pxi '([,,,,size,,,,file]) =\u003e ({size, file})' --from ssv\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nArray destructuring is especially useful when working with space-separated values.\n\n```json\n{\"size\":\"704B\",\"file\":\".\"}\n{\"size\":\"704B\",\"file\":\"..\"}\n{\"size\":\"1.2K\",\"file\":\"bin\"}\n{\"size\":\"4.4K\",\"file\":\"dev\"}\n{\"size\":\"11B\",\"file\":\"etc\"}\n{\"size\":\"25B\",\"file\":\"home\"}\n{\"size\":\"64B\",\"file\":\"opt\"}\n{\"size\":\"192B\",\"file\":\"private\"}\n{\"size\":\"2.0K\",\"file\":\"sbin\"}\n{\"size\":\"11B\",\"file\":\"tmp\"}\n{\"size\":\"352B\",\"file\":\"usr\"}\n{\"size\":\"11B\",\"file\":\"var\"}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nAllow JSON objects and lists in CSV:\n\n\u003cp\u003e\n\n```bash\n$ echo '{\"a\":1,\"b\":[1,2,3]}\\n{\"a\":2,\"b\":{\"c\":2}}' |\n  pxi --to csv --no-fixed-length --allow-list-values\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nPixie can be told to allow JSON encoded lists and objects in CSV files.\nNote, how pixie takes care of quoting and escaping those values for you.\n\n```json\na,b\n1,\"[1,2,3]\"\n2,\"{\"\"c\"\":2}\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nDecode JSON values in CSV:\n\n\u003cp\u003e\n\n```bash\n$ echo '{\"a\":1,\"b\":[1,2,3]}\\n{\"a\":2,\"b\":{\"c\":2}}' |\n  pxi --to csv --no-fixed-length --allow-list-values |\n  pxi --from csv 'evolve({b: JSON.parse})'\n```\n\n\u003c/p\u003e\n\u003c/summary\u003e\n\nJSON values are treated as strings and are not automatically parsed.\nThis is intentional, as pixie tries to keep as much out of your way as possible.\nThey can be transformed back into JSON by applying JSON.parse in a function.\n\n```json\n{\"a\":\"1\",\"b\":[1,2,3]}\n{\"a\":\"2\",\"b\":{\"c\":2}}\n```\n\n\u003c/details\u003e\n\n## `.pxi` Module\n\nUsers may extend and modify `pxi` by providing a `.pxi` module.\nIf you wish to do that, create a `~/.pxi/index.js` file and insert the following base structure:\n\n```js\nmodule.exports = {\n  plugins:  [],\n  context:  {},\n  defaults: {}\n}\n```\n\nThe following sections will walk you through all capabilities of `.pxi` modules.\nIf you want to skip over the details and instead see sample code, visit [`pxi-pxi`][pxi-pxi]!\n\n### Writing Plugins\n\nYou may write pixie plugins in `~/.pxi/index.js`.\nWriting your own extensions is straightforward:\n\n```js\nconst sampleChunker = {\n  name: 'sample',\n  desc: 'is a sample chunker.',\n  func: ({verbose}) =\u003e (data, prevLines, noMoreData) =\u003e (\n    // * Turn data into an array of chunks\n    // * Count lines for better error reporting throughout pxi\n    // * Collect error reports: {msg: String, line: Number, info: String}\n    //   If verbose \u003e 0, include line in error reports\n    //   If verbose \u003e 1, include info in error reports\n    // * Return errors, chunks, lines, the last line, and all unchunked data\n    {err: [], chunks: [], lines: [], lastLine: 0, rest: ''}\n  )\n}\n\nconst sampleDeserializer = {\n  name: 'sample',\n  desc: 'is a sample deserializer.',\n  func: ({verbose}) =\u003e (chunks, lines) =\u003e (\n    // * Deserialize chunks to jsons\n    // * Collect error reports: {msg: String, line: Number, info: Chunk}\n    //   If verbose \u003e 0, include line in error reports\n    //   If verbose \u003e 1, include info in error reports\n    // * Return errors and deserialized jsons\n    {err: [], jsons: []}\n  )\n}\n\nconst sampleApplier = {\n  name: 'sample',\n  desc: 'is a sample applier.',\n  func: (functions, {verbose}) =\u003e (jsons, lines) =\u003e (\n    // * Turn jsons into other jsons by applying all functions\n    // * Collect error reports: {msg: String, line: Number, info: Json}\n    //   If verbose \u003e 0, include line in error reports\n    //   If verbose \u003e 1, include info in error reports\n    // * Return errors and serialized string\n    {err: [], jsons: []}\n  )\n}\n\nconst sampleSerializer = {\n  name: 'sample',\n  desc: 'is a sample serializer.',\n  func: ({verbose}) =\u003e jsons =\u003e (\n    // * Turn jsons into a string\n    // * Collect error reports: {msg: String, line: Number, info: Json}\n    //   If verbose \u003e 0, include line in error reports\n    //   If verbose \u003e 1, include info in error reports\n    // * Return errors and serialized string\n    {err: [], str: ''}\n  )\n}\n```\n\nThe `name` is used by pixie to select your extension,\nthe `desc` is displayed in the options section of `pxi --help`, and\nthe `func` is called by pixie to transform data.\n\nThe sample extensions are bundled to the sample plugin, as follows:\n\n```js\nconst sample = {\n  chunkers:      [sampleChunker],\n  deserializers: [sampleDeserializer],\n  appliers:      [sampleApplier],\n  serializers:   [sampleSerializer]\n}\n```\n\n### Extending Pixie with Plugins\n\nPlugins can come from two sources:\nThey are either written by the user, as shown in the previous section, or they are installed in `~/.pxi/` as follows:\n\n```bash\n$ npm install pxi-sample\n```\n\nIf a plugin was installed, it has to be imported into `~/.pxi/index.js`:\n\n```js\nconst sample = require('pxi-sample')\n```\n\nRegardless of whether a plugin was defined by a user or installed from `npm`,\nall plugins are added to the `.pxi` module the same way:\n\n```js\nmodule.exports = {\n  plugins:  [sample],\n  context:  {},\n  defaults: {}\n}\n```\n\n`pxi --help` should now list the sample plugin extensions in the options section.\n\n\u003e :speak_no_evil: Adding plugins may **break the `pxi` command line tool**!\n\u003e If this happens, just remove the plugin from the list and `pxi` should work normal again.\n\u003e Use this feature responsibly.\n\n### Including Libraries like Ramda or Lodash\n\nLibraries like [Ramda][ramda] and [Lodash][lodash] are of immense help when writing functions to transform JSON objects\nand many heated discussions have been had, which of these libraries is superior.\nSince different people have different preferences, pixie lets the user decide which library to use.\n\nFirst, install your preferred libraries in `~/.pxi/`:\n\n```bash\n$ npm install ramda\n$ npm install lodash\n```\n\nNext, add the libraries to `~/.pxi/index.js`:\n\n```js\nconst R = require('ramda')\nconst L = require('lodash')\n\nmodule.exports = {\n  plugins:  [],\n  context:  Object.assign({}, R, {_: L}),\n  defaults: {}\n}\n```\n\nYou may now use all Ramda functions without prefix, and all Lodash functions with prefix `_`:\n\n```bash\n$ pxi \"prop('time')\" \u003c 2019.jsonl\n$ pxi \"json =\u003e _.get(json, 'time')\" \u003c 2019.jsonl\n```\n\n\u003e :hear_no_evil: Using Ramda and Lodash in your functions may have a **negative impact on performance**!\n\u003e Use this feature responsibly.\n\n### Including Custom JavaScript Functions\n\nJust as you may extend pixie with third-party libraries like Ramda and Lodash,\nyou may add your own functions.\nThis is as simple as adding them to the context in `~/.pxi/index.js`:\n\n```js\nconst getTime = json =\u003e json.time\n\nmodule.exports = {\n  plugins:  [],\n  context:  {getTime},\n  defaults: {}\n}\n```\n\nAfter adding it to the context, you may use your function:\n\n```bash\n$ pxi \"json =\u003e getTime(json)\" \u003c 2019.jsonl\n$ pxi \"getTime\" \u003c 2019.jsonl\n```\n\n### Changing `pxi` Defaults\n\nYou may **globally** change default chunkers, deserializers, appliers, and serializers in `~/.pxi/index.js`, as follows:\n\n```js\nmodule.exports = {\n  plugins:  [],\n  context:  {},\n  defaults: {\n    chunker:      'sample',\n    deserializer: 'sample',\n    appliers:     'sample',\n    serializer:   'sample',\n    noPlugins:    false\n  }\n}\n```\n\n\u003e :see_no_evil: Defaults are assigned **globally** and changing them may **break existing `pxi` scripts**!\n\u003e Use this feature responsibly.\n\n## `id` Plugin\n\n`pxi` includes the [`id`][pxi-id] plugin that comes with the following extensions:\n\n|                   | Description                                                                |\n|-------------------|----------------------------------------------------------------------------|\n| `id` chunker      | Returns each data as a chunk.                                              |\n| `id` deserializer | Returns all chunks unchanged.                                              |\n| `id` applier      | Does not apply any functions and returns the JSON objects unchanged.       |\n| `id` serializer   | Applies Object.prototype.toString to the input and joins without newlines. |\n\n## Comparison to Related Tools\n\n|                         | [`pxi`][pxi]                                                                        | [`jq`][jq]                                                   | [`mlr`][mlr]                                                                                                                                                            | [`fx`][fx]                                                                            | [`gawk`][gawk]                                                                                                                                                   |\n|-------------------------|-------------------------------------------------------------------------------------|--------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Self-description**    | *Small, fast, and magical command-line data processor similar to awk, jq, and mlr.* | *Command-line JSON processor*                                | *Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON*                                                                 | *Command-line tool and terminal JSON viewer*                                          | *The awk utility interprets a special-purpose programming language that makes it possible to handle simple data-reformatting jobs with just a few lines of code* |\n| **Focus**               | Transforming data with user provided functions and converting between formats       | Transforming JSON with user provided functions               | Transforming CSV with user provided functions and converting between formats                                                                                            | Transforming JSON with user provided functions                                        | Language for simple data reformatting tasks                                                                                                                      |\n| **License**             | [MIT][license]                                                                      | [MIT][jq-license]                                            | [BSD-3-Clause][mlr-license]                                                                                                                                             | [MIT][fx-license]                                                                     | [GPL-3.0-only][gawk-license]                                                                                                                                     |\n| **Performance**         | (performance is given relative to `pxi`)                                            | `jq` is [\u003e3x slower](#performance) than `pxi`                | `mlr` is [\u003e3x slower](#performance) than `pxi`                                                                                                                          | `fx` is [\u003e15x slower](#performance) than `pxi`                                        | [`pxi` is as performant as `gawk`](#performance) when processing JSON and CSV                                                                                    |\n| **Processing Language** | JavaScript and all [JavaScript libraries][npm]                                      | [jq language][jq-lang]                                       | [Predefined verbs and custom put/filter DSL][mlr-verbs]                                                                                                                 | JavaScript and all [JavaScript libraries][npm]                                        | [awk language][gawk-lang]                                                                                                                                        |\n| **Extensibility**       | (Third-party) [Plugins](#plugins), any [JavaScript library][npm], custom functions  | (Third-party) [Modules][jq-modules] written in [jq][jq-lang] | Running arbitrary [shell commands][mlr-shell]                                                                                                                           | Any [JavaScript library][npm], custom functions                                       | [`gawk` dynamic extensions][gawk-extensions]                                                                                                                     |\n| **Similarities**        |                                                                                     | `pxi` and `jq` both heavily rely on JSON                     | `pxi` and `mlr` both convert back and forth between CSV and JSON                                                                                                        | `pxi` and `fx` both apply JavaScript functions to JSON streams                        | `pxi` and `gawk` both transform data                                                                                                                             |\n| **Differences**         |                                                                                     | `pxi` and `jq` use different processing languages            | While `pxi` uses a programming language for data processing, `mlr` uses a custom put/filter DSL, also, `mlr` reads in the whole file while `pxi` processes it in chunks | `pxi` supports data formats other than JSON, and `fx` provides a terminal JSON viewer | While `pxi` functions transform a JSON into another JSON, `gawk` does not have a strict format other than transforming strings into other strings                |\n\n## Reporting Issues\n\nPlease report issues [in the tracker][issues]!\n\n## Contributing\n\nWe are open to, and grateful for, any contributions made by the community.\nBy contributing to pixie, you agree to abide by the [code of conduct][code].\nPlease read the [contributing guide][contribute].\n\n## License\n\n`pxi` is [MIT licensed][license].\n\n[actions]: https://github.com/Yord/pxi/actions\n[code]: https://github.com/Yord/pxi/blob/master/CODE_OF_CONDUCT.md\n[contribute]: https://github.com/Yord/pxi/blob/master/CONTRIBUTING.md\n[fx]: https://github.com/antonmedv/fx\n[fx-license]: https://github.com/antonmedv/fx/blob/master/LICENSE\n[gawk]: https://www.gnu.org/software/gawk/\n[gawk-extensions]: https://www.gnu.org/software/gawk/manual/gawk.html#Dynamic-Extensions\n[gawk-lang]: https://www.gnu.org/software/gawk/manual/gawk.html\n[gawk-license]: https://www.gnu.org/software/gawk/manual/gawk.html#GNU-General-Public-License\n[issues]: https://github.com/Yord/pxi/issues\n[jq]: https://github.com/stedolan/jq\n[jq-lang]: https://github.com/stedolan/jq/wiki/jq-Language-Description\n[jq-license]: https://github.com/stedolan/jq/blob/master/COPYING\n[jq-modules]: https://stedolan.github.io/jq/manual/#Modules\n[license]: https://github.com/Yord/pxi/blob/master/LICENSE\n[lodash]: https://lodash.com/\n[mlr]: https://github.com/johnkerl/miller\n[mlr-license]: https://github.com/johnkerl/miller/blob/master/LICENSE.txt\n[mlr-shell]: http://johnkerl.org/miller/doc/data-sharing.html#Running_shell_commands\n[mlr-verbs]: http://johnkerl.org/miller/doc/reference-verbs.html\n[node]: https://nodejs.org/\n[npm]: https://www.npmjs.com\n[npm-install]: https://docs.npmjs.com/downloading-and-installing-packages-globally\n[npm-package]: https://www.npmjs.com/package/pxi\n[post-how-tamed-pixie]: https://medium.com/@philipp.y.wille/how-i-tamed-a-pixie-fae29c21381b\n[post-exploring-large-data-files-with-pxi]: https://medium.com/@philipp.y.wille/processing-large-data-files-with-pixie-329b92d29a0b\n[pxi]: https://github.com/Yord/pxi\n[pxi-dust]: https://github.com/Yord/pxi-dust\n[pxi-benchmarks]: https://github.com/Yord/pxi-benchmarks\n[pxi-dsv]: https://github.com/Yord/pxi-dsv\n[pxi-id]: https://github.com/Yord/pxi/tree/master/src/plugins/id\n[pxi-json]: https://github.com/Yord/pxi-json\n[pxi-module]: https://github.com/Yord/pxi#pxi-module\n[pxi-pxi]: https://github.com/Yord/pxi-pxi\n[pxi-sample]: https://github.com/Yord/pxi-sample\n[pxi-sandbox]: https://github.com/Yord/pxi-sandbox\n[ramda]: https://ramdajs.com/\n[shield-license]: https://img.shields.io/npm/l/pxi?color=yellow\u0026labelColor=313A42\n[shield-node]: https://img.shields.io/node/v/pxi?color=red\u0026labelColor=313A42\n[shield-npm]: https://img.shields.io/npm/v/pxi.svg?color=orange\u0026labelColor=313A42\n[shield-prs]: https://img.shields.io/badge/PRs-welcome-green.svg?labelColor=313A42\n[shield-unit-tests-linux]: https://github.com/Yord/pxi/workflows/linux/badge.svg?branch=master\n[shield-unit-tests-macos]: https://github.com/Yord/pxi/workflows/macos/badge.svg?branch=master\n[shield-unit-tests-windows]: https://github.com/Yord/pxi/workflows/windows/badge.svg?branch=master\n[teaser]: https://github.com/Yord/pxi/blob/master/teaser.gif?raw=true\n[unix-philosophy]: https://en.wikipedia.org/wiki/Unix_philosophy","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYord%2Fpxi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYord%2Fpxi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYord%2Fpxi/lists"}