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.1.tar.gz
(24.6 kB
view details)
Built Distribution
File details
Details for the file code_payload-0.1.1.tar.gz
.
File metadata
- Download URL: code_payload-0.1.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2768cbc7d48d940c7457bf235dab863838161339c28cac4c12a8060159e5f846 |
|
MD5 | 71db80ee47c3e1b0566cc62fb1fef04f |
|
BLAKE2b-256 | 4438824828de9e75594717747d973f3640dba0d90825c5a6515f1f5f28e37f3b |
File details
Details for the file code_payload-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: code_payload-0.1.1-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 | d23930ef6447dfee2b885f40071edf2e48344c39446f7d1adbcb6af6add35224 |
|
MD5 | 825fa665de4c887ea306b3a4e8adf2c9 |
|
BLAKE2b-256 | b68cbcc923ecea279fab7992312d1c0aee509ad6c9e575c65d26786faf201231 |