Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Insight 🔍

API Explorer & MCP Server for Java, Kotlin & KMP

Analyze Java and Kotlin libraries, JVM artifacts, Kotlin Multiplatform libraries, and local source code with a standalone CLI or integrate directly into AI IDEs via MCP.

AI coding assistants often guess Java/Kotlin APIs from outdated documentation, web examples, or a different version than the one used in your project. That leads to missing methods, deprecated usage, incorrect signatures, and wasted debugging time.

Library Insight solves this by analyzing the exact JAR, AAR, Maven dependency, Gradle output, or local Java/Kotlin source code used by your project. It builds a searchable, version-aware API index from compiled bytecode (including Kotlin @Metadata) or source code, allowing you to explore APIs, generate AI-ready context, and understand your codebase using the exact code you're working with—not outdated documentation or web examples.


📖 Documentation

The complete documentation, architecture diagrams, command reference, and integration guides are available at: 👉 https://Coding-Meet.github.io/Library-Insight/


Key Features

  • MCP Server: Connect Cursor, Claude Desktop, or any MCP-compatible IDE to query APIs directly.
  • Kotlin Multiplatform (KMP) Support: Resolve coordinates from Gradle Module Metadata (.module JSON), parse Native .klib metadata files, and merge platform variant API targets (common, jvm, ios, js, wasm).
  • Local Source Code Scanner (scan-source): Analyze Kotlin and Java source projects without compilation, preserving KDoc/Javadoc, imports, and declaration source locations (file:line).
  • Version-Correct API Lookup: Build an API index from the exact JAR, AAR, Maven dependency, Gradle output, or source code used by your project to prevent AI hallucinations.
  • Deep Metadata Extraction: Extract classes, constructors, methods, properties, nullability, generics, annotations, modifiers, and source metadata.
  • Kotlin DSL & Fluent API Mapping: Detect @DslMarker scopes, type aliases, lambda builders, extension functions, and inline reified functions.
  • Method Call Graph Generator: Trace and visualize method call trees to understand internal bytecode invocations.
  • Automatic Usage Examples: Generate common usage patterns and extract examples from available documentation.
  • API Health & Complexity Reports: Measure public API size, complexity metrics, and deprecation ratios.
  • Dependency & ABI Analysis: Detect classpath conflicts, linkage issues (LinkageError, NoSuchMethodError), and deprecated dependency APIs.
  • Migration Advisor: Compare two library versions and identify added, removed, deprecated, and replacement APIs.
  • Exporter Tools: Export API indexes as JSON, Markdown reference documentation, or token-optimized AI context packages.

Quick Start

1. Installation

Install the CLI globally on your system (requires JDK 17+):

curl -fsSL https://raw.githubusercontent.com/Coding-Meet/Library-Insight/main/install.sh | bash

2. Inspecting a Library

# 1. Scan a local source project directory
library-insight scan-source src/main

# Or scan a compiled library from Maven Central (or your Gradle cache)
library-insight scan com.squareup.retrofit2:retrofit:2.11.0

# 2. Search for a class
library-insight search Retrofit

# 3. Explain API signatures and KDocs
library-insight explain Retrofit

# 4. Compare two versions for compatibility / breaking changes
library-insight diff com.squareup.retrofit2:retrofit:2.9.0 com.squareup.retrofit2:retrofit:2.11.0

3. Connect to MCP

Start the stdio-based MCP server:

library-insight mcp

For setup instructions in Cursor or Claude Desktop, see the MCP Integration Guide.


🚀 Roadmap

We plan to expand Library Insight with deep source-level analysis capabilities:

🔍 Source Analysis Engine (Planned)

  • References Engine: Build a symbol-to-usage index to locate references for any class, method, or property across the codebase (e.g. library-insight references LoginRepository).
  • Implementations: Query all interface implementations or subclass declarations (e.g. library-insight implementations Repository -> RoomRepository, NetworkRepository).
  • Hierarchy: Render the visual inheritance tree for any base class or interface (e.g. library-insight hierarchy BaseViewModel).
  • Source Call Graph: Trace internal method execution paths using raw source file declaration locations.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for the full license text.


🛠️ Developer Cheatsheet (Internal Use)

Quick reference commands for development, testing, documentation, and releasing:

1. Agent Skill Generation

Regenerate SKILL.md after editing docs/cli.md:

./gradlew generateAgentSkill

2. Testing

Run the complete unit test suite across all modules:

./gradlew test

3. Documentation Site (MkDocs)

Manage the documentation website locally:

# Preview the docs site locally with live-reload (default: http://localhost:8000)
mkdocs serve --livereload

# Build static HTML site files
mkdocs build

# Force deploy documentation to GitHub Pages (gh-pages branch)
mkdocs gh-deploy --force

4. Releasing & Version Tagging

Release and publish a new version tag to GitHub:

git tag v1.4.0
git push origin v1.4.0

5. Demos

Run the command-line walkthrough scripts:

# Run the 3-minute quick command suite demo
./quick-demo.sh

# Run the comprehensive 21-command suite demo
./demo.sh

6. Build Distributions

Generate application binary packages (ZIP, TAR, and local install distributions):

./gradlew installDist distZip distTar

About

API Explorer & MCP Server for Java, Kotlin & KMP. Analyze JARs, AARs, KLibs, Maven dependencies, and local source code to build a version-correct API index. Search, inspect, compare, migrate, audit, analyze dependencies, generate AI-ready context, and integrate with AI IDEs via MCP.

Topics

Resources

Contributing

Stars

20 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages