A plugin for LLM that combines file bundling and LLM mapping capabilities
Project description
llm-multi
A plugin for LLM that combines file bundling and LLM mapping capabilities into two complementary commands: llm archive and llm map.
Commands
llm archive
Bundle files into JSONL format or extract files from a JSONL archive:
llm archive [files...]
Options:
--create- Create an archive from files (default)--extract- Extract files from an archive (exclusive with --create)--basename- For create: strip path and use only filename. For extract: ignore paths, write only filenames to current directory (last copy wins on collisions)--basedir <str>- For create and extract: strip this prefix from paths, refuse to process files without this prefix, printing warnings instead--format- Output format:jsonl,json,jsonarr,xml,xmlish
llm map
Apply an LLM prompt to each item in a JSON structure or repeated content:
llm map data.jsonl "Summarize this: {item}"
The item will be inserted at the first {item} in the prompt. If no {item} exists, it will be inserted at the end, as \n{item}.
Options:
--model, -m- Model to use (default: gpt-4o-mini)--temperature, -t- Temperature for generation (default: 0.0)--tokens- Max tokens (default: 15000)--concurrency, -c- Number of concurrent requests (default: 16)--output, -o- Write output to file--branches- Repeat content this many times, prefix the base filename with{i}_--content- Include original content in output (incompatible with--json/--jsonarroutput formats)--format- Set both input and output format:jsonl(default),json,jsonarr--iformat- Input format:jsonl(default),json,jsonarr--oformat- Output format:jsonl(default),json,jsonarr
Format descriptions
JSON based formats, useful for piping into map -
jsonl: One JSON object per line withpathandcontentfieldsjson: Single JSON object with filenames as keys and content as valuesjsonarr: JSON array containing only content (no filenames)
XML based formats, useful to pass an entire archive to an LLM (llm archive ... | llm prompt ...):
xml: XML elements with properly escaped content (e.g.,<foo.html><em>escaped</em></foo.html>)xmlish: XML elements with raw content, no escaping (e.g.,<foo.html><em>preserved</em></foo.html>)
Workflow Example
Process multiple files in parallel:
llm archive file1.py file2.js | llm map - "What programming language is this?"
Process and extract:
llm archive file1.py file2.js | llm map - "Add --reticulate-splines option" | llm archive --extract
Process multiple files with one call:
llm archive --format xmlish file1.py file2.js | llm prompt "Is the algorithm identical in both files"
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_multi-0.1.0.tar.gz.
File metadata
- Download URL: llm_multi-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5957cdb90c66342ce499bb3652906768ff4d8b09664cf738cbc979e46db37c17
|
|
| MD5 |
4bd3691bd0f4dcb641747d97a72a3631
|
|
| BLAKE2b-256 |
3e5864e58968d18519b184c5445f489cdfcd85e895cf46a9772b0ee303b9402f
|
File details
Details for the file llm_multi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llm_multi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da36146383df711a769dbeb5e5ae853de5c5db5fee6cc59eef218a66c5b40d70
|
|
| MD5 |
d0f62b6cc1e7ab2c317d5580328d4f99
|
|
| BLAKE2b-256 |
9e252a1493c484b521188c8ffd68ce931787d012f9ff5f452983e20e52b41851
|