Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AI Reference ConcatenatorNew to Visual Studio Code? Get it now.
AI Reference Concatenator

AI Reference Concatenator

Preview

Long Le

|
9 installs
| (0) | Free
Transforms your project files into an AI-ready reference document.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Reference Concatenator

PRs Welcome Github Open Issues License

AI Reference Concatenator is a Visual Studio Code extension designed to transform your project files into a single, AI-ready reference document. By merging selected files and folders into one comprehensive output file—with clear, relative path headers—it becomes a powerful resource for providing context to AI systems for code analysis, documentation generation, and other advanced tasks.

Features

  • Merge Multiple Files: Select and combine multiple files from the explorer into one output document.
  • Recursive Folder Concatenation: Select one or more folders; the extension will recursively merge all contained files.
  • Project Structure Generation: Generate a markdown file showing the tree structure of your project, respecting .airefignore patterns.
  • Mixed Selection Support: Works with a combination of files and folders.
  • Relative Path Headers: Each file's content is prefixed with a header showing its path relative to the workspace root.
  • Custom Output File Name: Provides an option to specify the name of the output file (default is concatenated.txt for concatenation, project-structure.md for structure generation).
  • Context Menu Integration: Easily access the commands via the explorer context menu:
    • Visible when selecting multiple files, one or more folders, or mixed selection.
    • Hidden when only a single file is selected.
  • Automatic Output Opening: Automatically opens the generated file after processing.
  • Optimized for AI: The structured output file is ideal for supplying to AI systems as reference material, ensuring context is maintained for tasks like code analysis or generating accurate documentation.
  • Ignore Patterns: Supports .airefignore file to exclude specific files and directories from processing.

Usage

File Concatenation

  1. Select Files/Folders: In the VS Code Explorer, select the files and/or folders you want to concatenate.
  2. Right-Click: Right-click on one of the selected items.
  3. Choose Command: Select "Concat Selected Files" from the context menu.
  4. Enter Output Name: An input box will appear. Enter the desired name for the output file (e.g., bundle.js, combined_log.txt) and press Enter.
  5. Review: The extension creates the output file in your workspace root, complete with relative path headers for each file, and opens it for your review.

Project Structure Generation

  1. Select Files/Folders: In the VS Code Explorer, select the files and/or folders you want to include in the structure. If nothing is selected, it will default to the workspace root.
  2. Right-Click: Right-click on one of the selected items.
  3. Choose Command: Select "Generate Project Structure" from the context menu.
  4. Enter Output Name: An input box will appear. Enter the desired name for the structure file (default is project-structure.md) and press Enter.
  5. Review: The extension creates a markdown file showing the tree structure of your project, respecting .airefignore patterns, and opens it for your review.

Demo GIF (Placeholder - replace with actual demo) (Replace the above placeholder with a GIF showing the extension in action)

Installation

From Marketplace (Coming Soon!)

Once published, install the extension directly from the Visual Studio Marketplace.

  1. Open VS Code.
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
  3. Search for AI Reference Concatenator or longle.ai-reference-concatenator.
  4. Click "Install".

From Source (for Development/Testing)

  1. Clone the repository:
    git clone https://github.com/longle255/ai-reference-concatenator.git
    
  2. Navigate into the directory:
    cd ai-reference-concatenator
    
  3. Install dependencies:
    pnpm install
    
  4. Open the project in VS Code:
    code .
    
  5. Press F5 to launch a new Extension Development Host window with the extension loaded.

Development

Follow the steps mentioned in the From Source section above.

  • Build: Use pnpm run compile or pnpm run watch for incremental builds.
  • Lint: Run pnpm run lint
  • Run Tests: Execute pnpm run test (tests might need to be set up).
  • Package: Use pnpm vsce package (ensure vsce is installed globally via npm install -g @vscode/vsce)

Contributing

Contributions, issues, and feature requests are welcome! Please check the issues page before submitting a new issue.

When contributing, please adhere to the existing coding style and run the linting script (pnpm run lint) before submitting a pull request.

License

Distributed under the license specified in the LICENSE file.


Developed by Long Le.

Credits

VSCode Extension

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