LibreOffice is a popular open-source office suite known for its flexibility and privacy. However, it does not natively offer artificial intelligence features. To address this gap, John Balis developed localwriter, an extension for LibreOffice Writer that enables users to leverage generative AI locally, without relying on an internet connection or cloud services.
Overview of the localwriter Extension
localwriter is an innovative extension that integrates local AI models to assist with writing and revising text in LibreOffice Writer. It is built on text-generation-webui and Ollama, allowing users to leverage various language models while maintaining full control over their data.
This extension offers two main features:
-
Extend Selection
This feature allows generating text based on a selection.
Possible uses:- Continue a sentence or paragraph from existing text.
- Draft an email or document from a brief prompt.
- Summarize a selected passage.
-
Edit Selection
A dialog box allows giving specific instructions on transforming the text.
Examples of use:- Adapt the tone of a message.
- Translate a passage into another language.
- Rewrite text by simplifying or enriching its content.
Project Genesis
John Balis designed localwriter in July 2024 with the goal of integrating local artificial intelligence into LibreOffice. The idea was to harness the advantages of an offline model, ensuring continuous availability, better privacy, and complete control over the tool without depending on external APIs.
He advocates for a vision where users maintain control over their AI, without the risk of data leaks or unintentional changes to the model used.
Installing and Configuring localwriter
Installing localwriter is straightforward and accessible:
- Download the Extension
- Obtain the latest version of the localwriter.oxt file from the official LibreOffice extensions website.
- Install in LibreOffice
- Open LibreOffice Writer and go to the Extension Manager (Tools > Extension Manager).
- Click on Add, select the
.oxtfile, and then enable the extension.
- Configure the Local API
- localwriter requires text-generation-webui or Ollama.
- Ensure that the local OpenAI API is running on localhost:5000.
- For Ollama, specify the language model in the extension settings.
Once these steps are completed, localwriter is ready to use in LibreOffice Writer.
Keyboard Shortcuts for Quick Use
To enhance the user experience, the extension offers keyboard shortcuts:
| Function | Keyboard Shortcut |
|---|---|
| Extend Selection | Ctrl + Q |
| Edit Selection | Ctrl + E |
These shortcuts allow for a seamless integration of AI into the writing process.
Current Limitations and Planned Developments
localwriter currently supports only LibreOffice Writer, but support for LibreOffice Calc is in development.
Other limitations include:
- No Streaming: real-time text generation is not yet available.
- No Document Chat: interactions are only possible through available commands.
The extension is open source and its development is active. Many users are already suggesting improvements via the project repository. Contributions are welcome, whether to develop new features, test the tool, or support the project through donations.
License and Open Source
localwriter is published under the MPL 2.0 License, ensuring complete transparency. Some elements of its code are under Creative Commons Attribution-ShareAlike 3.0.
Conclusion
localwriter represents a significant advance for LibreOffice users looking to integrate local generative AI without compromising their privacy. With its text extension and modification features, it simplifies writing and editing in LibreOffice Writer while ensuring autonomy and control over data.
With this extension, LibreOffice is moving closer to intelligent office suites, while remaining true to its open-source and privacy-respecting model.


