Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rbourgeat/refacto
Refactor your code with local LLM in VSCode
https://github.com/rbourgeat/refacto
code llama llamacpp llm plugin vscode
Last synced: 3 months ago
JSON representation
Refactor your code with local LLM in VSCode
- Host: GitHub
- URL: https://github.com/rbourgeat/refacto
- Owner: rbourgeat
- License: apache-2.0
- Created: 2024-03-14T07:22:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-14T12:17:09.000Z (10 months ago)
- Last Synced: 2024-10-10T06:09:31.458Z (3 months ago)
- Topics: code, llama, llamacpp, llm, plugin, vscode
- Language: JavaScript
- Homepage:
- Size: 88.9 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Refacto
Refacto is a Visual Studio Code extension that allows you to refactor your code using an **local AI model**. The extension sends your selected code to a server running the Llama CPP model, which returns a refactored version of your code.
## Features
- **Refactor Selected Code**: Simply select the code you want to refactor, right-click, and choose "**✨ Refacto selected code**" from the context menu.
## Requirements
- [a llama cpp server](https://github.com/ggerganov/llama.cpp)
- vscode## Installation
1. Install Visual Studio Code 1.50.0 or higher
2. Launch Code
3. From the command palette `Ctrl-Shift-P` (Windows, Linux) or `Cmd-Shift-P` (OSX)
4. Select `Install Extension`
5. Choose the extension `refacto`
6. Reload Visual Studio Code## Build
```bash
npm i
npm run compile
```## Usage
1. Select the code you want to refactor.
2. Right-click and choose "✨ Refacto selected code" from the context menu.
3. The refactored code will replace your selected code.## Configuration
- `llama-cpp.serverUrl`: URL of the Llama CPP server. Default is `http://127.0.0.1:8080/completion`.
## Contributing
If you find any bugs or have a feature request, please open an issue on [github](https://github.com/rbourgeat/refacto)!
## License
[MIT](https://github.com/rbourgeat/refacto/blob/main/LICENSE)