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

Code2Summarize

kr

|
31 installs
| (0) | Free
Summarize code files in your project with advanced glob pattern support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code2Summarize

Version VS Code

A powerful VS Code extension to summarize and document your code projects with advanced glob pattern support for precise file selection.

🌟 What's New in v0.2.0

  • 🎯 Glob Pattern Support: Use powerful glob patterns for precise file selection
  • 📂 Directory-Specific Patterns: Target specific directories with ease
  • 🚫 Exclusion Patterns: Explicitly exclude files with precedence over includes
  • 🔄 Backward Compatibility: Legacy simple extension matching still supported
  • 📊 Enhanced Statistics: Detailed file processing statistics in output

Features

  • Smart File Selection: Use glob patterns to precisely select which files to include
  • Comprehensive Output: Generates ASCII tree structure and file contents
  • Customizable Ignore List: Skip folders like node_modules, .git, dist, etc.
  • Multiple Language Support: Works with any text-based programming language
  • Statistics Summary: Get insights about processed files, lines, and sizes
  • Flexible Configuration: Choose between glob patterns or simple extensions

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Code2Summarize"
  4. Click Install

Or install from VS Code Marketplace

Usage

  1. Open your project folder in VS Code
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  3. Type "Summarize Code" and select the command
  4. Find the generated [ProjectName]_Code2Summarize.txt file in your root directory

Configuration

Configure the extension through VS Code settings (File > Preferences > Settings > Extensions > Code2Summarize)

New Configuration Options (v0.2.0)

code2summarize.includePatterns

Array of glob patterns for files to include.

Default:

[
  "**/*.{cs,py,jsx,ts,tsx,html,js,css,scss}",
  "src/**/*",
  "lib/**/*.js",
  "components/**/*.{jsx,tsx}"
]

code2summarize.excludePatterns

Array of glob patterns for files to exclude (takes precedence over includes).

Default:

[
  "**/*.test.{js,ts,jsx,tsx}",
  "**/*.spec.{js,ts,jsx,tsx}",
  "**/*.min.js",
  "**/*.generated.*",
  "**/migrations/**"
]

code2summarize.useGlobPatterns

Enable glob pattern matching. Set to false to use simple extension matching.

Default: true

Legacy Configuration

code2summarize.allowedExtensions

Simple file extensions to include (when useGlobPatterns is false).

Default: [".cs", ".py", ".jsx", ".ts", ".html", ".js"]

code2summarize.ignoreFolders

Folders to ignore during summarization.

Default includes: node_modules, .git, bin, obj, dist, build, and more.

Glob Pattern Examples

Pattern Description
**/*.js All JavaScript files recursively
src/**/*.{js,ts} JS and TS files in src directory
!**/*.test.js Exclude test files
components/**/index.{jsx,tsx} Component index files
*.config.js Config files in root only

📖 See GLOB_PATTERNS_GUIDE.md for comprehensive pattern documentation.

Example Output

The extension generates a comprehensive text file containing:

# Code2Summarize Report

## Configuration
- Mode: Glob Patterns
- Include Patterns: **/*.{js,ts}, src/**/*
- Exclude Patterns: **/*.test.js
- Generated: 2025-09-17T13:30:00.000Z

## Project Structure

MyProject ├── src/ │ ├── index.js │ ├── components/ │ │ └── Button.jsx │ └── utils/ │ └── helper.js └── package.json


## File Contents

### File: index.js
**Path**: `src/index.js`
**Lines**: 42
**Size**: 1.2 KB

```javascript
// File contents here...

Summary Statistics

  • Total Files Processed: 15
  • Total Lines: 1,234
  • Total Size: 45.6 KB

## Use Cases

- 📝 **Documentation**: Generate comprehensive project documentation
- 🤖 **AI Analysis**: Prepare code for AI model analysis
- 👥 **Code Reviews**: Share project structure with team members
- 📦 **Archiving**: Create snapshots of your codebase
- 🔍 **Auditing**: Review project organization and structure

## Requirements

- VS Code version 1.60.0 or higher
- Node.js (for extension development)

## Contributing

Contributions are welcome! Please check our [GitHub repository](https://github.com/karthyick/Code2Summarize).

### Development Setup

1. Clone the repository
2. Run `npm install`
3. Open in VS Code
4. Press F5 to run the extension in debug mode

## License

MIT License - see LICENSE file for details

## Author

Karthick Raja M - [@karthyick](https://github.com/karthyick)

## Acknowledgments

- VS Code Extension API
- minimatch library for glob pattern support
- Community contributors and feedback

## Changelog

See [CHANGELOG.md](https://github.com/karthyick/Code2Summarize/blob/HEAD/CHANGELOG.md) for version history.

---

**Enjoy summarizing your code!** 🎆
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft