| Crates.io | prmpt |
| lib.rs | prmpt |
| version | 0.1.0 |
| created_at | 2025-07-24 21:46:15.14961+00 |
| updated_at | 2025-07-24 21:46:15.14961+00 |
| description | A command-line tool to convert code repositories into LLM prompts and inject code back into repositories |
| homepage | https://github.com/labiium/prmpt |
| repository | https://github.com/labiium/prmpt |
| max_upload_size | |
| id | 1766946 |
| size | 130,379 |
prmpt is a Rust utility for turning an entire code repository into a prompt that a Large Language Model can understand. It also reinjects the model's answers back into the same repository. Use prmpt when you want a repeatable way to ship code in and out of an LLM without manually copying files.
.gitignore, and produce a single text file ready for an LLM.git clone https://github.com/labiium/prmpt.git
cd prmpt
cargo build --release
The executable will be at target/release/prmpt.
Or
cargo install --git https://github.com/labiium/prmpt.git
and the prmpt command will then be available.
prmpt exposes two main subcommands. You can also invoke named configurations stored in a prmpt.yaml file.
Create a prompt file from a repository.
prmpt generate --path my_project --language rust --output repo.out
--ignore <pattern> – repeat to skip files or directories.--docs-comments-only – extract docstrings and comments without source code.--delimiter <token> – fence used around each block (defaults to ```).Read an LLM's output and write changes back into the repository.
prmpt inject --input llm_output.txt --path my_project
The input file should contain a path followed by a fenced code block for every change:
src/main.rs
```rust
fn main() {
println!("hello updated world");
}
```
A prmpt.yaml file allows named setups. A minimal example is below.
base:
path: ./my_project
language: rust
output: prompt.out
ignore:
- target
prompts:
- "Summarise the project before rewriting."
Execute that configuration simply by running:
prmpt base
Running prmpt generate on a small project might produce something like:
sample_project_1
├── README.md
└── main.py
```README.md
# Sample Project 1
```
```main.py
print("Hello, world!")
```
This output can be fed directly into your favourite LLM. After editing, feed the modified file back to prmpt inject.
prmpt can also be used as a library. The Generator and Injector types expose the same logic as the CLI:
use prmpt::{Config, Generator, Injector, run_and_write};
let config = Config { path: Some("my_project".into()), ..Default::default() };
let generator = Generator::default();
run_and_write(&generator, &config)?;
prmpt streamlines the tedious parts of preparing code for an LLM and applying the results. Give it a try on your next project and focus on the creative parts instead of file management.