Skip to content

makwanadeepam/totxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

totxt πŸ“„

Code Repository to Single .txt File

Convert your entire code repository into a single .txt file or recreate its structure from the generated text file! πŸš€


Features 🌟

  • Convert GitHub or Local Repositories to Text: Convert entire repositories into a single .txt file 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 .txt file. πŸ”„πŸ“‚
  • 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 .gitignore file. πŸ›‘πŸ“œ

Install πŸ”§

npm install -g totxt

Usage πŸ“

create - Convert Repository to Text File

Convert a local or GitHub repository into a .txt file containing its code and content.

totxt create <path> [options]

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) πŸ–‹οΈ

Examples:

  • 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

recreate - Recreate Repository Structure from Text File

Rebuild the file structure from the generated .txt file.

totxt recreate <txt-file> [options]

Options:

  • txt-file (required): The .txt file containing the repository contents πŸ“„
  • -b, --base-path <path> (optional): Base directory where the structure will be recreated (default: .) πŸ“

Examples:

  • 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! πŸŽ‰

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •