New Project: NameAlert macOS menu-bar app that listens for your name (or any keyword) on system audi...
New Project: Better Gemini Wider Gemini UI, omnibox quick launch, Markdown export, and 40+ keyboard shor...
New Project: QuickTerminal Cmd+Shift+. for instant terminal access in JetBrains IDEs — 1.1K+ installs.

ContextCraft

An IntelliJ plugin that intelligently copies source files with their related dependencies for providing comprehensive context to LLMs.

IDE Plugin //

ContextCraft

The Plugin That Makes AI Understand Your Code Better

An IntelliJ plugin that enhances AI-assisted development by intelligently copying source files and their related dependencies. Perfect for providing comprehensive context to LLMs for better code suggestions, documentation, and test generation.


Features

  • One-Click Copy - Copy source files with related dependencies instantly
  • Three Relatedness Levels - Strict, Medium, or Broad for precise control
  • Smart Package Detection - Automatic relationship mapping
  • Configurable Depth - Set how deep to track references
  • Multi-Language Support - Java, Kotlin, Scala, Groovy
  • Interface Tracking - Include implementations automatically
  • External Dependencies - Decompiled library classes support
  • Java Stdlib Filtering - Exclude standard library noise
  • Smart Pruning - Remove irrelevant content
  • Persistent Settings - Remember your preferences
  • Context Menu Integration - Available in Editor and Project views

Installation

From Plugin Marketplace

  1. Download the latest .zip from Releases
  2. In IntelliJ: Settings > Plugins
  3. Click gear icon > Install Plugin from Disk...
  4. Select the downloaded ZIP file
  5. Restart IntelliJ IDEA

Build from Source

# Clone repository
git clone https://github.com/balakumardev/ContextCraft

# Build plugin
./gradlew buildPlugin

# Install from build/distributions/

Usage

  1. Right-click on any source file (Project view or Editor)
  2. Select "Copy File with Related Files"
  3. Configure options in the dialog:
    • Relatedness Level - Strict, Medium, or Broad
    • Depth - How many levels of references to include
    • Interface Implementations - Toggle on/off
    • Package Filtering - Include/exclude packages
    • Java Stdlib Exclusion - Filter out standard library
  4. Paste content into your preferred LLM
  5. Get context-aware responses

Relatedness Levels

Level Description Best For
Strict Only direct imports Quick queries, simple files
Medium Direct imports + one level deep Most use cases
Broad Full dependency tree Complex refactoring, architecture questions

Requirements

  • IntelliJ IDEA 2023.1 or later
  • Java 17 or later
  • Kotlin plugin installed

Tech Stack

  • Language: Kotlin
  • Platform: IntelliJ Platform Plugin
  • Build: Gradle
  • Compatibility: All JetBrains IDEs

Roadmap

  • [ ] Format templates for different LLMs
  • [ ] Direct LLM API integration
  • [ ] Multiple file selection support
  • [ ] Custom file type support
  • [ ] Improved Kotlin support
  • [ ] Context-aware code summarization

Related Projects

Looking for the GoLand version? Check out ContextCraft for GoLand


Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

GNU General Public License v3.0 - see LICENSE for details.


Support

If you find this plugin useful:

  • Star the repo on GitHub
  • Share with your network
  • Report issues or suggest improvements

Contact

Bala Kumar - mail@balakumar.dev