Convert your entire code repository into a single .txt file or recreate its structure from the generated text file! π
- Convert GitHub or Local Repositories to Text: Convert entire repositories into a single
.txtfile with file contents. πβ‘οΈπ - Customizable File Size: Filter files based on a maximum size (default is 100 KB) to avoid including large, binary, or irrelevant files. π
- Recreate Directory Structure: Rebuild the file structure from a previously generated
.txtfile. ππ - File Type Filtering: Automatically excludes certain files and directories (e.g.,
node_modules,.git,.exe). π« - Readable Output: Each file is clearly marked with its path and content, making it easy to review and share. ππ¬
- Progress Bar: Track the conversion process with a friendly progress bar. π
- Respects .gitignore: Excludes files and directories specified in the
.gitignorefile. ππ
npm install -g totxtConvert a local or GitHub repository into a .txt file containing its code and content.
totxt create <path> [options]path(required): Path to your local repository or GitHub URL π-m, --max-size <size>(optional): Maximum file size in KB to include (default: 100 KB) π-o, --output <filename>(optional): Output text file name (default:<repo-name>_output.txt) ποΈ
- Simple Usage:
totxt create <path>
- Convert a GitHub Repo:
totxt create https://github.com/username/repository -o <your-directory-name>_output.txt
- Convert a Local Repo:
totxt create /path/to/your/repo -o <your-directory-name>_output.txt
Rebuild the file structure from the generated .txt file.
totxt recreate <txt-file> [options]txt-file(required): The.txtfile containing the repository contents π-b, --base-path <path>(optional): Base directory where the structure will be recreated (default:.) π
-
Simple Usage:
totxt recreate <output-file-location>
-
Convert a Local Repo:
totxt recreate <your-directory-name>_output.txt -b <your-directory-name>
Enjoy using totxt! π