Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AI Code ReferencerNew to Visual Studio Code? Get it now.
AI Code Referencer

AI Code Referencer

Koushik Das

|
1 install
| (1) | Free
Copy formatted code references with relative file paths, line numbers & snippets for Claude Code, AGY, Codex, Cursor, & ChatGPT.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Code Referencer ⚡

A lightweight, super-fast VS Code extension to copy code snippets with relative file paths, line numbers, and selectable reference formats directly to your clipboard for Claude Code, AGY CLI, Codex, Cursor, ChatGPT, and other AI coding assistants.

Quick Demo 🎬

AI Code Referencer Demo

Features 🚀

  • Instant Copying: Highlight any code and press Cmd+Alt+R (Ctrl+Alt+R on Windows/Linux).

  • Multiple Output Formats: Supports AGY, Claude Code, Codex, Markdown, and plain path:line output.

    • Default copy command uses your configured format.
    • Optional chooser command lets you pick the format at copy time.
    • AGY / Claude Code / Codex format example:
    @app/features/chat/llm_provider/gemini_provider.py
    
    line 15:
    self.client = genai.Client(api_key=self.api_key)
    
  • Single Line & Range Support: Handles single line selection or multi-line range selection (line 15-20).

Configuration

Set the default format in VS Code settings:

AGY Code Referencer -> Default Format

Available values:

  • agy
  • codex
  • claude-code
  • markdown
  • plain

If no default is configured, the extension uses a host-aware fallback. That fallback is controlled by:

  • AGY Code Referencer -> Host Defaults

Example:

{
  "agyCodeReferencer.hostDefaults": {
    "cursor": "claude-code",
    "vscode": "agy",
    "windsurf": "codex",
    "codium": "agy"
  }
}

Notes:

  • If a host name is not present in hostDefaults, the extension falls back to agy.
  • The chooser command always lets you override the default manually.

If you want to choose manually each time, run:

AGY: Copy Code Reference (Choose Format)

Direct preset commands are also available:

  • AGY: Copy Code Reference (Claude Code)
  • AGY: Copy Code Reference (Codex)

Keyboard Shortcuts ⌨️

OS Shortcut Command
macOS Cmd + Option + R AGY: Copy Code Reference
macOS Cmd + Option + Shift + R AGY: Choose Format
Windows / Linux Ctrl + Alt + R AGY: Copy Code Reference
Windows / Linux Ctrl + Alt + Shift + R AGY: Choose Format

Support the Project ☕

If AGY Code Referencer saves you time and makes your workflow smoother, consider supporting the project! Your support keeps this extension 100% free and actively maintained.

Ko-fi

Enjoy coding! 🎉

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft