News for hackers. Stuff that matters.

Show HN: Refactory – AI Code Refactoring

https://userefactory.com

I found myself copying code snippets into ChatGPT all too often so I built a tool to make refactoring code easier.

You will need to bring your own OpenAI API key to use the tool.

I'd love any and all feedback about how I can improve the app. Thanks!

Also, this is open source - the code can be found at: https://github.com/daniel-black/refactory

( 4 comments | on HN )
Re:Show HN: Refactory – AI Code Refactoring by sidcool on Wednesday October 18, 2023 @09:53AM (#37928691)
Is it safe to share OpenAI keys to such apps?
Re:Show HN: Refactory – AI Code Refactoring by iamdan on Wednesday October 18, 2023 @10:05AM (#37928871)
The key is passed along in the refactor POST request body to OpenAI's chat endpoint (https://github.com/daniel-black/refactory/blob/5289bf54842d1...) and is not stored anywhere else so yes it should be safe.
Re:Show HN: Refactory – AI Code Refactoring by moulin_splooge on Wednesday October 18, 2023 @01:09PM (#37931602)
I keep getting 405 errors when passing in some Typescript to refactor.
Re:Show HN: Refactory – AI Code Refactoring by iamdan on Wednesday October 18, 2023 @01:39PM (#37932040)
Hmm I am sorry to hear that. Were you trying to refactor with gpt-4 or gpt-3.5-turbo?