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
|
| 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 |
| Jul 2, 2024 9:32pm |
|
0 |
VERSION_BUMP |
eeb6fcd9 |
| Jul 2, 2024 10:07am |
|
0 |
VERSION_BUMP |
0e63fbfb |
| Jul 2, 2024 9:23am |
|
0 |
VERSION_BUMP |
e0f58b28 |
| Dec 11, 2023 9:23am |
|
0 |
VERSION_BUMP |
2ac2513e |
| Apr 29, 2023 9:56am |
|
0 |
VERSION_BUMP |
958c9e2b |
| Apr 8, 2023 5:21am |
|
0 |
VERSION_BUMP |
c65a5169 |
| Apr 7, 2023 7:36pm |
|
0 |
VERSION_BUMP |
8ae594a9 |
| Mar 17, 2023 5:05pm |
|
0 |
VERSION_BUMP |
9ddb16ef |
| Mar 17, 2023 5:04pm |
|
0 |
VERSION_BUMP |
caa465bd |
|