Getting Started¶
Get up and running with Library Insight to analyze Java, Kotlin, and Kotlin Multiplatform dependencies and enable correct API context for your development environment.
Requirements¶
- JDK 17 or higher is required to execute the Java/Kotlin runtime engine.
- An active terminal environment (macOS/Linux/Windows).
Installation Options¶
You can install the CLI globally on your system instantly with zero Node.js/npm dependencies using the installer script:
Once installed, both library-insight and li commands are available globally and can be used interchangeably.
If you just want to run a local build without registering it globally on your system:
- Clone the repository and navigate to the project root:
- Build using Gradle wrapper:
- The executable binary will be generated at:
Uninstallation¶
To cleanly remove the global CLI binary, installation files, and registered AI agent skills from your system:
Basic Workflow / Quick Start¶
Library Insight works in a simple 4-step pipeline: Index -> Explore -> AI Context Export -> Version Audit.
Here is how developers and AI coding agents use Library Insight step-by-step:
Step 1: Index Your API Surface (scan / scan-source)¶
Why this step? AI models hallucinate outdated methods because they don't know the exact library version installed in your project. Indexing creates a version-aware local API database from real bytecode or source files.
- Scan a Compiled Dependency (e.g. Jetpack Compose Layout):
- Scan a Bill of Materials (BOM):
-i, --include <pattern> to selectively target specific BOM member artifacts like -i "compose-ui*" or -i "*animation*").
- Scan Local Source Code:
- Scan a Kotlin Multiplatform (KMP) Library:
Step 2: Explore & Inspect Signatures (search / explain)¶
Why this step? Discover classes, top-level functions, parameter signatures, and receiver scopes directly from your terminal or AI prompt.
- Search for symbols in the index:
- Inspect standard symbol signatures & KDocs:
- Inspect DSL receiver scopes in 1 turn (
--deep): (Automatically resolves top-level@Composable fun GridtoGridKtand displays nested scopes likeGridScopeandGridItemSpanScope).
Step 3: Connect to AI Coding Assistants (ai-export / mcp)¶
Why this step? Feed version-accurate API knowledge to Cursor, Claude, Gemini, or Copilot so they generate 100% correct code without hallucinating.
- Export Token-Optimized Markdown Files:
(Generates compact documentation under build/ai-context/ for workspace chats).
- Start the Native MCP Server: (Integrates natively with Android Studio Gemini, Codex, Cursor, Windsurf, or Claude Desktop).
Step 4: Compare Library Versions & Upgrades (diff)¶
Why this step? Detect breaking changes, added/removed methods, or deprecations before upgrading a dependency in your project.