Tired of typos sneaking into your writing? This repository contains everything you need to run your own, locally hosted, AI-powered grammar, style, and spelling assistant.
No need to send your text off into the cloud—keep everything private and on your own machine. 🏡
Using Pasquale with TeXstudio:
pasquale0.1.mp4
Note: This example required less than 1.5GB of VRAM.
-
Local-first and private: All processing happens on your machine. Using local LLMs, your text stays yours.
-
AI-powered corrections: Uses modern language models to catch grammar, spelling, and style issues beyond traditional checkers.
-
Explanations included: Suggestions come with reasoning, so you can understand and decide what to accept.
-
Lightweight by design: Built to work well with small, efficient LLMs without consuming excessive resources.
-
Multi-language support (in progress): Ongoing work to support multiple languages effectively, even with smaller models.
-
Python 3.7 or newer
Check withpython --versionorpython3 --version. -
Local LLM server and model
Any server compatible with the OpenAI API format will work. -
Python dependencies
- Flask
- OpenAI package
-
Install an LLM inference server and model
You’ll need a local LLM backend. Popular options include:
- ollama
- llama.cpp
- LM Studio
Example for gemma3 1B using ollama:
# install ollama curl -fsSL https://ollama.com/install.sh | sh # download model ollama pull gemma3:1b-it-qat
-
Clone the repository
git clone https://github.com/joaopaulo7/pasquale.git cd pasquale -
Install dependencies
pip install -r requirements.txt
-
Start the server
Either run directly with python3 command:
python3 src/simple_server.py
or use a docker container:
docker build -t pasquale . && docker run --rm -p 5000:5000 pasquale
You should see something like:
Running on http://127.0.0.1:5000Note: The server runs over HTTP (not HTTPS), which is fine for local use.
-
Configure credentials and inference options
Access
http://127.0.0.1:5000/config(or directly edit yourconfig.yamlbefore running) to change the default options:- Credentials:
- base_url: URL to an openAI-compatible endpoint
- api_key: API key for your LLM server
- Inference options:
- model: Model on which to run the bot
- genres: Desired writing styles
- extra_prompt: Additional instructions for the model
- thinking: enable or disable thinking (disabled for faster results)
- temperature: Controls randomness
- max_tokens: Limits response length
- Credentials:
-
Connect a client
Pasquale is API-compatible with LanguageTool, so most editors can use it with minimal setup.
Just replace the LanguageTool server URL with your local Pasquale URL.
Example (TeXstudio):
- Go to Options > Configure TeXstudio > Language Checking
- Set the server URL to:
http://localhost:5000/
You should start seeing suggestions as you type.
Pasquale is an early-stage, single-developer project—expect frequent changes.
Planned improvements:
- Evaluate and improve integration with other clients
- Expanded language support
- More model-specific prompting
God, I hope there aren't any typos in this README.