r/SideProject • • 18d ago

I built Loft, a tiny open-source desktop notch that answers questions about your local files with llama.cpp, with citations (Rust/Tauri/Svelte)

I built Loft, a little notch that sits at the top of your screen. Click it and it opens into a chat where you can ask questions about your own docs, folders and code.

It all runs locally on llama.cpp, with no cloud and no API key.

How it works:

  • Point it at a folder and it indexes it locally

  • Ask a question and llama.cpp answers on your GPU or CPU (there are experimental NPU options too)

  • Every answer cites the file it came from, so you can check it yourself

  • Chat history stays local

  • You pick the model and the performance settings

It's built with Rust, Tauri and Svelte.

To be honest, it's early. It's tested on Windows, initially validated on macOS, and Linux builds pass CI on Ubuntu 24.04 but need real-world testers. I'd love help from Linux testers, NPU tinkerers, Svelte folks and anyone with ideas for better chunking.

Nothing for sale. It's MIT open source from EAN Digital. It's just a fun project I'd like people to hack on, so issues and PRs are very welcome.

Fork it. Break it. Make it yours. https://github.com/nwaoga/loft

10 Upvotes

14 comments sorted by

1

u/Nwaoga 16d ago

Quick update: Loft 0.1.2 is out. Windows users can download the installer (.exe or .msi) from the release; Mac and Linux build from source for now. https://github.com/nwaoga/loft/releases/tag/v0.1.2

1

u/QuanTradin 18d ago

for code I'd chunk by function or class instead of fixed token windows, with the file path and signature stuck on the front of each chunk. cited answers get a lot better when the chunk is a whole unit, not half of one function and the start of the next.

1

u/Nwaoga 17d ago

Thanks, good shout. Right now chunks are size-based and split on line and paragraph breaks, not code structure, so function/class chunks with the path and signature up front would be a real upgrade. Noted for the roadmap.

1

u/QuanTradin 17d ago

tree-sitter gets you most of that for free, it already knows where every function and class starts and ends in most languages. then it's just prepending the path and signature.

1

u/UnreachableMemory 17d ago

You're talking to a well known bot...

1

u/Excellent_Dot4727 18d ago

One edge case worth testing: index a folder, then edit or delete a source file and ask the same question again. A citation to an old copy can look pretty convincing. It'd be useful to show when the source was last indexed and let the citation open the exact passage.

1

u/Nwaoga 17d ago

Great edge case, thanks. Loft watches indexed folders, so edits re-index and deleted files drop out automatically, but there's still a window before that happens and the citation doesn't show when the file was last indexed. Showing that, and jumping to the exact passage, are both good ideas.

-1

u/kantorcodes1 18d ago

The per-answer file citations are a useful check for local retrieval. Are you storing chunk offsets or just file paths today, and how do you keep citations stable when a file changes between indexing and answering?

1

u/Nwaoga 10d ago

Good question. Chunks store the file, their position in it and the page, sheet or slide number where there is one, rather than byte or line offsets. Each citation saved with an answer keeps the file path, the page, a snippet of the quoted text and a hash of the file's contents. When a file changes, the hash changes, so Loft re-parses it and replaces its chunks. Older answers keep their saved snippet, so you can still see exactly what was quoted.

1

u/kantorcodes1 10d ago

The hash does the work there. When it changes, Loft re-parses the file and replaces the chunks, and the older answer keeps its saved snippet, so a citation can still be checked against what was quoted instead of whatever the file says now. That answers my question.

0

u/[deleted] 18d ago

[removed] — view removed comment

1

u/Nwaoga 18d ago


Try it out fork it break it add to let me know