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.7.dev0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

code_payload-0.1.7.dev0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file code_payload-0.1.7.dev0.tar.gz.

File metadata

  • Download URL: code_payload-0.1.7.dev0.tar.gz
  • Upload date:
  • Size: 24.7 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.7.dev0.tar.gz
Algorithm Hash digest
SHA256 758b1fe8730029eff6735251a6cd53a850fecac47d88632baa52ef95b98bd5fc
MD5 860769789a1ff2137f497c45c54cdf18
BLAKE2b-256 d77c0160e3d958dd45283ab99db4c06d7ca8b3c90b0725eff2d76f75dbbb7433

See more details on using hashes here.

File details

Details for the file code_payload-0.1.7.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for code_payload-0.1.7.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5a2dba29dd191ba46bc43e760a18f2872461ae8a036fde9e8be68fb392e1b61
MD5 ba5cd79829965e70220804f01149f1ef
BLAKE2b-256 3f3a984b02dc040397ca624ab95575d2191b8c00444dff0d409192923bdc1ff9

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