npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

asl-parser

v1.0.2

Published

A CLI tool to parse and analyze codebases, generating agent specifications in agents.md

Downloads

319

Readme

ASL Parser

A powerful CLI tool to parse and analyze codebases, generating comprehensive agent specifications in agents.md.

Installation

Global Installation (Recommended)

npm install -g asl-parser

Use the asl command from anywhere:

asl parse ./

Local Installation

npm install asl-parser

Use via npx:

npx asl parse ./

Quick Start

Parse Command

Parse the current directory:

asl parse

Or specify a custom path:

asl parse ./my-project

Options:

| Option | Description | Default | |--------|-------------|---------| | -o, --output <file> | Output file name | agents.md |

Example with custom output:

asl parse ./ -o my-agents.md

Prompt Command

Analyze a prompt to identify impacted files, functions, and lines. Results print to terminal only—no file created.

asl prompt "Add authentication to the login function"

With custom path:

asl prompt "Update the API endpoint handler" ./my-project

RAG Search Search codebase using natural language:

asl rag "your search query"

Examples: bash

asl rag "database connection" -p ./src
asl rag "error handling" -k 20

Options:

-p, --path – Codebase path (default: .)
-k, --topk – Number of results (default: 10)

Returns: Relevant code sections with line numbers and relevance scores.

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

Output Includes:

  • Files affected and relevance scores
  • Functions/classes impacted
  • Specific line numbers (e.g., L42, L87)
  • File metadata (extension, line count)

Benefits:

  • Save tokens by analyzing only relevant code sections
  • Quickly identify what needs to be changed
  • See impacted functions and classes at a glance
  • Get specific line numbers for pinpoint edits

Output

The parse command generates an agents.md file containing:

  • Summary Statistics – Total files, lines of code, and file sizes
  • Files by Extension – Breakdown of file types in your codebase
  • File Analysis – Detailed breakdown for each file:
    • File paths and sizes
    • Code vs. comment line counts
    • Detected classes and functions
  • Agent Specifications – Structured JSON data ready for AI agents

Features

Multi-Language Support – JavaScript, TypeScript, Python, Java, C++, Go, Rust, and more

🔍 Smart Detection – Automatically detects functions and classes in code files

📊 Comprehensive Docs – Generates markdown documentation and structured JSON output

Impact Analysis – Prompt-based impact analysis to identify affected files and lines without full codebase scans

🚀 Auto-Ignored Directories – Skips common directories like node_modules, .git, dist, and more 🔍 RAG Search – Natural language code search without API keys

Supported Languages

| Language | Extensions | |----------|-----------| | 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 skipped during analysis:

  • node_modules, vendor
  • .git, .vscode, .idea
  • .next, .nuxt
  • dist, build, target
  • .cache, coverage
  • __pycache__, bin, obj

Example

asl rag "how does rag works"
>>

🔍 RAG Search: "how does rag works"

📚 Indexing codebase...
✅ Indexed 114 code sections

✅ Found 10 relevant sections:

📍 Query: "how does rag works"

1. 📄 lib\commands\rag-command.js
   Lines 181-200 | Relevance: 30%
         process.exit(1);
... }

2. 📄 lib\rag\minimal-rag.js
   Lines 1-20 | Relevance: 22%
   // src/rag/minimal-rag.js
...Drop-in RAG module for asl-parser

3. 📄 lib\commands\rag-command.js
   Lines 1-20 | Relevance: 15%
   // lib/rag-command.js
...Simple RAG search command for asl-parser

4. 📄 lib\commands\rag-command.js
   Lines 166-185 | Relevance: 15%
         console.log(chalk.white(`   ${snippet}...`));
      console.log...

5. 📄 lib\commands\rag-command.js
   Lines 16-35 | Relevance: 14%

...st CODE_EXTENSIONS = [

6. 📄 lib\commands\rag-command.js
   Lines 196-204 | Relevance: 11%
       rag.displayResults(results, query);
...

7. 📄 lib\rag\minimal-rag.js
   Lines 76-95 | Relevance: 7%
     }
...

8. 📄 lib\promptAnalyzer.js
   Lines 31-50 | Relevance: 4%
     });
...

9. 📄 lib\promptAnalyzer.js
   Lines 91-110 | Relevance: 4%
       if (filePath.includes(term) || fileName.includes(term)) {       
      s...

10. 📄 lib\promptAnalyzer.js
   Lines 106-125 | Relevance: 4%
   /**
...Score how relevant a function/class is to the prompt