Once: Cache CLI commands
baquero
89 points
37 comments
October 09, 2026
Related Discussions
Found 5 related stories in 95.6ms across 8,999 title embeddings via pgvector HNSW
- Show HN: Cynative – Read-only CLI in Go that explains your live infrastructure szin · 14 pts · July 28, 2026 · 48% similar
- Cf: The Agentic CLI for the Cloudflare API macleos · 144 pts · September 28, 2026 · 48% similar
- Launch HN: OneCLI (YC S26) – OSS sandboxed agent harness for teams guyb3 · 70 pts · August 19, 2026 · 47% similar
- Ask HN: What is your favorite lightweight tool or CLI utility in 2026? pranav_tech26 · 16 pts · August 15, 2026 · 45% similar
- Show HN: OneCLI – OSS credential gateway that keeps secrets out of AI agents Jonathanfishner · 88 pts · July 23, 2026 · 45% similar
Discussion Highlights (11 comments)
baquero
Do you have CLI calls that you want to cache? Here you go!
stingraycharles
Seems well-designed, but what’s the use case? I’m trying to think of them but my creativity is failing me.
deadbunny
I've always wanted to deal with cache invalidation in my terminal.
xuhu
I wish this worked without prefixing the commands with "once". Especially if I ran a command with verbose output and afterwards decided I wanted to grep something from it. Terminals have the output in their scrollback buffer and maybe it's just a matter of writing an "output" command that lets me run: $ cmake .. $ output | grep "libssl version"
aktau
These kinds of tools are very useful. I have my own called memo (which is just a shell script: https://github.com/aktau/dotfiles/blob/master/bin/memo ). It was discussed in https://news.ycombinator.com/item?id=45670052 and others chimed in with their own (like bkt(1) and up(1)). The main differences I see: - memo doesn't need to be built (its a shell script) - once keeps output cache in a running daemon. By contrast, memo stores content under /tmp with whatever the best compression available is (it prefers zstd). There's trade-offs in that. More pareto-optimal from the security front may be to have a sort of session key and to compress-then-encrypt files on disk.
giancarlostoro
> The typical use case: reading secrets from 1Password without approving every single read with your fingerprint. Uh I dont know about that one chief.
__MatrixMan__
I dream of applications that expose sufficient metadata about their outputs such that the OS can know if rerunning is necessary without me needing to specify. Nixos does this for builds, but I've not seen it generalized to arbitrary processes.
newadays
Congratulations. What is Word Error Rate? We have a few use cases for something like that at newcare.app
hecomo
This looks awesome. Thanks for making this. Been using this, for similar cli output catching. https://github.com/dimo414/bkt Wondering what you think about the two, and what are the good reasons to use one vs the other? (Maybe: once is more actively developed? bkt hasn't been active for a year).
1vuio0pswjnm7
I just use tmux buffers But I'm not running agents, I have different needs
ShakataGaNai
OMG. `op read` with agents. Holy shit. I first clicked this with just a mild curiosity. But as soon as I saw the 1password example. Lightning. I try to do everything "the right way", no secrets on disk, gitops, the whole shebang. Even for my personal projects. But when working with API keys and agents it can get so frustrating. I refuse to admit to the number of times where I've told the agent "Please write the 1Password creds to .env and use .env instead because I'm tired of clicking approve on my watch 15 times for every test run."