A VS Code extension that allows you to export your entire codebase or specific files into a single LLM-friendly text, directly from your IDE, no external tools needed. See a demo here!
- Contextual Code Selection: Select files and folders from your workspace to include as context in your AI prompts
- Dual Selection Methods:
- Tree view with checkboxes for selecting multiple files/folders
- @mention support in the editor to quickly reference specific files
- Smart Search: Find files quickly with built-in search functionality
- Customizable Templates: Format your prompts exactly how you need with template editors
- Easy Copy: One-click copy of your prompt with all selected file contents
- Token Counter: See estimated token usage for your selection
- Performance Optimizations:
- Respects .gitignore patterns
- Optional exclusion of hidden directories
- File size limits to prevent token overflow
- Install the extension from the VS Code Marketplace
- Access RepoText from the activity bar in VS Code
- Select files/folders or use @mentions to include them in your prompt
- Use the tree view panel to browse your project files
- Check the boxes next to files or folders you want to include
- Use the search box to quickly find specific files
- Click "Copy" to copy the formatted code with file structure to your clipboard
- Type your prompt in the editor
- Use the @ symbol to mention files (e.g., @app.js)
- Select from the autocomplete dropdown
- Click "Copy" to copy your prompt with the referenced code
- Exclude Hidden Directories: When enabled, directories starting with "." will be excluded (recommended for performance)
- Respect .gitignore: When enabled, files and directories listed in your .gitignore will be excluded
- Max File Size (MB): Files larger than this size will be excluded to prevent token limit issues
RepoText offers powerful template customization options:
Customize how prompts from the editor are formatted with these variables:
fileMap
: A visual representation of the file structurefileContents
: The contents of selected filesuserText
: Text entered by the user in the prompt editor
Customize how prompts from the tree view are formatted with these variables:
fileMap
: A visual representation of the file structurefileContents
: The contents of selected files
Customize how each file is displayed within the prompt:
filePath
: The path of the file relative to the workspacefileContent
: The content of the file
Contributions are welcome! Please feel free to submit a Pull Request.