A plugin that helps you organize and copy content from multiple files with paths and names to your clipboard. Perfect for providing context to AI assistants for more accurate and efficient responses.
🛑 DISCLAIMER: The repository is provided as is. It is not intended to be used as a reference for best practices or as a reference for how to write good code. If you find any bugs please try to fix them :-) I'm a .NET developer, this is my first Kotlin project, which was built (with a help of AI) to solve a problem I had.
- Copy selected files with file paths and syntax highlighting markers
- Copy opened files with file paths and syntax highlighting markers
- Available in Project View context menu, Edit menu, and Tools menu
- Automatically detects file type and adds appropriate language identifier for code blocks
- IntelliJ IDEA 2024.1 or newer
- Java 17+
-
Clone the repository
git clone https://github.com/zemacik/jb-copy-for-ai-plugin.git cd jb-copy-for-ai-plugin
-
Build the plugin
./gradlew build
This will generate a plugin ZIP file in
build/distributions/
.
This plugin is not published to the JetBrains Plugin Marketplace. To install:
- In IntelliJ IDEA, go to
File
>Settings
>Plugins
- Click the gear icon (⚙️) and select
Install Plugin from Disk...
- Navigate to the
build/distributions/
directory and select the ZIP file - Click
OK
and restart IntelliJ IDEA when prompted
- Select one or more files in the Project View
- Right-click and select
Copy for AI Assistant (Selected Files)
- Paste the content into your AI assistant
- With files open in the editor
- Go to
Edit
>Copy for AI Assistant (Opened Files)
- Paste the content into your AI assistant
- Select text in the editor
- Right-click and select
Copy for AI Assistant (Editor)
- Paste the content into your AI assistant
The project uses Gradle and the IntelliJ Platform Plugin Template:
- Kotlin 1.9.25
- IntelliJ Plugin Gradle Plugin 1.17.4
- Targeting IntelliJ IDEA 2024.1+
To run the plugin in a development instance:
./gradlew runIde
See LICENSE for licensing information.