Skip to main content

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.
    • .git directories.
    • 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

  1. Default Behavior (No Arguments)

    ingestipy
    
    • Uses the script’s directory as input.
    • Creates an output file named <current_folder>_ingestipy_output.txt.
  2. 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 matching my_ignore_list.txt) and writes them to merged.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ingestipy-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ingestipy-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for ingestipy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29c9fbbff76d0e9a492803819671993afc3e8c914c125fc3e70129832d7d9ada
MD5 db72fbfd7e155f41e712486f0c604899
BLAKE2b-256 f82f630de920cf23e1a96bba17e7a08df7c2af0c8a2af21f792a11c76ed94026

See more details on using hashes here.

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

Hashes for ingestipy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b1496c49963cce7efcaa8fb72402657f5ddeea888f69450d7603107ffcf88ec
MD5 607927864e7a3001a839487a8d56abe1
BLAKE2b-256 949938565d05e683c9b2237f73d1aae2dda7d4940df71066def197c27884b7aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page