Skip to main content

Giving language models context of your codebase

Project description

code-payload

Condense and summarize a codebase for passing to an LLM as context.

Features

  • Token-based Summarization: Summarizes content based on token counts, making it suitable for language models.
  • Flexible Configuration: Supports configuration through YAML files, environment variables, and CLI arguments.
  • Rich CLI Interface: Use the CLI to interact with your projects, including rendering Jinja2 templates.
  • Customizable Templates: Generate custom summaries or reports using Jinja2 templates.

Installation

We recommend using pipx to make this globally available. Alternatively you can use pip.

pipx install code-payload

Usage

code-payload --help

Example Usage

To process a project directory and output a JSON summary:

code-payload /path/to/your/project

To override the file extensions to include:

code-payload /path/to/your/project --include-extensions .py,.js,.md

To use a custom template:

code-payload /path/to/your/project --render-args template_input=readme_summary.j2

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_payload-0.1.dev5.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

code_payload-0.1.dev5-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file code_payload-0.1.dev5.tar.gz.

File metadata

  • Download URL: code_payload-0.1.dev5.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for code_payload-0.1.dev5.tar.gz
Algorithm Hash digest
SHA256 94462bec2be414fffa986441e9feab9974f75bc828b76e0c8d0b2a3a6c4432dc
MD5 9beef873ff3b75621499a196494e8bad
BLAKE2b-256 0dfcc7df8a8ff283dcf3a47dcf44d2478f7e3512a551483f1d3492786ff5ce77

See more details on using hashes here.

File details

Details for the file code_payload-0.1.dev5-py3-none-any.whl.

File metadata

File hashes

Hashes for code_payload-0.1.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 fb127b7b0951b65f7d75ca7d72edcf7d3e6ab4508c5c5661d61408e033486c17
MD5 b9190af1753eb88e0cfc3ec0d2f39b53
BLAKE2b-256 7dac476ee52b51bb9a55237779042bf5598643fc22dd1f8f84d0b25cfbb811fc

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