0.1.0 • Published 7 years ago
styx-cli v0.1.0
styx-cli
Provides a command-line interface for the Styx control flow graph derivation library.
Install
$ npm install -g styx-cliUsage
The following command will load the input.js file, analyze the JavaScript program, export it as JSON, and write the output to stdout:
$ styx input.jsIf the --minify-json flag is set, the exported JSON will be minified (rather than properly indented):
$ styx input.js --minify-jsonThe output can be redirected to a specific file using the output redirection operator:
$ styx input.js > input.jsonTo export the control flow graph of the main program in DOT format, set --format to dot:
$ styx input.js --format dotTo export the control flow graph of a single function in DOT format, provide its ID via --graph:
$ styx input.js --format dot --graph 1All available command-line arguments are shown when the --help flag is set:
$ styx --help