OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Git2Txt

Git2Txt is a JavaScript command-line tool that downloads a public GitHub repository and combines its file contents into one text file for LLM analysis, review, or documentation.

Independent OpenViST project profile, based on linked sources.

Git2Txt — Public GitHub repositories whose text files should be gathered into one artifact
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Git2Txt when you need a text-file export of a public GitHub repository to supply as context for later analysis, review, or documentation.

Who it is for

  • Developers preparing public repository source text for LLM analysis.
  • People who want a single text artifact for repository review or documentation.

Documented uses

  • Combine repository file contents into one text export while preserving relative paths.
  • Exclude binary files and, by default, files larger than 100 KB.
  • Change the size threshold, include all files, or specify an output path.
Before you choose

Requirements & limits

Git2Txt is installed as a command-line tool with npm and supports Windows, macOS, and Linux. Its documented repository input is public GitHub content.

  • Files larger than 100 KB are excluded by default; the threshold is configurable in MB.
  • Binary files are excluded by default, while --include-all bypasses size and type filtering.
  • The tool processes subdirectories recursively but excludes node_modules and .git.
  • The repository can be specified as an HTTPS URL, owner/repository shorthand, or SSH URL.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Git2Txt and export a public repository

Create one text file from a public GitHub repository using the documented default filters.

Before you start

  • npm
  • A public GitHub repository, supplied as an HTTPS URL, owner/repository shorthand, or SSH URL
  • Windows, macOS, or Linux

Steps

  1. Install the CLI globally with the command below.

    Documented command
    npm install -g git2txt
  2. Run git2txt followed by the repository address or shorthand.

  3. Find the generated file in the current directory; by default it is named after the repository.

Expected outcome

A single text file containing repository file paths and contents, with binary files and files larger than 100 KB excluded by default.

Guide limitations

  • The documented command downloads public GitHub repositories.
  • The default processing excludes the node_modules and .git directories.
Source-based practical guide

Set an output path or change file inclusion

Adjust the generated text file’s destination or the default size and type filters.

Before you start

  • Git2Txt installed through npm
  • A public GitHub repository address or owner/repository shorthand

Steps

  1. Add --output=output.txt to choose a file path.

  2. Use --threshold=2 to set the size threshold to 2 MB, or choose another threshold in MB.

  3. Use --include-all to include files regardless of size or type.

Expected outcome

The export uses the requested output path or inclusion settings.

Guide limitations

  • The documented --include-all option disables size and type filtering, including the usual binary exclusion.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
10 November 2026
Original website title
addyosmani/git2txt · Official homepage title · retained in its source language