StudyMerchant
A simple web interface that turns your study materials into actionable tasks and daily plans. It aims to 'reverse engineer' your study plan; start from exams, generate tasks to learn common questions, and fill in the gaps with course content like lectures.
NOTE: This is designed purely for offline local access. There is no authentication whatsoever (yet) since it's designed to work with a local Ollama instance. Don't expose any ports. A service like Tailscale can be used if you want to access StudyMerchant from outside your network.
Abstract
You upload PDFs. It reads them and extracts specific things you need to do: revise topics, practice problems, review past papers, etc. Each task gets tagged with a topic, priority, and time estimate.
Then when you want to study, you tell it how long you have and it picks the right tasks for that session. At the end of the day, you log what you actually did and the tool builds up a knowledge log that helps it plan better sessions.
It is designed to work backwards from past papers to course content. Upload all past papers first, adding context like "there is no longer a multiple choice" or "the exam is now 2 hours, not 3" for each. Then add lecture content, and the LLM will link your course content with common exam questions to give you a tailored study plan. If course content has not appeared in exams, it will classify these as 'gaps' and could even predict whether a question is likely to be asked if it hasn't appeared in exams for a while (although you may need a very smart LLM).
Requirements
- Go 1.21+
- pandoc with xelatex (for PDF generation, this will be made customisable)
- an Ollama instance, with any local or cloud LLM running
Installation
Setting up requirements: MacOS
- Install Ollama with brew, and set up its service:
brew install ollama
brew services start ollama
- Run a model:
If you really want to, you can run a local LLM. You'll probably save money on electricity and get better outputs by using one of their cloud models, like kimi-k2.5:cloud (cheap, great reasoning); at the time of writing, they have a generous free tier.
Run the model you wish to use with, for example, ollama run kimi-k2.5:cloud.
-
Install Go with brew:
brew install go. -
(Optional for PDF generation) Install MacTeX from their website.
-
(Optional for PDF generation) Install pandoc with
brew install pandoc.
Setting up requirements: Linux
- Install Ollama with their installation script, following this guide, and run a model (as above).
- Install
golangorgowith your distribution's package manager. - (Optional for PDF generation) Install
pandocand a LaTeX distribution with xelatex with your distro's package manager.
Setting up StudyMerchant
git clone https://codeberg.org/x/studymerchant
cd studymerchant && go build
./studymerchant
Then go to http://localhost:8080/help in your browser.
IMPORTANT: make sure to set your LLM model to match what you started with Ollama. This can be done in the Settings page.
Advanced configuration
Three settings come from CLI flags:
| Variable | Default | Description |
|---|---|---|
-addr |
localhost:8080 |
Server address |
-db |
~/.studymerchant/studymerchant.db |
Database path (bbolt) |
-debug |
false |
Enable debug logging |
While two come from environment variables:
| SM_PRODUCTION | false | Use JSON logs when true (text otherwise) |
| OLLAMA_HOST | http://localhost:11434 | Set the host and port that Ollama is listening on |
Everything else is configured through the web UI under Settings: LLM model, default study time, how much history to keep, etc.
Starting as a system service on Linux
If you want StudyMerchant to run at login, or on boot, configure systemd/studymerchant.service to your liking (particularly see that it depends on ollama-stack.service; you'll want to change this if you have another name for your ollama service). Put this into ~/.config/systemd/user and run systemctl enable --user --now studymerchant. This may differ depending on your distro.
Data storage
Everything lives in a bbolt database (default: ~/.studymerchant/studymerchant.db). The knowledge log and all your tasks are stored there. You may wish to back this up.