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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file code_payload-0.1.8.tar.gz.

File metadata

  • Download URL: code_payload-0.1.8.tar.gz
  • Upload date:
  • Size: 24.9 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.8.tar.gz
Algorithm Hash digest
SHA256 e250f3bbf6ae0112583bab1d96f522c2bdf8b8e13f5fa8bbc4628d6217b04a01
MD5 a08dfce9aa5ce6177b98a3d7c1752996
BLAKE2b-256 fb9aa189446efdbd6d60860d4ac565e5e9ada4f12af0831e017e9e49fb4b1862

See more details on using hashes here.

File details

Details for the file code_payload-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: code_payload-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for code_payload-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 234d5c0e371f35142286a230f817969a3987b3740e6916f7a84b2a11cba136be
MD5 f910878fbb73f6863b8b22bf19961f4e
BLAKE2b-256 88a7956d6c467beebefac2f9ff431df982c854c613bffab0d018a6336c364500

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