mirror of
https://github.com/ivuorinen/gibidify.git
synced 2026-01-26 03:24:05 +00:00
4562b12fdcf131545d964b430c6ce36e2504c0fd
gibidify
gibidify is a CLI application written in Go that scans a source directory recursively and aggregates code files into a single text file. The output file is designed for use with LLM models and includes a prefix, file sections with separators, and a suffix.
Features
- Recursive scanning of a source directory.
- File filtering based on size, glob patterns, and .gitignore rules.
- Modular, concurrent file processing with progress bar feedback.
- Configurable logging and configuration via Viper.
- Cross-platform build with Docker packaging support.
Installation
Clone the repository and build the application:
git clone https://github.com/ivuorinen/gibidify.git
cd gibidify
go build -o gibidify .
Usage
./gibidify -source <source_directory> -destination <output_file> [--prefix="..."] [--suffix="..."]
Docker
A Docker image can be built using the provided Dockerfile:
docker build -t ghcr.io/ivuorinen/gibidify:<tag> .
Run the Docker container:
docker run --rm \
-v $(pwd):/workspace \
-v $HOME/.config/gibidify:/config \
ghcr.io/ivuorinen/gibidify:<tag> \
-source /workspace/your_source_directory \
-destination /workspace/output.txt \
--prefix="Your prefix text" \
--suffix="Your suffix text"
Configuration
gibidify supports a YAML configuration file. Place it at:
$XDG_CONFIG_HOME/gibidify/config.yamlor$HOME/.config/gibidify/config.yamlor- in the folder you run the application from.
Example configuration:
fileSizeLimit: 5242880 # 5 MB
ignoreDirectories:
- vendor
- node_modules
- .git
- dist
- build
- target
- bower_components
- cache
- tmp
License
This project is licensed under the MIT License.
Languages
Go
96.1%
Shell
3.4%
Makefile
0.5%