AIToday
Zenn AI/MLPublished: Oct 9, 2026, 10:00 JST

clipref v0.2.0 saves pasted logs, copies the path for AI agents

clipref v0.2.0 saves pasted logs, copies the path for AI agents

clipref v0.2.0 is a command that takes text from the clipboard or standard input, writes it to a new file, and copies that file's absolute path to the clipboard. The example command is clipref --clipboard --name startup-error.log.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The author's original problem was that logs they could neither download nor call from an agent had to be pasted in by hand, which ate into the context window. The first workaround was pasting the log into a text file opened in Vim under tmp/ and copying its absolute path with realpath and pbcopy. Fetching the path got easier, but choosing a filename, opening Vim, pasting, and saving stayed manual. clipref was built to collapse both steps: it writes the pasted text to a file and puts the absolute path back on the clipboard.

Several design details follow from that use case. Files are created with permissions of 600 and save directories with 700, whitespace and line breaks are preserved, and specifying an extension does not convert the content. clipref never deletes saved files on its own, though the operating system may clear files in a temporary directory. Default destination and extension can be set in ~/.config/clipref/config in key=value form, and command-line options take priority over that file.

For repeat use, a history keeps only paths, not log contents, so a recent path can be recopied with clipref list --limit 5 or clipref last. The author notes it works with standard macOS Bash and commands, and that while the installer reaches GitHub, the installed clipref performs no network communication and has no feature to send logs outside.

FAQ
How do I install clipref?
A one-line curl install script targeting v0.2.0 pipes to bash. It places clipref in ~/.local/bin and does not change your shell configuration files.
Can clipref summarize logs or count tokens?
No. clipref itself has no feature for summarizing logs or measuring token counts.
Where does clipref save files by default?
It uses macOS's TMPDIR by default, or /tmp if that is unset, and creates a separate directory per run so the same name does not overwrite previous files.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Next articleHex cuts wrong edits 7x with evals on Quick Edits