Install Puri
Three commands in Ubuntu's Terminal, or a dozen if you'd rather run each step yourself. At the end, Puri answers from your mail, calendar and documents, finds places and the weather, plays your music and takes dictation. Web search waits for a key of your own.
Before you start
- Ubuntu 26.04 with GNOME, the desktop Ubuntu installs. Other distributions haven't been tried yet.
- Thunderbird with your mail in it, the snap Ubuntu ships or apt's.
- A graphics card with 8 GB of memory runs the model fastest. Integrated graphics work too, more slowly. A computer with neither is very slow: see no graphics card.
- About 5 GB of free disk: 3–4 GB for the model, half a gigabyte for dictation, and the rest for Puri.
- Ubuntu's Terminal. Every command below goes there: copy a block, paste it with Ctrl+Shift+V, and press Enter. A command starting with
sudoasks for your password.
Super-quick
The packages from Ubuntu's archive, then Puri, cloned into ~/puri, which it runs from, and its setup:
$ sudo apt install git ruby ruby-bundler ruby-dev build-essential \ ruby-gtk4 gir1.2-adw-1 gir1.2-shumate-1.0 libgtk-4-bin ripgrep \ llama.cpp-tools libggml0-backend-vulkan whisper.cpp \ localsearch-extractor-office rhythmbox $ git clone https://github.com/mvysny/puri ~/puri $ ~/puri/bin/setup
The setup asks before each thing it does, and never uses sudo. It installs the Ruby libraries Puri needs into ~/puri, binds Super+Alt+Space and starts Puri when you log in, writes the config, and downloads the two models, 3.5 GB, carrying on where it stopped if you run it again. Where Thunderbird or GNOME's file index needs a setting, it says where to click, or offers to make it.
Run it again whenever something doesn't work: it checks each step below and says what's missing.
Check: its last line says Puri is ready. Then try it, and add a search key for web search.
Step by step
The same, a command at a time: eight steps, each ending in a check. The models' download is the slow part, so it starts early and runs while you do the rest.
1Check Thunderbird's search
Puri searches your mail through Thunderbird's own index, which stays current only while Thunderbird's global search is on. It is, unless you switched it off: in Thunderbird, Settings → General → Enable Global Search and Indexer.
A calendar on a server, such as Google's or Nextcloud's, needs its Offline Support on, so that Thunderbird keeps a copy on your disk for Puri to read: right-click the calendar, then Properties.
Check: Thunderbird's search bar, at the top of its window, finds a mail by a word from its text.
2Install the packages
Puri's toolkit, Ruby, llama.cpp to run the model, whisper.cpp for dictation, the office-file reader for your file index, and Rhythmbox, all from Ubuntu's archive. The second line adds hf, Hugging Face's own tool, which downloads the models in the next step; without --no-install-recommends, apt would add a hundred Python packages it never uses.
$ sudo apt install git ruby ruby-bundler ruby-dev build-essential \ ruby-gtk4 gir1.2-adw-1 gir1.2-shumate-1.0 libgtk-4-bin ripgrep \ llama.cpp-tools libggml0-backend-vulkan whisper.cpp \ localsearch-extractor-office rhythmbox $ sudo apt install --no-install-recommends python3-huggingface-hub
Check: apt finishes without an error, both times.
3Download the models
Two models run on this computer: Qwen 3.5 4B, which answers, 3 GB, and Whisper's small, which turns your voice into text, half a gigabyte. Puri runs both itself, so there's no server to set up. These download them from Hugging Face into ~/.cache/huggingface/hub:
$ hf download ggml-org/Qwen3.5-4B-GGUF Qwen3.5-4B-Q4_K_M.gguf $ hf download ggerganov/whisper.cpp ggml-small.bin
Leave them running, open a second tab with Ctrl+Shift+T, and go on with the next steps there. If a download stops, run it again.
hf warns that your requests are unauthenticated: the models need no Hugging Face account. It may also suggest pip install hf_xet or hf update; skip both, since hf comes from apt, which updates it.
Check: each command ends by printing where it saved its file, under ~/.cache/huggingface/hub.
4Install Puri
Puri itself is plain Ruby, cloned into ~/puri. It runs from that folder, so keep it. Bundler fetches the Ruby libraries Puri needs into the same folder, and rake install adds Puri to your desktop:
$ cd ~ $ git clone https://github.com/mvysny/puri $ cd puri $ bundle config set --local path vendor/bundle $ bundle install $ bundle exec rake install AUTOSTART=1
rake install binds Super+Alt+Space, and AUTOSTART=1 starts Puri when you log in, so even the first press is instant. It writes three files under your home and never uses sudo.
Check: the last command lists the three files it wrote.
5Copy the config
One file says what Puri may use, and each part of it says what it does and what it sends out of your computer. Copy it, then read it:
$ mkdir -p ~/.config/puri $ cp ~/puri/docs/config.toml ~/.config/puri/ $ gnome-text-editor ~/.config/puri/config.toml
Everything in it is on, except web search. It has Puri run the two models from step 3 itself. Places and the weather send what you ask about to public services, as the file says; to turn one off, put a # before its lines. You can also read the file here before you install.
Check: Super+Alt+Space opens Puri's search bar. If the config has a mistake, a dialog says what, and its button opens the file: fix it, close the dialog, and press the shortcut again.
6Reindex your documents
Puri finds your documents through GNOME's own file index, the one the Files app searches. Installing the office-file reader in step 2 doesn't reread what the index already holds, even after a restart (a localsearch bug), so rebuild it once:
$ localsearch reset
It asks before erasing the index, then reads your home folder again, office files included. That can take a while.
Check: localsearch status no longer says that data is still being indexed, and in GNOME's Settings → Search → Search Locations, your Documents folder is on.
7Try it
Once both downloads from step 3 have finished, press Super+Alt+Space and ask, one question per feature. When one fails, its section under Each feature says what it needs.
| Ask | It tries |
|---|---|
| What's on my calendar this week? | the calendar |
| Find the last mail from someone who writes to you | |
| Find the invoice from a company you pay | documents |
| Remember that I prefer window seats | notes and memory |
| How far is it to a nearby town by car? | places and routes |
| Will it rain tomorrow in your town? | the weather |
| Play some artist in your Rhythmbox library | music |
| Press F5, say something, press F5 again | dictation |
The first answer after Puri starts takes longest: Puri loads the model, a few seconds, and the model then reads Puri's instructions, which takes up to half a minute on integrated graphics.
Check: each question gets its answer.
8Add a search key
Web search is the one feature that needs a key of your own, from Brave Search or Exa. Puri sends each search query there, and a query may quote your mail; Exa's terms let it train on what you search for. Puri reads the engine's copy of each page and never opens a link itself.
In your config, remove the # from the [search] line and the line of your engine's key, and put the key in:
[search] brave_key = "your key"
Then make the file yours alone to read, quit Puri with Ctrl+Q, and press Super+Alt+Space: Puri reads its config when it starts.
$ chmod 600 ~/.config/puri/config.toml
Check: asked what's in the news today, Puri shows a search step above its answer.
Each feature
What each one needs, what it sends out, and how to change it. Puri reads its config when it starts, so after an edit, quit it with Ctrl+Q and press Super+Alt+Space.
Mail, contacts and calendar
Puri reads your Thunderbird profile, snap or apt, which it finds on its own, and never writes there. A mail you ask it to write opens in Thunderbird's compose window, and an event in its import wizard; nothing leaves until you send or add it there.
Mail search needs Thunderbird's global search, and a calendar on a server its Offline Support (step 1). When Puri finds two profiles with mail, it names both: put the one you use in profile_dir under [thunderbird]. enabled = false there turns mail, contacts and calendar off.
Documents and notes
Puri searches your Documents folder, whatever your desktop's language calls it, and nothing else. It goes through GNOME's file index, which also holds the text of your PDFs and office files: localsearch-extractor-office (step 2) adds DOCX, XLSX, PPTX, ODT, ODS, ODP and EPUB, and the older DOC, XLS and PPT need nothing extra.
A file the index doesn't hold, such as a mail attachment, is converted in a container with no network when podman is installed (sudo apt install podman). Without it, Puri reads only PDFs.
Puri writes only in the Notes folder inside Documents: its notes, and Notes/PURI.md, what you asked it to remember, a plain file you can edit. To use another folder than Documents, set folder under [documents].
Places and routes
Where a place is, what's open nearby, and how far by car, from OpenStreetMap, with a map under the answer. The place you ask about goes to OpenStreetMap's public services: Photon finds it by name, Nominatim what's nearby, and FOSSGIS's OSRM the drive. Asked what's near you, Puri asks for your home address once, remembers it in Notes/PURI.md, and sends it to Photon. Puri's tools has what each request sends. A click on a pin opens the place in GNOME Maps, or on openstreetmap.org when Maps isn't installed.
The map's tiles come from the server in tiles under [maps], OpenStreetMap's own unless you change it.
Weather
Open-Meteo's forecast, up to about two weeks ahead and in GNOME's units, for a place or for the trip in your calendar. Puri finds the place on OpenStreetMap, so the weather needs [maps] too, and sends Open-Meteo a point rounded to about a kilometre. Weather data by Open-Meteo.com, under CC BY 4.0.
Music
Puri plays an artist, an album, a song or a genre from your Rhythmbox library: "play some State Azure", or "play my favourite music" once you've told it your favourite. It starts Rhythmbox when it isn't running. An artist or a genre plays shuffled and replaces what you had queued; pause and skip with the media keys. It needs Rhythmbox's D-Bus Media Server plugin, which is on unless you switched it off.
Dictation
Press F5 or click the mic in the search bar, speak, and press F5 again. The text lands at the cursor, for you to send with Enter; Escape drops it. Your voice stays on this computer: Puri runs Whisper on each clip, and nothing holds memory between clips. On a processor alone, small takes about 5 seconds for a short clip, and twice that while it works out which language you speak; language = "de", or your own language's code, under [dictation] saves that. Integrated graphics take under a second. Your desktop's own dictation types into Puri too, as into any other field.
Other models come from the same place as step 3's: base is smaller and faster and makes more mistakes, medium is slower and makes fewer. A model whose name ends in .en understands only English, and turns any other language into English gibberish. To switch, download one, then put its name in place of ggml-small.bin under [dictation], quit Puri with Ctrl+Q, and press Super+Alt+Space:
$ hf download ggerganov/whisper.cpp ggml-medium.bin
Web search
Set up in step 8. With both keys, Puri picks an engine per query; engines = ["brave"] under [search] keeps it to one. DuckDuckGo isn't offered, because it returns no page text for Puri to read.
The shortcut
Super+Alt+Space, which GNOME leaves free. To pick another, install again with it; each rake install sets everything from its own options, so leaving out AUTOSTART=1 stops Puri starting at login.
$ cd ~/puri $ bundle exec rake install AUTOSTART=1 HOTKEY='<Super>p'
In Puri, Escape hides the window and Ctrl+Q quits; F9 shows your earlier conversations, and Ctrl+N starts a new one.
The model
Puri runs the model in llama-server, from step 2's llama.cpp-tools, which puts as much of it on your graphics as fits. It starts and stops with Puri, and writes its log to ~/.local/state/puri/llama-server.log.
Qwen 3.5 4B is small, a short download, and runs on most graphics cards. A smarter model needs far more memory: Choose a model compares Qwen with Ornith 1.5, says which computer runs which, and how to run the model on a home server of yours.
Games and graphics memory
While Puri runs, its model holds most of an 8 GB graphics card's memory, so a big game may not start, or may stutter. Resources, Ubuntu's system monitor, shows how much of the card's memory is in use. Before you play, quit Puri with Ctrl+Q: the model stops with it, and dictation holds nothing between clips. Afterwards, press Super+Alt+Space, and Puri loads the model again.
On integrated graphics the model holds ordinary memory instead, the same way.
Updating
apt updates everything but Puri along with the rest of Ubuntu. Puri updates from its folder:
$ cd ~/puri $ git pull $ bin/setup
Then quit Puri with Ctrl+Q and press Super+Alt+Space. A new feature may bring a new part to ~/puri/docs/config.toml: compare it with yours.
Uninstalling
Quit Puri with Ctrl+Q, which stops its model too, then take it off your desktop:
$ cd ~/puri $ bundle exec rake uninstall
What's left is yours to delete or keep:
~/puri, Puri itself~/.config/puri, the config~/.local/state/puri, your conversations and the model's log~/.cache/puri, Puri's copy of Thunderbird's mail index and calendarmodels--ggml-org--Qwen3.5-4B-GGUFin~/.cache/huggingface/hub, the model, and Ornith's folder beside it if you switchedmodels--ggerganov--whisper.cppbeside it, the dictation modelNotesin your Documents folder, your notes and what Puri remembered
The apt packages stay too; remove them with apt if nothing else uses them.
When something doesn't work
~/puri/bin/setup, run in a terminal, checks each step of this guide and says what's missing. It asks before it fixes anything, such as a model to download, and never uses sudo.
Super+Alt+Space does nothing
A mistake in the config shows in a dialog of its own. With no dialog either, start Puri in a terminal, where it says what's wrong: ~/puri/exe/puri; ~/puri/bin/setup checks the rest.
Puri says the model isn't downloaded, or won't start
It names the model it looked for: ~/puri/bin/setup downloads it, as does step 3; let the download finish. When the model is there and still won't start, its log, ~/.local/state/puri/llama-server.log, says why; too little memory is the usual reason. Once that's fixed, ask again: Puri starts the model over without a restart.
The first answer takes long
Before its first answer, Puri loads the model, and the model reads Puri's instructions, about 10,000 tokens: up to half a minute on integrated graphics, less on a graphics card. Later questions start sooner.
Mail search finds nothing
Thunderbird's global search is off, or still indexing your mail: see step 1.
The calendar is empty
A calendar on a server needs its Offline Support on, so that Thunderbird keeps a copy on your disk: see step 1.
Office files are found by name only
The index holds them without their text: install localsearch-extractor-office and rebuild the index, step 6.
Puri found two Thunderbird profiles
Put the one you use in profile_dir under [thunderbird]: see Mail, contacts and calendar.
Dictation types nothing
The row under the search bar says why. Most often Whisper's model isn't downloaded yet: ~/puri/bin/setup downloads it, as does step 3. The next press of F5 finds it, with no restart.
A game won't start
The model holds the graphics card's memory: see Games and graphics memory.
Where each piece comes from
- From Ubuntu's archive, signed and updated by apt with the rest of Ubuntu: GTK, libadwaita, Ruby, llama.cpp, whisper.cpp, Hugging Face's
hf, localsearch and Rhythmbox. - Puri, a git clone of its source: plain Ruby you can read, with nothing compiled.
- Its Ruby libraries, from rubygems.org through Bundler. Puri's
Gemfile.lockpins each one's version and SHA-256, sobundle installrefuses one that changed; pikuri's libraries come from GitHub, pinned to one commit. A few compile some C on your computer, which is why apt installsbuild-essential. - The two models, from Hugging Face, fetched by Puri's setup, which checks each against the SHA-256 Hugging Face lists, or by
hf. Both are weights, files of numbers that llama.cpp and whisper.cpp read, not programs. - Puri's setup,
bin/setupin the clone: plain Ruby, like the rest, which you can read before you run it. It asks before each change it makes, never usessudo, and does nothing the steps on this page don't. rake install, or the setup, writes three files under your home, a desktop entry, a D-Bus service and an autostart entry, and sets one GNOME shortcut. It prints each file, never usessudo, andrake uninstallremoves them all.