Downloads GitHub repository contents into a single text file, skipping build artifacts and system files. Perfect for creating context files for AI assistants.
- Downloads all source files from a GitHub repository
- Skips common build artifacts, dependencies, and system files
- Preserves file paths in the output
- Uses go-git for authentication and private repos
go install github.com/domano/gitloader@latest
gitloader github.com/domano/gitloader # Will check out this repo into one filegit clone https://github.com/domano/gitloader
cd reponame
go mod init github-content
go get github.com/go-git/go-git/v5
go install
gitloader github.com/domano/gitloader # Will check out this repo into one fileor just run
go run main.go https://github.com/user/repoafter checkout
Output will be saved as user-repo.txt in the current directory.
- Hidden files/directories (starting with .)
- Build directories (dist, build)
- Dependencies (node_modules, vendor)
- Lock files (package-lock.json, go.sum, etc.)
Uses your system's Git credentials for private repositories.