Crates.io | repcon |
lib.rs | repcon |
version | 0.1.3 |
source | src |
created_at | 2023-11-12 06:01:02.760865 |
updated_at | 2023-11-13 01:44:51.423228 |
description | A Rust tool for condensing repository files for OpenAI's Assistants API usage |
homepage | |
repository | https://github.com/edo1z/repcon |
max_upload_size | |
id | 1032580 |
size | 74,985 |
repcon
automatically combines a group of files in the repository into one file. 20 files can be uploaded to the OpenAI assistant, but I wanted to upload the entire repository. You can install cargo.
Note that repcon
is an independent project, not officially affiliated with OpenAI.
.gitignore
..repconignore
or -i
options.cargo install repcon
Execute a command in the form repcon <repository path> <options>
. Where repository path
is the path to the root directory of the repository you want to aggregate. Absolute paths can also be used.
repcon . -i "*.log"
The generated text documents will have sections for each file, formatted like this:
# repcon_file_name: xxxxx
# repcon_page_number: 1
// START OF CODE BLOCK: xxxxx
fn main() {
// Example code here
}
// END OF CODE BLOCK: xxxxx
Files will be named according to the format specified by the user, or default to {output_file_name}_{file_no}.txt
, where file_no
is a sequence number.
You can define repcon
specific ignore patterns by creating a .repconignore
file. The syntax is similar to .gitignore
, and these patterns are only used to filter files and directories when repcon
generates text documents.
Example of a .repconignore
file:
# This is a comment
# Ignore all .log files
*.log
# Ignore specific directory
node_modules/
PR is always welcome. Thank you.