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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file code_payload-0.1.5.dev3.tar.gz.

File metadata

  • Download URL: code_payload-0.1.5.dev3.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.5.dev3.tar.gz
Algorithm Hash digest
SHA256 20806ee3ab23e51c8b1942fed9c1e1b62f70f51dfa65bbbfa897cc02f1a1eb2c
MD5 63831fc7c45eb7430152c5492fe6685a
BLAKE2b-256 494f1fe4f3e3b59424ea841adcc760494cb999924407d95a42f9e4ec6f956eaa

See more details on using hashes here.

File details

Details for the file code_payload-0.1.5.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for code_payload-0.1.5.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 753054628662cf9627786f2459f8cc26425089d96477faed8845be3c6aad8be3
MD5 9712443c90bddc1fccc6f33ad3537129
BLAKE2b-256 f65ed1f87267f046917c3a499b56876c08c7dc1f1ce1ba7b4d39fe3d7e9267c8

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