If you’re on a Mac, Ollama with the Code Llama model and a bit of prompting is pretty decent if you’re doing Python or Javascript.
Runs locally on Apple Silicon.
5-10 minute setup. It’s all free.
Edit: a couple of comments below are recommending Mistral 7B over Code Llama/Llama2, so give that a try with Ollama too:
ollama run mistral
https://ollama.ai/library/mistral