ewan's projects — docs

projects

llm-analyser

February 24, 2026

# python# ollama# ai# tools# monorepo

llm-analyser is a Python CLI tool that reads all .docx files in a given directory and uses a locally-running Ollama model to generate analytical essays for each one. Output essays are saved to a new folder named <directory>_essays in the project root.

This tool is now part of the @ewanc26/pkgs monorepo.

Setup

Requires Python 3 and Ollama running locally.

# Clone the monorepo
git clone git@github.com:ewanc26/pkgs
cd pkgs/packages/llm-analyser

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Create the custom Ollama model from the included Modelfile:

ollama create document-analyser -f ./Modelfile

Usage

python3 main.py <directory_to_analyse>

For example:

python3 main.py ~/Documents/Literature/Poetry

This reads all .docx files in Poetry/ and saves generated essays to Poetry_essays/ in the project root.

Customising the Model

Edit the Modelfile to change the system prompt, base model, or generation parameters. If you change the FROM line, rebuild with ollama create.

Licence

See repository.


← all docs