gitmyhub

Library-Insight

Kotlin ★ 5 updated 4d ago

Library Insight fixes that by scanning the exact JAR/AAR, Gradle output, or Maven version you use. It reads compiled .class structures (using ASM) and Kotlin Metadata annotations (using kotlin-metadata-jvm) to build a searchable, version-correct public API index.

A CLI tool that scans your exact installed Java or Kotlin library version to give AI assistants and developers accurate, version-correct API information.

KotlinASMGradleCliktsetup: moderatecomplexity 3/5

Library Insight is a command line tool that helps AI coding assistants and developers know the true public API of a Java or Kotlin library, based on the exact version installed in your project rather than what the AI remembers from web examples or documentation for a different version. AI assistants often suggest methods that do not exist, use deprecated APIs, or write code for a newer or older release than the one you actually have, which leads to wasted debugging time.

The tool works by directly reading the compiled JAR or AAR file, Gradle build output, or Maven artifact you point it at, examining the compiled class structures and Kotlin metadata annotations to build a searchable, version correct index of every class, method, constructor, and property, including details like visibility, default arguments, generics, and whether a property is mutable. It can export this index as JSON or readable Markdown documentation, search across it, and compare two versions of the same library to highlight what was added, removed, changed, or deprecated, including changes that would break compiled code.

A key feature is a compact export format built specifically for feeding into AI assistants like ChatGPT, Gemini, Claude, Cursor, or Copilot, so the AI gets exact, current API information without wasting its limited context space on huge generated documentation files. The project also ships a skill file that teaches AI agents to check the real installed library before writing code instead of guessing, and this skill can be installed globally so any AI agent on your computer can use it, or scoped to just one project.

The tool is built in Kotlin using Clean Architecture principles, with separate modules handling bytecode parsing, Kotlin metadata parsing, search, and export formatting, all coordinated by a core orchestration layer and a command line interface. Installing it requires Java 17 or higher, and can be done with a one line shell installer script or by building it yourself from source using Gradle.

Where it fits