Skip to content
/ vibecopy Public

πŸ“‹ Copy multiple files to context, for a faster proompting and vibe-coding experience. select files in sidebar, right click, and get them ready to shove into AI, with their path!

License

Notifications You must be signed in to change notification settings

aarmn/vibecopy

Repository files navigation

VibeCopy: Code Context at Lightspeed πŸš€βœ¨

Version Open VSX Version License: MIT Installs

Tired of the endless copy-paste dance when feeding code context to your AI assistant? Need to quickly bundle multiple files for sharing or documentation?

Stop the madness. Start the vibe.

VibeCopy is your slick VS Code sidekick designed to grab the contents of selected files and instantly format them into a clean, structured Markdown block. Perfect for vibe coding, prompt engineering, or just getting code out of your editor and into the context you need, fast.


✨ Vibe Check: What Does It Do? ✨

Select one or multiple files in your VS Code explorer, right-click, and VibeCopy magically combines their content into a structured format, ready for action.

  • Get Context Quicker: Seamlessly copy code for LLMs like ChatGPT, Claude, Copilot, etc.
  • Effortless Sharing: Bundle related files into a single block.
  • Streamlined Workflow: No more opening, selecting all, copying, pasting... repeat. Just select, click, done.

🎬 See It In Action! 🎬

Web version: web version demo

Desktop version: desktop version demo


πŸš€ Features πŸš€

  • Multi-File Select: Grab as many files as you need from the Explorer.
  • Copy to Clipboard (Desktop): Instantly copies the formatted Markdown to your clipboard. (VibeCopy: Copy Selected as Markdown)
  • Open in Editor (Web & Desktop): Opens the formatted Markdown in a new, untitled editor tab – perfect for VS Code for the Web or when you want to review/edit before copying. (VibeCopy: Open Selected as Markdown)
  • Smart Formatting: Each file's content is wrapped in Markdown code fences with the language identifier automatically detected from the file extension.
  • Clear File Separation: Files are clearly marked using --- file: filename.ext --- separators.
  • Web Extension Ready: Works smoothly in VS Code for the Web (with the "Open in Editor" command).

πŸ› οΈ How to Use πŸ› οΈ

  1. Select: In the VS Code File Explorer, select one or more files (use Ctrl/Cmd or Shift for multiple).
  2. Right-Click: Right-click on any of the selected files.
  3. Choose Your Vibe:
    • Click VibeCopy: Copy Selected as Markdown to copy the formatted content directly to your clipboard (Available on Desktop VS Code only).
    • Click VibeCopy: Open Selected as Markdown to open the formatted content in a new Markdown editor tab (Works everywhere!).
  4. Paste or Profit: Paste the content into your AI chat, document, or wherever you need it! If you used "Open", the content is ready for review in the new tab.

πŸ“‹ Output Format Example πŸ“‹

If you select src/utils.ts and styles/main.css, the "Copy" command gives you this on the clipboard:

---
---
file: utils.ts
\`\`\`typescript
// src/utils.ts
export function helperFunction(param: string): string {
  return `Processed: ${param}`;
}
\`\`\`
---

\-\-\-
file: main.css
\`\`\`css
/* styles/main.css */
body {
  font-family: sans-serif;
  color: #333;
}
\`\`\`
---
---

The "Open" command opens a new tab with this content:

<codes-list>
---
file: utils.ts
```typescript
// src/utils.ts
export function helperFunction(param: string): string {
  return `Processed: ${param}`;
}


file: main.css

/* styles/main.css */
body {
  font-family: sans-serif;
  color: #333;
}

```

(Note the surrounding <codes-list> tags added by the "Open" command, potentially useful for specific parsing needs or just structure in the editor).


πŸ’Ύ Installation πŸ’Ύ

  1. Open VS Code.
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
  3. Search for VibeCopy.
  4. Click Install.
  5. Reload VS Code if prompted.

Alternatively, install from:


⌨️ Commands ⌨️

  • VibeCopy: Copy Selected as Markdown (ID: vibecopy.copySelectedAsMarkdown)
    • Copies formatted content of selected file(s) to the clipboard.
    • Context Menu visible only in Desktop VS Code (when: "!isWeb").
  • VibeCopy: Open Selected as Markdown (ID: vibecopy.openSelectedAsMarkdown)
    • Opens formatted content of selected file(s) in a new editor tab.
    • Context Menu visible in both Desktop and Web VS Code.

🌐 Compatibility Note 🌐

  • The Copy to Clipboard command relies on VS Code's clipboard API, which is generally restricted in web browser environments for security reasons. Therefore, this command is only enabled in the context menu for Desktop VS Code.
  • The Open in Editor command works perfectly in both Desktop and Web versions of VS Code.

πŸ’‘ Issues & Contributions πŸ’‘

Found a bug? Have a suggestion? Feel free to open an issue on the GitHub Repository!

Contributions are welcome! Fork the repo and submit a pull request.


πŸ“œ License πŸ“œ

MIT License Β© aarmn


Keep the vibe flowing! Happy Coding! ✨

About

πŸ“‹ Copy multiple files to context, for a faster proompting and vibe-coding experience. select files in sidebar, right click, and get them ready to shove into AI, with their path!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published