Promptr is a coding assistant tool that allows you to ask GPT to produce or modify code, and the results will be automatically applied to your file system.
https://github.com/ferrislucas/promptr
From the README: Promptr is a CLI tool that makes it easy to apply GPT's code change recommendations with a single command. With Promptr, you can quickly refactor code, implement classes to pass tests, and experiment with LLMs. No more copying code from the ChatGPT window into your editor.