Ofrenda:不捏造內容的離線命令列工具,助人紀念某人
Ofrenda: a offline CLI that helps you remember someone, without inventing a word
Ofrenda 是一款離線命令列工具,透過本機模型提問,並根據用戶的回答撰寫紀念文字及祭壇物品清單。工具使用 Ollama 執行本機 Gemma,生成內容只取材於用戶提供的回答,不加入模型自行補寫的內容。模型下載後,即使關閉 Wi-Fi 也可使用,資料不會離開裝置。
Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Ofrenda is a small command-line tool that helps you remember someone. You run ofrenda new, and a local model asks you quiet questions, one at a time: what they liked to eat, a song they hummed, something they always said, a place that was theirs. When you finish, it writes two plain Markdown files: a short remembrance, and a checklist of things you might put on an ofrenda.
I read "Ghost in the Machine" as the person who is no longer in the room, or no longer in your life, but still shows up in small habits and phrases. The idea started with Día de los Muertos, which treats memory as something to celebrate. But the tool isn't only for people who have died. It works just as well for a childhood friend you lost touch with.
I held myself to one rule: the model must never invent anything. The remembrance can only rearrange what you actually told it. If you give it little, the file is short. I would rather it say too little than make things up.
Demo
Here is the format, using a fictional friend (I wrote this example by hand to show the output; the person isn't real):
$ ofrenda new
Who are you remembering: Karthik
How did you know them: my childhood friend
What did Karthik love to eat?
> Mirchi bajji from the cart outside school. He'd buy two plates and always give me the bigger one.
[... more questions ...]
The resulting remembrance.md:
# Karthik
Karthik and I played cricket on the ground behind our colony until the
streetlights came on. Before every ball, he tapped his bat on the ground twice.
Outside school there was a cart that sold mirchi bajji. He would buy two plates
and always give me the bigger one. He hummed "Kal Ho Naa Ho" badly on purpose,
just to annoy me. He used to say, "Chill maar, bhai."
The cracked tennis-ball bat with his initials carved into it is still with me.
We lost touch after college. Last year I found out he had moved abroad.
Every sentence there traces back to something the user typed.
Code
ofrenda
A small offline command-line tool that helps you remember someone.
You answer a few quiet questions about a person — what they cooked, a song they hummed, a phrase they always said — and the tool writes two plain Markdown files: a short remembrance and a checklist of things you might put on an ofrenda. Everything runs on a local model through Ollama, so nothing leaves your machine.
I made this during Hacktoberfest 2026, Week 4: Ghost in the Machine. The theme was about honoring the past, and Día de los Muertos felt like the right frame — a celebration of memory, not loss.
Install and run
1. Install Ollama
Download from ollama.com and make sure it's running.
2. Pull a model
ollama pull gemma3:4b
Any other small model works too. You can change it in the config (see below).
3. Install ofrenda
git clone https://github.com/madhav-1204/Ofrenda-CLI.git
cd ofrenda-cli
pip…
How I Built It
-
Model: Gemma, running locally through Ollama. The default is
gemma3:4b, and you can change it in~/.ofrenda.tomlor with--model. - Language: Python with a small CLI. Output is plain Markdown and JSON in a local folder. No database, no API keys, no telemetry.
-
Prompts: They live in a
prompts/folder as plain text files, so anyone can read and edit them. - Interview: The model sees the conversation so far and asks one follow-up at a time, so each question reacts to your last answer instead of following a fixed script.
- Writing step: The remembrance and checklist are built from your answers only, not from the interviewer's own comments. I made this change after noticing in an early example that something the model said out loud ended up in the output as if the user had said it.
- Tests: pytest with a mocked model.
What didn't go smoothly: small models sometimes ask two questions at once even when told not to, and I left that in the README as a known limitation. Prompts are written and tested in English only. There's a language setting in the config, but I haven't verified other languages.
Why Does Open Innovation Matter?
Stories about family and friends are some of the most private things people have: names, how someone died, what they were like at home. I didn't want any of that going to a cloud API.
An open-weight model made these things possible:
- It runs offline. Once the model is downloaded, the tool works with Wi-Fi off.
- Nothing leaves the machine. There's no account, no key, and no server where your memories could be read.
- You can inspect and change it. The prompts are plain text, so you can see exactly what the model is told.
- You can swap the model. Use a smaller one on an old laptop or a bigger one if you have the hardware.
- It costs nothing to run.
Prize Categories
- Best Use of Gemma: the whole tool runs on a local Gemma model through Ollama.
來源:DEV Community · dev.to
