{"id":17382186,"url":"https://github.com/iostreamer-x/awkward","last_synced_at":"2025-04-05T06:08:45.058Z","repository":{"id":82131609,"uuid":"63478009","full_name":"iostreamer-X/Awkward","owner":"iostreamer-X","description":"A NodeJS based shell. Everything is an Object!","archived":false,"fork":false,"pushed_at":"2023-05-23T11:29:44.000Z","size":21,"stargazers_count":459,"open_issues_count":1,"forks_count":15,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-05T06:08:40.066Z","etag":null,"topics":["coffeescript","javascript","nodejs","terminal"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/iostreamer-X.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-16T10:31:26.000Z","updated_at":"2024-12-17T17:20:38.000Z","dependencies_parsed_at":"2023-07-20T04:02:49.644Z","dependency_job_id":null,"html_url":"https://github.com/iostreamer-X/Awkward","commit_stats":{"total_commits":44,"total_committers":3,"mean_commits":"14.666666666666666","dds":"0.045454545454545414","last_synced_commit":"4deba7087cfbcf772ec18ce95cba2f5d340f2071"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iostreamer-X%2FAwkward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iostreamer-X%2FAwkward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iostreamer-X%2FAwkward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iostreamer-X%2FAwkward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iostreamer-X","download_url":"https://codeload.github.com/iostreamer-X/Awkward/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294540,"owners_count":20915340,"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":["coffeescript","javascript","nodejs","terminal"],"created_at":"2024-10-16T07:35:45.414Z","updated_at":"2025-04-05T06:08:45.042Z","avatar_url":"https://github.com/iostreamer-X.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Awkward\n[![Build Status](https://travis-ci.org/iostreamer-X/Awkward.png)](https://travis-ci.org/iostreamer-X/Awkward)\n\n![](https://labs.turbo.run/git-brag?repo=Awkward\u0026user=iostreamer-X\u0026maxn-3000)\n\nA NodeJS based shell. Everything is an Object!\n\n# Install\n\n`npm install -g awkward`\n\n# Whuuut?\nTo me, awk is powerful but really weird. Often times I want to get some information\nout of a command which gives a structured output but I get discouraged because\nI am really lazy.\n\nEnter, awkward. It's a NodeJS based shell. It lets you run\njavascript functions on system commands.\n\nFor example:\n`ls().forEach(a =\u003e console.log(a[0], a[0].length))`\n\nOne can also use flags and piped commands like this:\n\u003cbr/\u003e\n`(ps -ef)().map(a =\u003e [a[0], a[7]]).forEach(a =\u003e console.log(a))`\n\n### Update:\n\nUnderscore added as a dependency and now you can use it in the awkward terminal\n\n\n# Philosophy\n\nEvery structured data given as an output by shell commands or other\nbinaries can be represented as a JS array and one should be able apply\n`Array` methods like `map`, `forEach`, `filter` on the data in a functional style.\n\n\n# How it works\nOnce the program notices that the user wants to run js functions, it runs the command\nand stores the result in an array. Let's take the example of `ps`:\n\n### Shell output\n``` shell\nPID TTY          TIME CMD\n13750 pts/14   00:00:00 bash\n25193 pts/14   00:00:03 node\n25271 pts/14   00:00:00 sh\n25272 pts/14   00:00:00 ps\n```\n\n### Corresponding array\n``` js\n[ [ 'PID', 'TTY', 'TIME', 'CMD' ],\n[ '13750', 'pts/14', '00:00:00', 'bash' ],\n[ '25193', 'pts/14', '00:00:03', 'node' ],\n[ '25283', 'pts/14', '00:00:00', 'sh' ],\n[ '25284', 'pts/14', '00:00:00', 'ps' ] ]\n```\n\nAnd the functions you pass are `eval`uated as:\n\u003cbr/\u003e\n `resulting_array.\u003cfunctions_you_pass\u003e`.\n\nWhich actually is the only supported syntax, for now. One can only chain\ncommands and functions like this:\n\u003cbr/\u003e\n`(command).function((elem)=\u003e{})`\n\nSo, doing `console.log(ls())` won't work, for now.  \n\n# Demo\n\n\u003ca href=\"https://asciinema.org/a/df856vl97no487ax0ykb39vzq\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/df856vl97no487ax0ykb39vzq.png\" /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiostreamer-x%2Fawkward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiostreamer-x%2Fawkward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiostreamer-x%2Fawkward/lists"}