
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
Convert GitHub repositories to text files with ease. This CLI tool downloads a repository and concatenates its contents into a single text file, making it perfect for analysis, documentation, or AI training purposes.
npm install -g git2txt
You can specify the repository in several formats:
# Full HTTPS URL
git2txt https://github.com/username/repository
# Short format (username/repository)
git2txt username/repository
# SSH format
git2txt git@github.com:username/repository
The tool accepts these GitHub repository URL formats:
https://github.com/username/repositoryusername/repositorygit@github.com:username/repository.git suffix--output, -o Specify output file path (default: repo-name.txt)
--threshold, -t Set file size threshold in MB (default: 0.1)
--include-all Include all files regardless of size or type
--debug Enable debug mode with verbose logging
--help Show help
--version Show version
Download and convert a repository using different formats:
# Using HTTPS URL
git2txt https://github.com/username/repository
# Using short format
git2txt username/repository
# Using SSH URL
git2txt git@github.com:username/repository
# With custom output file
git2txt username/repository --output=output.txt
# With custom file size threshold (2MB)
git2txt username/repository --threshold=2
# Include all files (no size/type filtering)
git2txt username/repository --include-all
# Enable debug output
git2txt username/repository --debug
The tool generates a text file with this format:
================================================================================
File: path/to/file.txt
Size: 1.2 KB
================================================================================
[File contents here]
================================================================================
File: another/file.js
Size: 4.5 KB
================================================================================
[File contents here]
Contributions are welcome! Please see our Contributing Guide for details.
MIT
FAQs
CLI tool to convert GitHub repositories to text files
The npm package git2txt receives a total of 3 weekly downloads. As such, git2txt popularity was classified as not popular.
We found that git2txt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.