| Crates.io | files_to_llm |
| lib.rs | files_to_llm |
| version | 0.1.2 |
| created_at | 2025-04-18 21:39:19.120512+00 |
| updated_at | 2025-04-23 16:41:04.53061+00 |
| description | A CLI to parse your directory files contents to clipboard or an output file in order to simplify the work with LLMs |
| homepage | https://github.com/DobbiKov/parse_directory_contents |
| repository | https://github.com/DobbiKov/parse_directory_contents |
| max_upload_size | |
| id | 1639881 |
| size | 30,393 |
The CLI goes though the given directory and copies the contents of the found files:
The copied format is:
```file_name_1.ext
<contents>
\```
```file_name_2.ext
<contents>
\```
Useful if you have a huge project and you want to copy the contents of each file with it's name and give it to a LLM for a prompt.
By default, all the folders and files written in the .gitignore won't be parsed and copied. However, you can specify using --disable-gitignore flag in order to copy them as well.
It's possible to specify files and folders that should be excluded (i.e not to be parsed) using -e flag and provide files and folders to exclude.
files_to_llm <path_to_dir>
Copies the contents of each file in the directory to the clipboard
Example:
files_to_llm .
It will copy the contents of all the files from the current folder to the clipboard.
files_to_llm <path_to_dir> -f <file_types>
Example:
files_to_llm . -f rs toml
It will copy the contents of the files (that are of the rs and toml extensions) from the current folder to the clipboard.
files_to_llm <path_to_dir> -o <output_file_name>
Example:
files_to_llm . -o output.txt
It will copy the contents of each file in the current directory to the output.txt file (attention: it won't copy to the clipboard!).
files_to_llm <path_to_dir> -o <output_file_name> -f <file_types>
Example:
files_to_llm . -o output.txt -f rs toml
It will copy the contents of each file that is of type .rs or .toml in the current directory to the output.txt file (attention: it won't copy to the clipboard!).
files_to_llm . --disable-gitignore
This will copy all the files from the current directory even the ones listed in the .gitignore files
files_to_llm <path_to_dir> -e <path1> <path2>
Example:
files_to_llm . -e .git output.txt
It will copy all the files except the ones that are in the .git directory and output.txt file.
git clone https://github.com/DobbiKov/parse_directory_to_filecd parse_directory_to_filecargo build -rsudo cp ./target/release/files_to_llm /usr/bin/ or sudo cp ./target/release/files_to_llm /usr/local/bin/The help texts inside of the CLI have been improved.
This version improves the algorithm of the recursive directory walk and reading .gitignore files using ignore crate and improving the reliability of the CLI.
This version provides the next features:
.gitignore file as well