Skip to main content

A tool to combine code files into a single file for RAG pipelines

Project description

Code Combiner

A command-line tool to combine multiple code files into a single file, with support for exclusion patterns. Useful for preparing codebases for RAG (Retrieval-Augmented Generation) pipelines.

Installation

pip install code-combiner-rag

Usage

# Create a default config file
code-combiner --create-config

# Combine files using the config
code-combiner /path/to/directory --config code_combiner_config.yaml --output combined_code.txt

Configuration

Create a YAML configuration file with exclusion patterns:

exclude_files:
  - "/absolute/path/to/file.py"
  - "relative/path/to/file.js"

exclude_patterns:
  - "*.test.js"
  - "__pycache__/"
  - "node_modules/"

exclude_extensions:
  - ".pyc"
  - ".pyo"

Options

  • --output: Specify output file path (default: combined_code.txt)
  • --config: Specify config file path (default: code_combiner_config.yaml)
  • --create-config: Create a default configuration file
  • --version: Show program version
  • --help: Show help message

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

code_combiner_rag-0.1.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

code_combiner_rag-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file code_combiner_rag-0.1.2.tar.gz.

File metadata

  • Download URL: code_combiner_rag-0.1.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.8

File hashes

Hashes for code_combiner_rag-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d15bf3a5a58ea1b78568d3a3cbfbb182a321b271c05a2f79d4687faeb10d7270
MD5 8908936ef52d10101943dc763b425724
BLAKE2b-256 2936e4fc851caed925fc159cea65c758a1f0acc2c5fb27e99b42ec77115337db

See more details on using hashes here.

File details

Details for the file code_combiner_rag-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for code_combiner_rag-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a6395653c06d14c948c4b61831c63864a82d2622a8f9c51137d49589b2b7ec8
MD5 cc9b735cc7399d090a5e707954245c35
BLAKE2b-256 9d86b3a3b515eaee8df0003671d5e7fbdd89d8a6ec0b56de380064c6592a7ea8

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