I am working with Cursor. Which is a fork of Visual Studio Code modified with AI in mind. It is my daily driver.
The free version should give you enough monthly requests to finish your script.
An no this is not a stupid AI, it is a optimised version for coding after all. You can even choose which AI you want to use, but some advanced may be behind a paywall.