from Hacker News

Show HN: Zev – Remember (or discover) terminal commands

by dtnewman on 4/24/25, 4:33 PM with 38 comments

  • by submeta on 4/24/25, 5:10 PM

    Nice! I use a combination of an endless bash (zsh) history with timestamps that I navigate via fzf and ctr+r and comments I occasionally add to commands via # at the end followed by my annotation so that I can rediscover the command.

    I do this ever since I switched to a Mac in 2015 and my history has over 60,000 lines. So that’s basically my knowledge base :)

    But your project looks nice. Will check out.

  • by AvieDeckard on 4/24/25, 7:44 PM

    Your gif in your README features a prompt asking to "show all files in this directory" but the 'ls -lh' returned and selected in the demo gif does not show all files, just the ones that aren't hidden. I'd have chosen a more accurate interaction for the demo.
  • by chrisco23 on 4/24/25, 5:23 PM

    I'm trying to get this to work with ollama. I'm on Arch Linux, fish shell, new to ollama, and only very rarely used pipx. I get:

    raise ValueError("OPENAI_BASE_URL and OPENAI_API_KEY must be set. Try running `zev --setup`.") ValueError: OPENAI_BASE_URL and OPENAI_API_KEY must be set. Try running `zev --setup`

    even when I run (for example) set -x ZEV_USE_OLLAMA 1; zev 'show all files and all permissions'

  • by arjie on 4/24/25, 5:58 PM

    I don't like most of these commands because they just execute. This one is nice because it will be in your history. The current trick I use is to use copilot.vim at the command line. It naturally fits into my flow.

    Recently some of my friends reported that it just wants to do comments and I've noticed that it actually biases towards that nowadays, so I start it with something to get it kicked off.

    I've been managing to try to figure out what in the prompt makes it like that, but for the moment that little workaround gives me both the comment and the command in my history so it's easier to r-i-search for it.

    https://x.com/arjie/status/1575201117595926530

    You just set up copilot for neovim normally and set it as your EDITOR. https://wiki.roshangeorge.dev/index.php/AI_Completion_In_The...

  • by CGamesPlay on 4/24/25, 11:56 PM

    You may be interested in copying some of the usage patterns from my similar project: https://github.com/CGamesPlay/llm-cmd-comp

    Instead of being a separate command, I released a set of key bindings you can push that start the LLM prompt with your current command line, and if you successfully accept the suggestion, replace your command line with the result, bypassing the manual clipboard step, and making it so that the result goes into your shell history as a normal command.

  • by 0x696C6961 on 4/24/25, 5:07 PM

    I really like how it gives you multiple options to choose from. I've been using https://github.com/simonw/llm-cmd
  • by arp242 on 4/24/25, 8:44 PM

    Named after Zev from the film Remember? A few years back I wrote a Vim plugin to remember things with the same name :-)
  • by Bishonen88 on 4/25/25, 10:32 AM

  • by sathishvj on 4/25/25, 8:28 AM

    Nice! Little plug for what I did too, in a similar vein - it has a web version https://gencmd.com/ and also a cmd line version.
  • by badmonster on 4/25/25, 6:46 AM

    Since it's generating terminal commands dynamically, what safeguards (if any) are in place to avoid generating destructive or insecure commands (like rm -rf /, etc.)?
  • by latchkey on 4/24/25, 8:31 PM

  • by wapxmas on 4/24/25, 6:10 PM

    how do I install it with pip? It requires to be in virtual environment. (
  • by tzury on 4/25/25, 12:35 AM

    Newman!
  • by regnull on 4/24/25, 5:35 PM

    Somewhat related, here's a little project I've done with LLM: https://github.com/regnull/how.sh

    It uses locally hosted (or remote) LLMs to create and execute shell commands that you describe. You can go as far as writing "shell scripts" in natural language.

  • by imzadi on 4/24/25, 8:22 PM

    Hi Zev!