Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.75 KB

File metadata and controls

47 lines (38 loc) · 1.75 KB

CodeBundler CLI 📦

A .NET command-line tool designed to bundle multiple source code files into a single structured file. Perfect for teachers reviewing student projects or developers needing to consolidate code for analysis.

Features

  • Smart Filtering: Bundle files by programming language or include everything.
  • Auto-Cleanup: Option to remove empty lines to keep the bundle concise.
  • Metadata Support: Add author names and source file paths as comments.
  • Sorting: Organize the bundled code by file name or extension.
  • Interactive RSP: Easily generate response files for recurring tasks using create-rsp.

Installation

  1. Clone the repository or download the source code.
  2. Build the project using Visual Studio or the .NET CLI.
  3. Add the path to the publish folder to your system's Environment Variables (Path).
  4. Open a terminal and type bundle --help to verify.

Usage & Examples

1. Basic Bundling (Single Language)

Bundle all C# files in the current directory into a single text file:

bundle --language cs --output my-bundle.txt

2. Advanced Bundling (Multiple Parameters)

Bundle C# and Java files, sort by name, remove empty lines, add source paths as comments, and include the author's name:

bundle --language cs java --output C:\Projects\Output\bundle.txt --sort name --remove-empty-lines --note --author "Shulamit"

3. Bundle All Files

Bundle all supported code files in the directory without specifying a language:

bundle --language all --output full-project-bundle.txt

4. Using a Response File

Generate an interactive configuration file and run it:

create-rsp
dotnet @my-config.rsp

Requirements

  • .NET 6.0 Runtime or higher.
  • System.CommandLine (Beta).