bash-parser
bash-parser copied to clipboard
Add CLI support
Hey, cool module. 🙂 It would be nice if you could run it via the CLI.
This PR adds some basic CLI support, so you can run bash-parser like so:
bash-parser 'echo ciao' # if the package is installed globally
npx bash-parser 'echo ciao' # if the package is installed locally
Outputs the AST as JSON.
I'd suggest adding file support with --file <path>
!