A script that combines project files into a single text file for easier use with AI agents.
Project description
Ingestipy
Ingestipy is a Python derivative of Ingestify, a command-line tool that merges an entire project’s source files into a single text file. This can be particularly useful when feeding small-sized codebases to AI chat bots like ChatGPT.
Table of Contents
Features
- Recursively collects files from a specified directory.
- Automatically skips:
- The output file itself to prevent self-ingestion.
.gitdirectories.- User-defined ignore patterns (glob-based) from an optional ignore file.
- Logs processing info and errors to help identify problematic files.
Installation
You can install ingestipy directly from PyPI using pip:
pip install ingestipy
After installation, you should have an ingestipy command available in your terminal.
Usage
Run ingestipy --help to see the available arguments:
ingestipy --help
Output:
usage: ingestipy [-h] [-in INPUT_DIR] [-out OUTPUT_PATH] [-ignore IGNORE_FILE_PATH] [-v]
Extract code with ignore functionality.
optional arguments:
-h, --help show this help message and exit
-in INPUT_DIR, --input_dir INPUT_DIR
Input directory path
-out OUTPUT_PATH, --output_path OUTPUT_PATH
Output file path
-ignore IGNORE_FILE_PATH, --ignore_file_path IGNORE_FILE_PATH
Path to ignore file
-v, --verbose Enable verbose logging
Basic Example
ingestipy --input_dir . --output_path my_project_ingest.txt
Verbose Mode
ingestipy -in . -out my_project_ingest.txt --verbose
This will provide extra debug output in your terminal (e.g., which files are being processed or skipped).
Ignore File
If you have a file containing glob patterns (e.g., ingestipy_ignore.txt), you can specify it with -ignore:
ingestipy -in /path/to/project -out /path/to/output.txt -ignore /path/to/ingestipy_ignore.txt
Each line in the ignore file is treated as a glob pattern. For example:
*.log
*.pyc
node_modules
dist
build
When a file or directory matches any of these patterns, ingestipy skips it.
Examples
-
Default Behavior (No Arguments)
ingestipy
- Uses the script’s directory as input.
- Creates an output file named
<current_folder>_ingestipy_output.txt.
-
Specifying Everything Manually
ingestipy -in /home/user/my_project -out /home/user/output/merged.txt -ignore /home/user/my_project/my_ignore_list.txt
- Gathers all files from
my_project(excluding anything matchingmy_ignore_list.txt) and writes them tomerged.txt.
- Gathers all files from
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ingestipy-0.1.0.tar.gz.
File metadata
- Download URL: ingestipy-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29c9fbbff76d0e9a492803819671993afc3e8c914c125fc3e70129832d7d9ada
|
|
| MD5 |
db72fbfd7e155f41e712486f0c604899
|
|
| BLAKE2b-256 |
f82f630de920cf23e1a96bba17e7a08df7c2af0c8a2af21f792a11c76ed94026
|
File details
Details for the file ingestipy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ingestipy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b1496c49963cce7efcaa8fb72402657f5ddeea888f69450d7603107ffcf88ec
|
|
| MD5 |
607927864e7a3001a839487a8d56abe1
|
|
| BLAKE2b-256 |
949938565d05e683c9b2237f73d1aae2dda7d4940df71066def197c27884b7aa
|