A JetBrains IDE plugin that allows you to quickly copy file locations with optional line numbers to the clipboard in Claude Code format.
- Quick Copy: Use Ctrl+Shift+C (configurable) to copy file location
- Smart Line Numbers (Claude Code format):
- When text is selected:
@/path/to/file#L41-49 - When no text selected:
@/path/to/file
- When text is selected:
- Multiple Access Points: Available in Edit menu and right-click context menu
- Instant Feedback: Shows notification when location is copied
- Download the latest plugin ZIP (claude-code-cp-plugin-x.x.x.zip) from Releases
- Install in your IDE:
- Go to File → Settings → Plugins
- Click the gear icon → Install Plugin from Disk...
- Select the downloaded ZIP file
- Clone this repository
- Run
./gradlew buildPlugin - Install the generated ZIP from
build/distributions/in your IDE:- Go to File → Settings → Plugins
- Click the gear icon → Install Plugin from Disk...
- Select the ZIP file
- Run
./gradlew runIdeto test the plugin in a development IDE instance
- Open any file in your JetBrains IDE
- Optionally select some text to include line numbers
- Press the keyboard shortcut or use Edit → Copy File Location:
- Windows/Linux:
Ctrl+Alt+Shift+K - macOS:
Cmd+Option+Shift+K
- Windows/Linux:
- The file location will be copied to your clipboard
No selection:
@/home/user/project/src/main/java/Example.java
Text selected from line 41 to 49:
@/home/user/project/src/main/java/Example.java#L41-49
Single line selected (line 25):
@/home/user/project/src/main/java/Example.java#L25
The keyboard shortcut can be changed in: File → Settings → Keymap → Search for "Copy File Location"
You can configure whether to copy absolute or relative paths: File → Settings → Tools → Claude Code Copy Location → Use relative paths
- Enabled (default): Copies relative paths like
@src/main/java/Example.java - Disabled: Copies absolute paths like
@/home/user/project/src/main/java/Example.java
- IntelliJ IDEA Community/Ultimate 2023.2+
- Other JetBrains IDEs based on IntelliJ Platform
This plugin is built using:
- Kotlin
- IntelliJ Platform Plugin SDK
- Gradle with Kotlin DSL
See CLAUDE.md for detailed development information.