If we are familiar with what we are doing, fixing command line errors is straightforward. But there are time I face errors I never seen before. Its hard searching for answer for this kind of errors in SO or google. Sometimes the error might have many different reasons and search results shows many solutions. Many hours passed and I usually gets frustrated.
I feel making ChatGPT to be the initial debugger to guide whats the error means and what should I look for to fix this error.
I took some inspiration from this(https://github.com/nvbn/thefuck) CLI tool I was introduced some years ago, which helps fix common errors in your cli command like misstype or need sudo. So my CLI does fetch the last command run, rerun it and fetch the stderr to be feed into ChatGPT for help.
I am looking to see if anyone find it helpful since I have been using it lightly and only when I hit errors. So of you can try it out when you face errors and share how helpful its solution is. Also open to see if anyone has idea to improve the prompt or how it works.
Please note: dont use it with any commands that’s destructive because it would rerun the command. Also dont use with command that contains sensitive information like security tokens etc.