Skip to content
AddHunt
VS Code extensions

Copy4AI

VS Code extension that copies files and tree for AI chats

Open source

  • Open source
  • Licence: GPL-3.0

In short

Copy4AI is a free, open-source VS Code extension that copies the contents of selected files together with the project tree, ready to paste into an AI chat. It is for developers who ask chat assistants about their code and want to skip copying files one by one.

What you get

  • Copies file contents with the project tree
  • Copies selected Git diffs
  • Markdown, XML or plain-text output
  • Offline token estimates
  • Skips dot files and .gitignore matches
  • Reuses the last selection

The details

Copy4AI removes the busywork of pasting code into a chat assistant one file at a time. Select files or folders in the editor's explorer, right-click and choose the Copy4AI command, and the extension places their contents on the clipboard together with a tree of the project structure. The result can then be pasted into whichever AI tool is in use.

Options for what gets copied

  • Copy only Git changes from Source Control instead of whole files
  • Choose Markdown, XML or plain text as the output format
  • Show an optional token estimate that is calculated offline
  • Leave out dot files, paths matched by the root .gitignore and custom exclusions
  • Copy the project tree on its own or alongside the files
  • Repeat the last selection to grab the newest saved contents

Local by design

The extension only writes to the clipboard, and the user decides what to paste and where. It makes no network requests, sends no telemetry and needs no account, API key or subscription. Copy4AI is free with no paid tier, and its source code is published on GitHub under GPL-3.0. VS Code users install it from the Visual Studio Marketplace, while Cursor and VSCodium users get it from Open VSX.

Alternatives to Copy4AI

Questions

Does Copy4AI need an account or API key?

No. It works right after installation without an account or API key, and it does not send network requests.

Can it be used in Cursor or VSCodium?

Yes. Those editors install it from Open VSX, while VS Code uses the Visual Studio Marketplace.

Is there a paid version?

No. The full extension is free, and the code is open source under GPL-3.0.

More like this