/ctrl_plus_revise

Your local AI Assistant.

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Ctrl+Revise

Discord

Ctrl+Revise

Ctrl+Revise is an AI tool uses keyboard shortcuts that when pressed has an AI agent act on the text that is currently selected (highlighted) and the response replaces the highlighted text if writable and is added to the clipboard to be pasted elsewhere.

The AI models run locally on your machine, ensuring your privacy and data security.

Compatible with Windows, Linux, and MacOS, supporting AMD, Nvidia, and Apple M series chips architectures.

Features

  • Keyboard shortcuts: Uses keyboard shortcuts to provide quick responses without switching focus away to another program.
  • Local AI model: Runs locally on your machine, ensuring your privacy and data security.
  • Multiple AI models: Supports multiple AI models to provide a variety of suggestions.
  • Meal Planner: Create recipes, meal prep plans, and grocery lists based on what you have with a simple GUI.
  • Text Translation: Supports translation to and from multiple languages.
  • Grammar Correction: Corrects grammar mistakes in the text.
  • Change Tone: Changes the tone of the text to be more formal or informal.
  • Summarize text: Summarizes text to provide a concise version.
  • Expand text: Expands text to provide more details.
  • Explain text: Explains complex topics in simple terms.
  • Create Lists: Creates bullet points and numbered lists from blocks of text.
  • Audio feedback: Provides audio feedback for the suggestions made by the AI models.
  • Cross-platform compatibility: Compatible with Windows, Linux, and macOS, supporting AMD, Nvidia, and Apple M1 chip architectures.

Getting Started

System Requirements:

  • 8GB of RAM (GPU) or 16GB of RAM (CPU)

Dependencies:

Ollama

Ollama is a tool for interacting with various Large-Language-Models. It is used to interact with the AI models.

Ctrl+Revise will download and install the latest release Ollama with the click of a button.

You can manually download the latest release from the Ollama.com website.

Windows

Windows users can install Ollama.com from the official website.

MacOS

MacOS users can install Ollama from Homebrew.

brew install ollama
Arch Linux

Arch Linux users can install Ollama from the official repository.

CPU AMD GPU Nvidia GPU
sudo pacman -S ollama sudo pacman -S ollama-rocm sudo pacman -S ollama-nvidia

Ollama Server

If you have Ollama running on a different machine, you can configure the IP address and port in the settings or by setting the environment variable OLLAMA_HOST to the address of the machine running Ollama.

export OLLAMA_HOST=http://<host-IP>:11434

Docker (optional)

If users select to use Docker to run Ollama, Ctrl+Revise will pull the latest Ollama Docker image and manage running it.

The official Ollama Docker image ollama/ollama is available on Docker Hub.

Note

The Docker integration is disabled by default and can be enabled in the settings.

Xclip or Xsel (Linux only)

Xclip or Xsel is used to interact with the clipboard on Linux systems. They are likely to be installed on your system already.

Arch Ubuntu Fedora
sudo pacman -S xclip sudo apt install xclip sudo dnf instal xclip
sudo pacman -S xsel sudo apt install xsel sudo dnf instal xsel

Building from source

Windows

Please follow the Getting Started guide from the Fyne documentation here to setup MSYS2 and compile from within the MingW-w64 window.

MacOS

Set up the Xcode command line tools by opening a Terminal window and typing the following:

xcode-select --install

Linux

Find the list of dependencies for your distro in the Fyne documentation here

To start the project run the following command:

git clone https://github.com/bahelit/ctrl_plus_revise.git
cd ctrl_plus_revise
go run .

Note

The first time you run the project it will download the required models and may take a few minutes to start.

Note

The first request can take a few seconds to respond as the model is loaded into memory. The memory is released after five minutes of inactivity.

Developing

To develop the project, you need to have the following tools installed on your machine:

This project uses the Fyne Toolkit, learn more about the Fyne Toolkit at fyne.io.

The Stringer tool

This project uses the stringer tool, this will generate a <type>_string.go file with the data type and its String() method. To re-generate the string.go files after making code changes, use the following command:

make stringer

Screenshots

Main Menu Keyboard Shortcuts Meal Planner
Main Menu Shortcuts Window Meal Planner

Contributing

Ctrl+Revise is in active development and there are many features that are planned to be added.

Contributions are welcome and will be fully credited.

TODO

  • Bring back pop-up dialog on keyboard shortcut as an option
  • Windows - Fix model download notification.
  • Windows, prevent console window from opening
  • UI Improvement - show the model download progress percentage
  • UI Improvement - fix window resizing issues in Ask A Question window
  • Docker - pull based on GPU type
  • Custom keyboard shortcuts
  • Settings menu for Ollama connection
  • Improve model management - Download and update modals from the settings
  • Chatbot and chat history (chat with an AI and save the chat history)
  • Clipboard not working in flatpak even though it works native in Wayland
  • Create AppImage package
  • Create Snap package
  • Improve Docker support - Check for new versions of Ollama and update
  • Improve model management - Ability to delete models
  • Image support (detect what is in the image using Llava or similar models)
  • Image OCR support (read text out of an image using Llava or similar models)
  • Localized language support (go-i18n)
  • On device text to speech (considering eSpeak already in most Linux distros or Coqui-AI TTS)
  • File and directory organizer (organize files and directories based on content)
  • Right-click and hold brings up rotary menu for quick access to features (or keyboard shortcuts)
  • RAG (Retrieval-Augmented Generation) model support