https://github.com/edo1z/repcon
A Rust tool for condensing repository files for OpenAI's Assistants API usage
https://github.com/edo1z/repcon
Last synced: 3 months ago
JSON representation
A Rust tool for condensing repository files for OpenAI's Assistants API usage
- Host: GitHub
- URL: https://github.com/edo1z/repcon
- Owner: edo1z
- License: mit
- Created: 2023-11-12T06:09:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T01:46:17.000Z (almost 2 years ago)
- Last Synced: 2025-06-15T04:04:45.806Z (4 months ago)
- Language: Rust
- Size: 60.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# repcon



`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.
# Features
- Automatically ignores files set to `.gitignore`.
- Additional ignore file settings can be added with `.repconignore` or `-i` options.
- You can set the maximum size of one file and the maximum number of files.
- Non-text files are automatically ignored.## Installation
```bash
cargo install repcon
```## Usage
Execute a command in the form `repcon `. Where `repository path` is the path to the root directory of the repository you want to aggregate. Absolute paths can also be used.
```bash
repcon . -i "*.log"
```## Output Example
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.
## Custom Ignore Rules
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/
```## Contributing
PR is always welcome. Thank you.
## License
[MIT](LICENSE)