Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeClippyNew to Visual Studio Code? Get it now.
CodeClippy

CodeClippy

tejascode

|
1 install
| (0) | Free
Tick files and copy their code to your clipboard.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeClippy - Copy Files Extension

A Visual Studio Code extension that allows you to browse your workspace in a tree view with checkboxes and copy selected file contents to clipboard.

Features

  • 📂 Tree view of workspace folders and files
  • ✅ Checkboxes for selecting files and folders
  • 📋 "Copy Selected Files" button to copy file contents to clipboard
  • 📄 Formats copied content with file path headers
  • 🚫 Ignores common dependency folders (e.g., node_modules, .git, dist, etc.)

Application Flow

  1. Extension Activation: When VS Code starts, the extension registers a status bar item with "📂 Copy Files" text
  2. Panel Opening: User clicks the status bar button → triggers codeclippy.openPanel command
  3. Workspace Scanning: Extension scans the workspace folder structure using tree.js (ignores common folders like node_modules, .git)
  4. Tree Rendering: Webview panel displays the folder structure with interactive checkboxes and collapsible folders
  5. File Selection: User selects files/folders via checkboxes (folder selection propagates to all children)
  6. Content Copying: User clicks "Copy Selected Files" button → webview sends selected file paths to extension
  7. File Reading: Extension reads actual file contents from filesystem using Node.js fs module
  8. Clipboard Writing: Extension formats content with file path headers and copies to clipboard via VS Code API
  9. Notification: User receives success/error notification about the copy operation
graph TD
    A[VS Code Starts] --> B[Extension Activates]
    B --> C[Status Bar Item Created]
    C --> D[User Clicks Status Bar]
    D --> E[Open Webview Panel]
    E --> F[Scan Workspace with tree.js]
    F --> G[Render Tree in Webview]
    G --> H[User Selects Files]
    H --> I[Click Copy Button]
    I --> J[Send File Paths to Extension]
    J --> K[Read File Contents]
    K --> L[Format & Copy to Clipboard]
    L --> M[Show Notification]

Folder Structure

codeclippy/
 ├─ src/
 │   ├─ extension.js
 │   ├─ panel.js
 │   ├─ tree.js
 │   └─ utils.js
 ├─ package.json
 └─ README.md

Installation

  1. Clone this repository
  2. Open the project in VS Code.
  3. Run npm install to install dependencies.
  4. Press F5 to launch a new VS Code window with the extension loaded.

Usage

  1. Press F5 to run the extension in a new VS Code window (Extension Development Host).
  2. Look at the bottom-right status bar for the 📂 Copy Files button.
  3. Click the button to open the CodeClippy panel.
  4. The panel will display your workspace folder structure with checkboxes.
  5. Select the files you want to copy (folders will select all contained files).
  6. Click 📂 Copy Selected Files.
  7. The selected file contents will be copied to your clipboard with file path headers.

Output Format

When you copy files, the clipboard content will be formatted like this:

// File: src/utils.js
[file content here]

// File: package.json
[file content here]

Development

  • Main extension entry: src/extension.js
  • Panel rendering logic: src/panel.js
  • Workspace tree building: src/tree.js
  • Helper functions: src/utils.js
  • Panel UI built with HTML + JavaScript, injected via VS Code Webview.
  • Uses the VS Code Webview API for communication between extension backend and panel UI.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.

License

MIT

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