mergefiles

command module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

README

CLI for generating a merged file for prompting LLMs

GitHub downloads

A CLI for generating a merged file for prompting LLMs.

Usage

💬 Merge all .go and .mod files in the current directory and all subdirs

mergefiles -ext .go -ext .mod

Installation

You can download the latest binary from the release page.

Install via go
go install github.com/frast/mergefiles/mergefiles@latest

Advanced usage

Click to expand
Configuration

This cli tool reads configuration from ~/.config/mergefiles/config.yaml.

Here is an example configuration:

// Predefined prompts, use `-prompt` flag to switch prompt
prompts:
  default: |+
    You are ChatGPT, a large language model trained by OpenAI. 
    Answer as concisely as possible.
  go: |+
    You are an expert go software developer. 
    Answer as concisely as possible.
Switch prompt

You can add more prompts in the config file:

// Predefined prompts, use `-prompt` flag to switch prompt
prompts:
  default: |+
    You are ChatGPT, a large language model trained by OpenAI. 
    Answer as concisely as possible.
  go: |+
    You are an expert go software developer. 
    Answer as concisely as possible.
  java: |+
    You are an expert java software developer. 
    Answer as concisely as possible.

then use -prompt flag to switch prompt:

mergefiles -p java

[!NOTE] The prompt can be a predefined prompt, or come up with one on the fly. e.g. mergefiles -p java or chatgpt -p "You are a dog. You can only wowwow. That's it."

License

BSD

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL