Command-line interface for the ASTX toolchain. Compile, run, and inspect .astx binary files.
npm install -g @astx/cliCompile a JavaScript file to an ASTX binary.
astx compile src/index.js dist/index.astxThe .astx extension is appended automatically if omitted from <output>.
Watch the input file and recompile automatically on every save.
astx compile --watch src/index.js dist/index.astxEach recompile prints a timestamped line:
Watching src/index.js for changes… (Ctrl+C to stop)
[12:34:56] Compiled src/index.js → dist/index.astx in 12.4ms
[12:35:02] Compiled src/index.js → dist/index.astx in 11.9ms
Compile errors during watch are printed without stopping the watcher.
Execute an ASTX binary file.
astx run dist/index.astxThe program runs in vm mode; __dirname and __filename are injected based on the file's location.
Decompile an ASTX binary back to JavaScript source. The output is not optimised or human-readable — intended for debugging only.
astx gen dist/index.astx dist/index.debug.jsPrint the installed versions of the CLI and compiler.
astx versionGPL-3.0 — see the ASTX repository for details.