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
Release history Release notifications | RSS feed
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.tar.gz
(24.7 kB
view details)
Built Distribution
File details
Details for the file code_payload-0.1.7.tar.gz
.
File metadata
- Download URL: code_payload-0.1.7.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9951c839e8a31acdebb5d29774c6359d2c77c466086280b486f68ac1cff9648f |
|
MD5 | 4f5441baac71708be62d29b7680812b2 |
|
BLAKE2b-256 | 458ed2021379b8d0a53be4afc4a3195d799137bb01032740cad54c0d7d8bd7b4 |
File details
Details for the file code_payload-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: code_payload-0.1.7-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34d9ec092074095e82a651ad241193dbd910402fbb9327b8b6878d77b3805354 |
|
MD5 | 6eaa1c785f0b77ae4817ceccd35206d3 |
|
BLAKE2b-256 | b69e8e9e0237167ac3d0a8c4b152962cec988290477dd92f4cb5937114a8d9b0 |