
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Gitingest is a Ruby gem that fetches files from a GitHub repository and generates a consolidated text prompt, which can be used as input for large language models, documentation generation, or other purposes.
gem install gitingest
git clone https://github.com/davidesantangelo/gitingest.git
cd gitingest
bundle install
bundle exec rake install
# Basic usage (public repository)
gitingest --repository user/repo
# With GitHub token for private repositories
gitingest --repository user/repo --token YOUR_GITHUB_TOKEN
# Specify a custom output file
gitingest --repository user/repo --output my_prompt.txt
# Specify a different branch
gitingest --repository user/repo --branch develop
# Exclude additional patterns
gitingest --repository user/repo --exclude "*.md,docs/"
# Control the number of threads
gitingest --repository user/repo -T 4
# Set thread pool shutdown timeout
gitingest --repository user/repo -W 120
# Show repository directory structure
gitingest --repository user/repo -s
# Combine threading options
gitingest --repository user/repo -T 8 -W 90
# Quiet mode
gitingest --repository user/repo --quiet
# Verbose mode
gitingest --repository user/repo --verbose
-r, --repository REPO
: GitHub repository (username/repo) [Required]-t, --token TOKEN
: GitHub personal access token [Optional but recommended]-o, --output FILE
: Output file for the prompt [Default: reponame_prompt.txt]-e, --exclude PATTERN
: File patterns to exclude (comma separated)-b, --branch BRANCH
: Repository branch [Default: repository's default branch]-s, --show-structure
: Show repository directory structure instead of generating prompt-T, --threads COUNT
: Number of concurrent threads [Default: auto-detected]-W, --thread-timeout SECONDS
: Thread pool shutdown timeout [Default: 60]-q, --quiet
: Reduce logging to errors only-v, --verbose
: Increase logging verbosity-h, --help
: Show help messagegitingest --repository user/repo --show-structure
This will display a tree view of the repository's structure:
require "gitingest"
# Basic usage - write to a file
generator = Gitingest::Generator.new(
repository: "user/repo",
token: "YOUR_GITHUB_TOKEN" # optional
)
# Run the full workflow (fetch repository and generate file)
generator.run
# OR generate file only (if you need the output path)
output_path = generator.generate_file
# Get content as a string (for in-memory processing)
content = generator.generate_prompt
# With custom options
generator = Gitingest::Generator.new(
repository: "user/repo",
token: "YOUR_GITHUB_TOKEN",
output_file: "my_prompt.txt",
branch: "develop",
exclude: ["*.md", "docs/"],
threads: 4, # control concurrency
thread_timeout: 120, # custom thread timeout
quiet: true # or verbose: true
)
# With custom logger
custom_logger = Logger.new("gitingest.log")
generator = Gitingest::Generator.new(
repository: "user/repo",
logger: custom_logger
)
By default, the generator excludes files and directories commonly ignored in repositories, such as:
.git/
, .svn/
).DS_Store
, Thumbs.db
)*.log
, *.bak
)*.png
, *.jpg
, *.mp3
)*.zip
, *.tar.gz
)node_modules/
, vendor/
)*.pyc
, *.class
, *.exe
)Bug reports and pull requests are welcome on GitHub at https://github.com/davidesantangelo/gitingest.
Inspired by cyclotruc/gitingest
.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that gitingest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.