Why waste time fiddling with files when you could be crafting prompts for your LLM? clip4llm takes the hassle out of manually copying file content into ChatGPT or any other LLM. This isn’t just a clipboard helper; it’s a speed boost for your brain. With one simple command it grabs that text to feed those hungry LLMs the tokens they need and you are back to the fun part... prompting.
No more juggling files or flipping back and forth between text editors. Whether it’s code snippets, config files, or that critical .env file, clip4llm does the heavy lifting of copying all of those files at once so you can focus on what really matters: getting that sweet AI-generated insight.
Does clip4llm actually interact with ChatGPT or any other LLM API directly, absolutely not! That is your job. All it does is copy those text files you are working straight to your clipboard so you can do the real work of pasting them into your LLM of choice. Spend all the time this saves you sending more prompts to that LLM getting back those hallucinatory insights you crave.
- Hidden Gems: Hidden files aren’t included by default, but you can include them to grab those
.env
secrets like a pro. - Size Matters: File too big? Not a problem. Set a size limit and skip the heavyweights. Default: 32KB, because nobody needs a novel-length paste job consuming your precious context window.
- Mind the Megabyte: Output over 1MB gathered? Boom! That is too big so nope, not happening.
- Binary Exclusion: ChatGPT doesn’t speak binary—leave those files out automatically.
- Config Magic: Drop a
.clip4llm
config in your home directory or your project folder and forget about the command-line—your preferences are locked and loaded. - Verbose Mode: Want to see what’s going on behind the curtain? Crank up the verbosity and feel like a hacker.
You’ve got Go installed, right? If not, ask ChatGPT how to install it and let's get going...
-
Clone the magic:
git clone https://github.com/unitvectory-labs/clip4llm.git cd clip4llm
-
Build it like a boss:
go build -o clip4llm
-
Make it global:
mv clip4llm /usr/local/bin/
-
Check your setup (just because):
clip4llm --help
- Cruise over to clip4llm Releases and snag the latest version for your OS—Mac, Linux, Windows, whatever team you roll with.
- Unzip the file (or untar it if it's a tar.gz, whatever, you know what to do).
- Move that binary into your PATH or let it chill in your downloads folder forever. Your call.
- Fire up clip4llm and you're golden.
Time to flex. Navigate into your project directory and run:
clip4llm
This instantly grabs all non-hidden, non-binary files (under 32KB) in your current directory and copies them straight to your clipboard, ready for pasting into ChatGPT like a legend.
-
--delimiter
– Customize how each file is wrapped. Default is triple `'s because Markdown rocks, but make it whatever you like:clip4llm --delimiter="<<<END>>>"
-
--max-size
– Need fatter files, up that max-size (KB) to something bigger if you have context window to burn:clip4llm --max-size=8
-
--include
– By default those .files and .folders are left out, if you want them you need to specify them here:clip4llm --include=".github,*.env"
-
--exclude
– Some files wasting those tokens, exclude 'em with style:clip4llm --exclude="LICENSE,*.md"
-
--verbose
– Feeling nosy? Get the full play-by-play of what’s happening:clip4llm --verbose
-
Include Hidden Directory: Maybe you need to debug that GitHub Action, include those files easily:
clip4llm --include=".github"
-
Exclude Markdown Files: Your empty markdown files not helping the LLM out, you can leave those out:
clip4llm --exclude="*.md"
-
Exclude
node_modules
: Because your 20 line TypeScript project pulled in 500MB of libraries and no way that LLM needs all that:clip4llm --exclude="node_modules"
-
Customize Your Flow: Your file's may have some of those triple `'s so if you want different separators, you can set them:
clip4llm --delimiter="<<<FILE>>>" --max-size=64
Set it once, and forget it. Place a .clip4llm
file in your home directory (~/.clip4llm
) or project directory (pwd/.clip4llm
), and clip4llm will respect your preferences.
Sample .clip4llm
file:
delimiter=```
max-size=32
include=.github,*.env
exclude=LICENSE,*.md