Skip to main content

A tool for analyzing folder structures and content for use with large context on LLMs

Project description

Analyze Folder for LLM

Analyze Folder for LLM is a Python library designed to collect text and code from a folder for use as context with large context Language Models (LLMs). This tool efficiently fetches README files, folder structures, and non-binary file contents, providing structured outputs complete with pre-formatted prompts to guide further analysis of the folder's content.

Installation

You can install Analyze Folder for LLM using pip:

pip install analyze-folder-for-llm

Usage

After installation, you can use the folder_to_llm command-line tool:

folder_to_llm --path "~/your_project_folder"

This will analyze the specified folder and generate output files in an output directory within the analyzed folder.

For more options:

folder_to_llm --help

You can also use it in your Python scripts:

from analyze_folder_for_llm import folder_to_llm

result = folder_to_llm("~/your_project_folder")
print(result)

Features

  • Analyze folder structures
  • Extract README contents
  • Collect non-binary file contents
  • Generate structured output for LLM consumption
  • Customizable preset configurations
  • Rich console output for easy readability

Output

The tool generates two main output files in the output directory of the analyzed folder:

  1. folder_contents_for_llm.txt: Contains the contents of all non-binary files in the analyzed folder.
  2. folder_analysis_for_llm.json: Contains a structured analysis of the folder, including file structure, README summary, and analysis prompts.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

analyze_folder_for_llm-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

analyze_folder_for_llm-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file analyze_folder_for_llm-0.1.0.tar.gz.

File metadata

File hashes

Hashes for analyze_folder_for_llm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0fdfefdb10fb8e799029fe7d425887cd1136176f7fe3bf7d81432edb2a065cb1
MD5 51d9d2b3f4bdab3100253f54947c2b9d
BLAKE2b-256 03e280823b1928269e4b25c601cdb9f7a8d0d03169a276eba3741e389d2d76c8

See more details on using hashes here.

File details

Details for the file analyze_folder_for_llm-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for analyze_folder_for_llm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2728541ee2be8e7648b3cd0e6b0acda32263b1be0034cc74ba912f91f5fa06ce
MD5 c2e3025bddaa2a8fea77b50f21d5f681
BLAKE2b-256 7419f393be52581212d64245dafde9810ab31ae921642fc7f3bd9e7ba4347fd8

See more details on using hashes here.

Supported by

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