A VS Code extension that helps you analyze and generate comprehensive reports of your repository content.
- Project-Specific Sessions: Your excluded files are saved per project and restored when you reopen VS Code.
- Interactive File Tree: Browse your repository structure with an interactive tree view, click to open files.
- Modern Webview Interface: Use a fast, modern web-based interface with advanced selection and multi-select support.
- Material File Icons in Webview: File and folder icons in the webview are powered by the Material Icon Theme icon pack and bundled locally with the extension.
- Classic Treeview Interface: Switch to the traditional VS Code tree view if you prefer native look and feel.
- Selective Analysis: Include or exclude specific files and folders from analysis.
- Partial File Selection: Add only specific lines or code fragments from files to your report.
- Live Line & Character Counters: See up-to-date line, character, and file counts for any selection, file, or folder.
- AI-Enhanced Analysis: Generate AI-powered analysis reports.
- Report Generation: Generate detailed reports of your repository content.
- Real-Time Updates: Automatically updates when files change in your workspace.
RepoTxt supports two interface modes:
-
Webview (default):
A modern, web-based UI with advanced features:- Multi-select files and folders (Ctrl/Cmd+Click, Shift+Click)
- Fast navigation and smooth performance, even for large repositories
- Live counters and tooltips for lines, characters, and files
- Partial selection badges and quick actions
-
Treeview:
The classic VS Code tree view:- Native look and feel
- Supports all core features (exclusion, partial selection, report generation)
- Can be enabled via the
repotxt.interfaceTypesetting
You can switch between these modes in the extension settings (repotxt.interfaceType).
The webview interface uses a vendored copy of the Material Icon Theme icon pack for file and folder icons.
The icons are bundled locally under:
media/material-icons/
This means the webview does not depend on external CDNs, internet access, or a Material Icon Theme extension installed by the user. The icon assets are synced from the npm package during development and then packaged with the extension.
To refresh the bundled icons from the pinned npm package version, run:
npm run sync:iconsThe sync command copies the required SVG assets from node_modules/material-icon-theme, updates media/icons.js, and writes source metadata to media/material-icons/source.json.
The extension provides a tree view of your repository where you can:
- View all files and folders in your workspace
- Click files to open them in the editor
- Toggle files/folders to include/exclude from analysis
- See excluded items marked with a closed eye icon
- See files with partial selections marked with a special badge
- Your exclusion and selection choices are saved for each project
- Select any lines in the editor and use the "Add Selection to Report" command (or right-click context menu)
- Files with partial selections are marked in the tree and can be reset with one click
- The report will include only the selected line ranges for such files
- The status bar shows the total number of lines, characters, and files that will be included in the report (taking exclusions and partial selections into account)
- Tooltips for files and folders show line, character, and file counts (all stats respect exclusions and partial selections)
- For partially included files and folders, stats are calculated only for the selected ranges
- Regular Analysis: Basic file structure and content analysis
- AI Analysis: Enhanced analysis with intelligent structure interpretation and recommendations (configurable via settings)
Generate comprehensive reports that include:
- Complete folder structure
- File contents (or only selected fragments, if partial selection is used)
- Analysis based on selected mode
- Excluded items are automatically omitted from reports
- Install the extension
- Open your repository in VS Code
- Access the Repo Analyzer view from the activity bar
- Use the tree view or webview to manage which files or code fragments to analyze
- Click the "Generate Report" button to create a report
- Toggle Exclude (eye icon): Include/exclude files from analysis. Your choice is saved for the project.
- Generate Report (notebook icon): Create a new analysis report
- Refresh (refresh icon): Update the file tree view
- Reset Exclusions (clear-all icon): Reverts all manual inclusions/exclusions to the defaults defined in your settings.
- Add Selection to Report: Add the currently selected lines in the editor to the report (right-click or command palette)
- Clear Selections: Remove all partial selections for the current file
The extension can be configured through VS Code settings:
repotxt.interfaceType: Choose between"webview"(default) and"treeview"interface modes.
repotxt.aiStyle: Enable/disable AI-enhanced analysis- Default:
false
- Default:
repotxt.aiPrompt: Customize the AI analysis prompt.
repotxt.autoExcludeEnabled: Enable/disable automatic file exclusion based on patterns.- Default:
true
- Default:
repotxt.autoExcludePatterns: Patterns of files and folders to automatically exclude.- Default patterns:
node_modules,.git,dist,build, etc. - Supports glob patterns like
*.log.
- Default patterns:
repotxt.respectIgnoreFiles: Automatically exclude files listed in ignore files.- Default:
true
- Default:
repotxt.ignoreFileNames: A list of filenames to treat as ignore files.- Default:
[".gitignore"] - You can add other files like
.dockerignore,.eslintignore, etc.
- Default:
repotxt.excludeBinaryFiles: Automatically exclude binary files from analysis.- Default:
true
- Default:
repotxt.binaryFileExtensions: A list of file extensions to be considered binary.- Default: A comprehensive list of image, archive, and executable extensions.
repotxt.showStatusBarLineCount: Show total line count in the status bar (default:true)repotxt.showStatusBarCharCount: Show total character count in the status bar (default:true)repotxt.showStatusBarFileCount: Show total file count in the status bar (default:true)repotxt.showTooltipLineCount: Show line count in file/folder tooltips (default:true)repotxt.showTooltipCharCount: Show character count in file/folder tooltips (default:true)repotxt.selectionHighlightColor: Color for partial selection highlights in the gutter (hex format)
You can modify these settings in VS Code:
- Open Settings (Ctrl/Cmd + ,)
- Search for "Repository Analyzer"
- Adjust settings as needed
Install dependencies:
npm ciIf the lockfile is missing or outdated, use:
npm installSync the webview icon pack:
npm run sync:iconsCompile the extension:
npm run compilePackage the extension as a .vsix file:
npx @vscode/vsce packageA typical clean build flow is:
npm ci
npm run sync:icons
npm run compile
npx @vscode/vsce packageThen install the generated .vsix in VS Code via Extensions → ... → Install from VSIX..., or from the command line:
code --install-extension repotxt-0.5.0.vsixWhen updating the icon pack, change the pinned material-icon-theme version in package.json, reinstall dependencies, then run npm run sync:icons again.
- Visual Studio Code version 1.90.0 or higher
- A workspace/folder opened in VS Code
Feel free to submit issues and enhancement requests on the GitHub repository.
This extension is licensed under the MIT License.
The bundled webview file and folder icons are sourced from Material Icon Theme, which is also licensed under the MIT License. The vendored icon metadata, license, and attribution are stored in media/material-icons/.