context-for-prompt

Crates.iocontext-for-prompt
lib.rscontext-for-prompt
version0.1.0
sourcesrc
created_at2024-03-23 03:48:01.558341
updated_at2024-03-23 03:48:01.558341
descriptionCreates a context made of all the files and their content.
homepagehttps://github.com/fmendez/context-for-prompt
repositoryhttps://github.com/fmendez/context-for-prompt
max_upload_size
id1183206
size22,108
Fernando Mendez (fmendez)

documentation

README

context-for-prompt

Creates a context made of all the files and their content. The content is copied to the clipboard.

Installation

cargo install context-for-prompt

Usage

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

Commit count: 11

cargo fmt