Forget about Vibe coding, remember Vipe coding

Stop using filesystem or fiddling with your shell pipes to edit your stdin. There is a better way with vipe - available in the moreutils package.

Forget about Vibe coding, remember Vipe coding
Photo by Sergey Zhesterev / Unsplash

Did I get your attention by using Vibe coding? Sorry, but I have to tell you: this is a different type of vipe here.

TL;DR: Moreutils has a tool called vipe that can pipe your stdin into your $EDITOR and then pipe it out to another tool in your shell. No AI stuff here.


Today I was working on my good old terminal, playing with a new cluster I have been testing for a new secret - for now - project (Don't ask, I will share with the public whenever it is ready 😉). Things were going quite well, and I kept using my good old trusty NeoVIM and kubectl to do what I needed. Nothing too crazy, just setting up Flux and a few pieces of configuration to ensure the cluster had what it needed from the get-go.

I kept forgetting what I needed, so I went through my notes and my other clusters to check what I wanted for this cluster to be setup to perfection:

  1. Change to the previous cluster:kubectx -
  2. Change to the 'flux-system' namespace: kubens flux-system
  3. Get the kustomizations I have in there: kubectl get kustomization
  4. Output the yaml of the kustomization, pipe that into my Neovim, then copy... kubectl get kustomization somekustohere -o yaml | nvim -

That's when it hit me. I was saving files into my filesystem after editing from stdin, then changing back to the other cluster to open the file and then apply. I just wanted something easier, something that could just grab the output of my command, let me edit it, then push it back to stdin so I could use pbcopy to let MacOS clipboard take care of the rest. OH! VIPE!

Vipe is an old tool - I guess I can call it old, it's 19 YO as I am writing this and it is above drinking age in Canada, eh!! - and its purpose is as pure as it gets: grab from stdin, use your $EDITOR environment variable as the editor for the input, then output to stdin to be processed back later.

Its code is as simple as the description of itself. Feel free to check it out on the moreutils GitHub repo. This is pure genius, it creates the temporary file for you, pipes it out, and lets your shell take care of the rest. Yes, it gets better: it is written in the beautiful language that is Perl. Pure joy!

Now you can just do your messy changes just like I do:

Example usage of vipe

Have fun out there you crazy vibe coders!