nvbn/thefuck ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python command line tool that helps me fix typos and mistakes in my last shell command.

I want it to look at the previous terminal error, suggest the most likely corrected command, and then let me run it right away or confirm first. It should work with common shells like bash and zsh, and I should be able to set it up with a simple alias in my shell config. Make it feel polished for real everyday use, with sensible defaults, a way to keep trying fixes until one works, and an option to run without asking every time if I want that.

Please include a good set of common correction rules for things like misspelled git commands, wrong paths, bad cd commands, missing sudo, docker mistakes, and similar shell errors. If you need to check current docs or best practices for shell integration, look them up online. Also add tests and make the project easy to install and update with pip.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab