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 -e .

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.0.tar.gz (4.7 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.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: code_combiner_rag-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 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.0.tar.gz
Algorithm Hash digest
SHA256 73dc06e413baa5a5e77c49107109af1c803164c15a607844821ee63b149d160e
MD5 c319bd29106f89dd380e07dbf34d46c8
BLAKE2b-256 0f9e1a2099908ae73bcbd2fc2c63b8cef78fecceeac23454249eb778cae27fea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for code_combiner_rag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7dc15db03728106f1939c00e02e2ae43358da7dae90d85ab8e9203ce51d894d
MD5 f4bbfe63deed2298648a5d96a806e7f3
BLAKE2b-256 32ab5d03b41fb09e969ec14eafb0ff4925679de64e42fbf653142f65ff3b6ed2

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