Skip to content

tp-001/code-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# ASL Parser A powerful CLI tool to parse and analyze codebases, generating comprehensive agent specifications in `agents.md`. ## Installation ### Global Installation (Recommended) ```bash npm install -g asl-parser ``` After global installation, you can use the `asl` command from anywhere: ```bash asl parse ./ ``` ### Local Installation ```bash npm install asl-parser ``` Then use via npx: ```bash npx asl parse ./ ``` ## Usage ### Parse Command Parse the current directory: ```bash asl parse ``` Or specify a path: ```bash asl parse ./my-project ``` **Options:** - `-o, --output `: Specify output file name (default: `agents.md`) Example: ```bash asl parse ./ -o my-agents.md ``` ### Prompt Command Analyze a prompt and output impacted files, functions, and lines **to the terminal only** (no file created): ```bash asl prompt "Add authentication to the login function" ``` Or specify a path: ```bash asl prompt "Update the API endpoint handler" ./my-project ``` **Output (terminal only, no file created):** - Summary: files affected, functions/classes impacted - Per file: path, score, extension, line count, functions/classes, relevant line numbers (e.g. L42, L87) **What it does:** - Extracts keywords, function names, file paths, and tech terms from your prompt - Scans the codebase for relevant files, functions, and classes - Prints a focused impact report to the terminal **Benefits:** - � Save tokens by only analyzing relevant code sections - � Quickly identify what needs to be changed - � See impacted functions and classes - � Get specific line numbers that may need updates ## Output The tool generates an `agents.md` file containing: - **Summary Statistics**: Total files, lines of code, file sizes - **Files by Extension**: Breakdown of file types in your codebase - **File Analysis**: Detailed analysis of each file including: - File paths and sizes - Line counts (code vs comments) - Detected classes and functions - **Agent Specifications**: Structured JSON data for AI agents ## Features - � Supports multiple programming languages (JavaScript, TypeScript, Python, Java, C++, Go, Rust, and more) - � Automatically ignores common directories (node_modules, .git, dist, etc.) - � Detects functions and classes in code files - � Generates comprehensive markdown documentation - � Provides structured JSON output for AI agents - � **Prompt-based impact analysis** - Identify affected files, functions, and lines without scanning the entire codebase ## Supported File Types - JavaScript/TypeScript: `.js`, `.jsx`, `.ts`, `.tsx` - Python: `.py` - Java: `.java` - C/C++: `.c`, `.cpp`, `.h` - Go: `.go` - Rust: `.rs` - Ruby: `.rb` - PHP: `.php` - Swift: `.swift` - Kotlin: `.kt` - And more... ## Ignored Directories The following directories are automatically ignored: - `node_modules` - `.git` - `.next`, `.nuxt` - `dist`, `build` - `.cache`, `coverage` - `.vscode`, `.idea` - `vendor`, `__pycache__` - `target`, `bin`, `obj` ## License MIT # code-parser

About

AI nextgen code workflow manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors