
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.
Summaries like this, in your inbox every morning.
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.
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 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.