7 ms·
Show HN: Refactory – AI Code Refactoring
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 https://github.com/daniel-black/refactory
- sidcool 3y agoIs it safe to share OpenAI keys to such apps?
- iamdan 3y agoThe key is passed along in the refactor POST request body to OpenAI's chat endpoint (https://github.com/daniel-black/refactory/blob/5289bf54842d11b2caead3d011f2e134ca8b3f87/src/app/api/refactor/route.ts#L15 https://github.com/daniel-black/refactory/blob/5289bf54842d1...) and is not stored anywhere else so yes it should be safe.
- moulin_splooge 3y agoI keep getting 405 errors when passing in some Typescript to refactor.
- iamdan 3y agoHmm I am sorry to hear that. Were you trying to refactor with gpt-4 or gpt-3.5-turbo?