Crates.io | context-for-prompt |
lib.rs | context-for-prompt |
version | 0.1.0 |
source | src |
created_at | 2024-03-23 03:48:01.558341 |
updated_at | 2024-03-23 03:48:01.558341 |
description | Creates a context made of all the files and their content. |
homepage | https://github.com/fmendez/context-for-prompt |
repository | https://github.com/fmendez/context-for-prompt |
max_upload_size | |
id | 1183206 |
size | 22,108 |
Creates a context made of all the files and their content. The content is copied to the clipboard.
cargo install context-for-prompt
Creates a context made of all the files and their content.
Usage: context-for-prompt [OPTIONS] <ROOT>
Arguments:
<ROOT>
Options:
-e, --extensions-to-ignore <EXTENSIONS_TO_IGNORE>
-d, --debug
--hidden
-h, --help Print help
-V, --version Print version
context-for-prompt /path/to/directory
The goal of this program is to walk through a directory and copy the content of each file to the clipboard. The file content should be copied in the following format:
file: /path/to/file
----------- content start -------------
file content
----------- content end -------------
This content can then be used as context for LLMS prompts.
The search will ignore hidden files by default and anything contained in the .gitignore
file. You can use the --hidden
flag to include hidden files and directories. You can use the --extensions-to-ignore
flag to ignore files with certain extensions. For instance, if you want to ignore .md
files, you can use the following command:
context-for-prompt /path/to/directory -e=md,lock
Note: This crate was inspired by https://github.com/simonw/files-to-prompt