initproject is a command-line tool designed to simplify the process of renaming folders and files in a specified directory. This tool replaces a specified template name with a new name across all files and directories in the target directory, while also ensuring that Git is set up properly.
- Directory Validation: Ensures the target directory exists and has Git initialized.
- Template Replacement: Replaces occurrences of a specified template name with a new name in both folder and file names.
- File Content Update: Modifies the content of files to replace the template name with the new name.
- Customizable Options: Supports customizable command-line options for directory, template name, and file extensions.
- .NET Framework (version 4.8 or later)
- Git must be installed and accessible from the command line.
-
Clone the repository:
git clone https://github.com/watertrans/initproject.git -
Navigate to the project directory:
cd initproject -
Build the project using your preferred method (e.g., Visual Studio or .NET CLI).
To run the program, use the following command structure:
initproject.exe --dir <directory> --name <new_name> [--template <template_name>] [--ext <extensions>]
--diror-d: Specify the target directory. (Required)--nameor-n: Specify the name to replace the template name. (Required)--templateor-t: Specify the template name to replace. (Optional, defaults to__template__)--extor-e: Specify the file extensions to process (Optional, defaults to.cs,.csproj,.vb,.vbproj,.config,.json,.aspx,.css,.js,.html,.sln)
initproject.exe --dir "C:\Projects\MyProject" --name "MyNewProject"
This project is licensed under the MIT License.