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.1.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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: code_combiner_rag-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 5ea42fe34db89ff4e917efd15779caf83d1127ae557350592466ecaf9dca446c
MD5 c653201aa2fe2280988993b8172eb515
BLAKE2b-256 1b98a86c183cc5d083420df444db09b32daaf90f7e31a55b3cc5b2f538d77d07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for code_combiner_rag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 527e5bebc9540957525b97c99fabcfb4b955975cbce0dcacaba72cb04b4d63ad
MD5 d4029f84895e47f22df3f48650e79837
BLAKE2b-256 3c33e5642202ae1b1c9618c861908abc0d5664a4f88d4428fed1b1cb8186a138

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