{"id":21304971,"url":"https://github.com/maximilianmairinger/clicmdast","last_synced_at":"2026-05-11T06:50:47.562Z","repository":{"id":72156477,"uuid":"604787926","full_name":"maximilianMairinger/cliCmdAst","owner":"maximilianMairinger","description":"CLI command ast parser manipulate program bash powershell generic agnostic.","archived":false,"fork":false,"pushed_at":"2023-02-22T01:59:11.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T00:45:48.188Z","etag":null,"topics":["ast","bash","cli","cmd","command","manipulate","mutate","parser","shell","syntax","tokenizer"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cli-cmd-ast","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maximilianMairinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-02-21T19:43:00.000Z","updated_at":"2023-04-01T02:07:52.000Z","dependencies_parsed_at":"2023-04-13T03:31:22.926Z","dependency_job_id":null,"html_url":"https://github.com/maximilianMairinger/cliCmdAst","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FcliCmdAst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FcliCmdAst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FcliCmdAst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximilianMairinger%2FcliCmdAst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximilianMairinger","download_url":"https://codeload.github.com/maximilianMairinger/cliCmdAst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243779623,"owners_count":20346745,"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","cli","cmd","command","manipulate","mutate","parser","shell","syntax","tokenizer"],"created_at":"2024-11-21T16:16:31.453Z","updated_at":"2026-05-11T06:50:47.522Z","avatar_url":"https://github.com/maximilianMairinger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cli cmd ast\r\n\r\nCLI command ast parser manipulate program bash powershell generic agnostic.\r\n\r\n\u003e Please note that Cli cmd ast is currently under development and not yet suited for production\r\n\r\n## Installation\r\n\r\n```shell\r\n $ npm i cli-cmd-ast\r\n```\r\n\r\n## Usage\r\n\r\n\r\n\r\n```ts\r\nimport { toAst, toCmd } from \"cli-cmd-ast\"\r\n\r\nlet yieldsAst = toAst(`npm \"--org  google\" cmd --flag --option1 val -v=1.1`)\r\n\r\nyieldsAst = {\r\n  cmds: [ 'npm', '--org  google', 'cmd' ],\r\n  args: { flag: true, option1: 'val', v: 1.1 }\r\n}\r\n```\r\n\r\n\u003e Note that the order of commands is not preserved, if one command is after a flag, as this information is not part of the ast. \r\n\r\n```ts\r\nlet yieldsCmd = toCmd(yieldsAst)\r\n\r\nyieldsCmd = `npm \"--org  google\" cmd --flag --option1 val -v=1.1`\r\n```\r\n\r\n## Contribute\r\n\r\nAll feedback is appreciated. Create a pull request or write an issue.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianmairinger%2Fclicmdast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximilianmairinger%2Fclicmdast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilianmairinger%2Fclicmdast/lists"}