Transform your code into AI-ready prompts! This VS Code extension helps you easily convert your codebase into structured prompts for Large Language Models (LLMs).
Features
📁 Interactive File Explorer: Browse and select files through a dedicated sidebar view
✨ Smart File Filtering: Automatically excludes common asset files and folders (like images, node_modules, etc.)
📊 Token Count: Real-time token counting using tiktoken for GPT-4 compatibility
🎯 Selective Code Export: Choose specific files or entire folders to include in your prompt
📝 LLM-Friendly Format: Automatically formats your code with clear file separators and paths
📋 One-Click Copy: Easily copy the formatted code to your clipboard
⚙️ Customizable Separators: Modify the file separators to match your preferred format
Installation
Open VS Code
Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
Search for "Code To Prompt"
Click Install
Usage
Open the Code To Prompt Explorer in the activity bar (look for the extension icon)
Browse through your project files in the explorer view
Check/uncheck files or folders you want to include in your prompt
The selected files will be formatted automatically with:
File paths as comments
Customizable separators between files
Token count for each file
Click the copy icon to copy the formatted code to your clipboard
Paste directly into your favorite LLM!
Customization
Click the settings icon (⚙️) in the explorer view to customize the separator between files
Default separator is "====="
Tips
The extension automatically excludes common asset folders and files (images, fonts, etc.)
Token counts are calculated using the GPT-4 tokenizer for accurate estimation
Use folder selection to quickly include/exclude multiple files
The extension maintains your selection state even when the view is hidden
Requirements
VS Code version 1.97.0 or higher
Contributing
Found a bug or have a feature request? Please open an issue on our GitHub repository.
Note: This extension is designed to help developers create better prompts for AI models. It does not send any of your code to external services - all processing is done locally.