astgen
« Back to VersTracker
Description:
Generate AST in json format for JS/TS
Type: Formula  |  Latest Version: 3.36.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: ast javascript typescript static-analysis security parser
Install: brew install astgen
About:
ASTGen is a command-line tool designed to generate Abstract Syntax Trees (AST) in JSON format for JavaScript and TypeScript codebases. It parses source code to provide a structured representation of the code's syntax, which is essential for static analysis and automated code processing. This tool serves as a foundational component for building custom linters, security scanners, or code transformation pipelines.
Key Features:
  • Supports modern JavaScript (ES6+) and TypeScript syntax
  • Outputs AST in a standard, machine-readable JSON format
  • Easy integration into CI/CD pipelines and analysis scripts
  • Maintained by the Joern team, ensuring compatibility with security analysis tools
Use Cases:
  • Feeding code structure into static analysis tools like Joern for security auditing
  • Building custom linting rules or code quality checks
  • Automated refactoring or code transformation scripts
  • Educational purposes for understanding code parsing and compiler design
Alternatives:
  • esprima – Esprima is a widely used, stable JavaScript parser, but ASTGen is specifically optimized for integration with the Joern ecosystem.
  • typescript-compiler-api – The official TypeScript API offers deeper integration but is more complex to use directly compared to ASTGen's simple CLI.
License: Apache-2.0
Dependencies: node
Bottles available for: all
Version History
Detected Version Rev Change Commit
Nov 26, 2024 12:26pm 0 VERSION_BUMP 9b8d70e4
Nov 19, 2024 12:01am 0 VERSION_BUMP 769f19f7
Nov 13, 2024 4:35pm 0 VERSION_BUMP f6032db9
Nov 13, 2024 3:26pm 0 VERSION_BUMP e07d73c9