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.2.dev1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file code_payload-0.1.2.dev1.tar.gz.

File metadata

  • Download URL: code_payload-0.1.2.dev1.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.2.dev1.tar.gz
Algorithm Hash digest
SHA256 f4b740bbb82d0d96040cedb91ca361d39ab17c90c552b6d6fa413463d1d7350c
MD5 ddcd0f322c5a8bad3ae31c82d7cceef2
BLAKE2b-256 4a495bbc8061ebcc3586e452e625707bd6c51f96b646a6a13fc2b2ac5718624a

See more details on using hashes here.

File details

Details for the file code_payload-0.1.2.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for code_payload-0.1.2.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 a65769f5ecd06b902e8b3015f9d2453dd09b09581e04ab714d137e8be6f273bb
MD5 af42be3d5fe9fdb099ca9db6a8ca2f1e
BLAKE2b-256 8de2aac63e9c9685ff8d707dd37260808375a6174e7eda14d13a5ce01adef77b

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