{"id":13761005,"url":"https://github.com/vorpaljs/bash-parser","last_synced_at":"2025-04-04T14:09:48.149Z","repository":{"id":38431827,"uuid":"53449333","full_name":"vorpaljs/bash-parser","owner":"vorpaljs","description":"Parses bash into an AST","archived":false,"fork":false,"pushed_at":"2024-06-23T18:55:05.000Z","size":1250,"stargazers_count":200,"open_issues_count":23,"forks_count":34,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-17T02:31:08.556Z","etag":null,"topics":["ast","bash","parse"],"latest_commit_sha":null,"homepage":"https://vorpaljs.github.io/bash-parser-playground/","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/vorpaljs.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-03-08T22:17:57.000Z","updated_at":"2024-10-11T12:25:18.000Z","dependencies_parsed_at":"2024-01-15T03:58:35.100Z","dependency_job_id":"a04d6efe-de72-4692-a82b-d8bd366108e2","html_url":"https://github.com/vorpaljs/bash-parser","commit_stats":{"total_commits":429,"total_committers":4,"mean_commits":107.25,"dds":0.009324009324009341,"last_synced_commit":"e7bc5eb191ce75b1ef1ad877222f1865b97fe1e3"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorpaljs%2Fbash-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorpaljs%2Fbash-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorpaljs%2Fbash-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vorpaljs%2Fbash-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vorpaljs","download_url":"https://codeload.github.com/vorpaljs/bash-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190255,"owners_count":20898702,"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":["ast","bash","parse"],"created_at":"2024-08-03T13:01:31.631Z","updated_at":"2025-04-04T14:09:48.129Z","avatar_url":"https://github.com/vorpaljs.png","language":"JavaScript","readme":"# bash-parser\n\nParses bash source code to produce an AST\n\n[![Travis Build Status](https://img.shields.io/travis/vorpaljs/bash-parser/master.svg)](http://travis-ci.org/vorpaljs/bash-parser)\n[![Coveralls](https://img.shields.io/coveralls/vorpaljs/bash-parser.svg?maxAge=2592000)](https://coveralls.io/github/vorpaljs/bash-parser)\n[![NPM module](https://img.shields.io/npm/v/bash-parser.svg)](https://npmjs.org/package/bash-parser)\n[![NPM downloads](https://img.shields.io/npm/dt/bash-parser.svg)](https://npmjs.org/package/bash-parser)\n[![Try online](https://img.shields.io/badge/try_it-online!-yellow.svg)](https://vorpaljs.github.io/bash-parser-playground/)\n\n# Installation\n\n```bash\nnpm install --save bash-parser\n```\n\n# Usage\n\n```js\n  const parse = require('bash-parser');\n  const ast = parse('echo ciao');\n```\n\n`ast` result is:\n\n```js\n{\n\t\ttype: \"Script\",\n\t\tcommands: [\n\t\t\t{\n\t\t\t\ttype: \"SimpleCommand\",\n\t\t\t\tname: {\n\t\t\t\t\ttext: \"echo\",\n\t\t\t\t\ttype: \"Word\"\n\t\t\t\t},\n\t\t\t\tsuffix: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttext: \"ciao\",\n\t\t\t\t\t\ttype: \"Word\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t}\n```\n\n# Related projects\n\n* [cash](https://github.com/dthree/cash) - This parser should become the parser used by `cash` (and also [vorpal](https://github.com/dthree/vorpal))\n* [nsh](https://github.com/piranna/nsh) - This parser should become the parser used by `nsh`\n* [js-shell-parse](https://github.com/grncdr/js-shell-parse) - bash-parser was born as a fork of `js-shell-parse`, but was rewritten to use a `jison` grammar\n* [jison](https://github.com/zaach/jison) - Bison in JavaScript.\n\n# Documentation\n\nLook in [documents folder](https://github.com/vorpaljs/bash-parser/tree/master/documents)\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 vorpaljs\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorpaljs%2Fbash-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvorpaljs%2Fbash-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvorpaljs%2Fbash-parser/lists"}