Skip to main content

Collect context for llm chat

Project description

Context Collector

Context Collector is a Python tool designed to gather context information from code repositories. It traverses specified directories, reads file contents, and consolidates them into a single output file, facilitating potential use with Large Language Models (LLMs) for chat applications.

Features

  • Traverses specified directories and subdirectories
  • Reads file contents and consolidates them into a single output file
  • Supports .gitignore rules
  • Includes a built-in default ignore list (e.g., binary files, images)
  • Allows user-defined ignore items
  • Flexible command-line parameter configuration

Installation

  • Ensure you have Python 3.10 or higher installed on your system.
  • Clone this repository:
  • cd <project_name> && poetry install

Usage

contc -p /path/to/your/project -o output.txt

Parameter description:

  • -p or --path: Specify the repository path to collect context from (default is the current directory)
  • -o or --output: Specify the output file name (default is the project name with a .txt extension)
  • -e or --exclude: Specify additional files or directories to exclude

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

context_collector-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

context_collector-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: context_collector-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for context_collector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94a182424f3844fe4b924ec74e3a7fe737960377deddb36873c37d65929ff2bd
MD5 e55124c3f67882fe82e076183cad5121
BLAKE2b-256 dc7ce5e63595b8c82df2ae6ede1c519412a1ac949314a2dafc89f59bb34e8965

See more details on using hashes here.

File details

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

File metadata

  • Download URL: context_collector-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for context_collector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27f3166b7a12e67bea087dc3c8437eb78b7d5402572751fc6ae4e0b20c687b51
MD5 00d8cb38c52941aec3a1c66bff88846a
BLAKE2b-256 2881ed3e483917b6ffde97c16bda5dd4df417cdcd18b356cf27bf87f75e7caf5

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