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.8.dev1.tar.gz
(24.9 kB
view details)
Built Distribution
File details
Details for the file code_payload-0.1.8.dev1.tar.gz
.
File metadata
- Download URL: code_payload-0.1.8.dev1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e751bd0cd53131173471c93bba442a27b4b3f8897a251e789f6000762a3b23a7 |
|
MD5 | a6a6f73c591264e2da2534f521ebdde2 |
|
BLAKE2b-256 | 97dec30ed9276847571b41c36ea0e834e8a8202f566c1e3f8c4d29a9efce3ede |
File details
Details for the file code_payload-0.1.8.dev1-py3-none-any.whl
.
File metadata
- Download URL: code_payload-0.1.8.dev1-py3-none-any.whl
- Upload date:
- Size: 24.1 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 | 36a429d7843ede86c28d0e1e9678f5870b48ce8d4560ad21cda3875f4330b0b0 |
|
MD5 | 8db79038541ad5b88d3de99d45f6a17d |
|
BLAKE2b-256 | 0ee70db372618fb17b9ecac0c78d2347696fad73c555989df841e261f42d15c8 |