v1.3.0
This release introduces scan-source, enabling Library Insight to analyze local Kotlin and Java source projects without compilation. Source declarations, documentation, imports, and precise source locations are indexed into the same unified API database used for compiled libraries.
🔍 Raw Source Directory Scanner (scan-source)
Scan raw source code directories containing Kotlin (.kt) and Java (.java) files without compiling them. It generates the same unified API index as the existing scan command, allowing existing commands such as search, explain, export, and ai-export to work without any workflow changes.
library-insight scan-source app/src/mainFeatures:
- Java Source Parsing: Uses JavaParser to extract classes, interfaces, enums, records, constructors, methods, fields, generics, annotations, modifiers, and Javadocs.
- Kotlin Source Parsing: Uses the official Kotlin compiler PSI (
kotlin-compiler-embeddable) to extract KDoc, modifiers, companion objects, secondary constructors, extension receivers, generics, and Kotlin-specific language features.
📍 Source Location & Imports Indexing
- Source Locations: Stores the relative file path, line number, and column for every indexed class, constructor, method, and property.
- Import Statements: Persists file-level import lists inside the class API model, helpful for dependency analysis and code structure auditing.
- Backward-Compatible Database: Existing bytecode-scanned indices are backward-compatible and load seamlessly without schema validation breaks.
🖥️ CLI Improvements
- scan-source displays Kotlin/Java file statistics and indexing progress.
- search now shows declaration source locations when available.
- explain now displays source locations, imports, and declaration locations for methods and properties.
Full Changelog: v1.2.0...v1.3.0