- Rust 72.9%
- JavaScript 22.3%
- Shell 1.8%
- CSS 1.6%
- Python 1.2%
- Other 0.2%
Follow-ups to the waiting queue, found by review on real binaries. - A target, source or undo place on a disk that stops answering gets a deadline-bound first look and the answer target_unresponsive; the event loop, status and other folders keep working (mounts.rs). - Nothing is written below a disk that was unmounted: accept, undo and folder moves refuse with a way out that is only for a disk gone for good. - One unreadable subfolder blinds only itself; the inotify limit, also when reached after start, is told and no folder stays unseen. - A kept answer stays kept after crash recovery (compared by order, not by the second). - Temp copies a kill left behind are removed at start, only when recorded and still exactly ours; a recovery row for a renamed folder closes. - An inbox below a dot folder is seen live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| assets/voice | ||
| crates | ||
| docs | ||
| packaging | ||
| phase0 | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
| uninstall.sh | ||
Clingi for Linux
Your folders, understood. Clingi turns the places where files pile up — Downloads, scan inboxes, Screenshots — into self-organizing, searchable archives: new files are read, deduplicated, and routed to where they belong — and, when you ask for it, renamed by your naming scheme. All of it on your own machine.
Status: pre-alpha, under heavy development. The daemon watches income folders, indexes and deduplicates files, extracts text (PDF incl. OCR, Office formats, images; German and English), answers hybrid keyword+semantic search, and proposes routings: deterministic user-defined rules first, a local Qwen3 model (with an optional owner profile, never sent anywhere) second. Screenshots, scans, and other images are routed by a local vision model (Qwen3-VL) that reads the pixels — payslip scans, terminal screenshots, and design assets land where they belong, and each suggestion says what the model saw. clingi accept performs the move — journaled, hash-verified, undoable with clingi undo, never overwriting anything. File names stay as they are unless you ask for new ones (see Naming). Clingi learns from your confirmations: three accepted model routings with the same pattern become a rule proposal (clingi rules), and accepted rules route deterministically from then on (stored in your own editable rules.toml). Per-folder auto mode must be earned (enough confirmations plus calibrated model precision), needs the 14B model (with the 8B, Clingi only suggests), and is only ever enabled by you; auto-moves are journaled and undoable like any other, and never feed the calibration statistics. A Tauri GUI (cargo run --bin clingi-gui) covers the whole loop — review queue, search, history with undo, the rename task, folder modes and learned rules — in German and English, following your system locale.
Promises
- Local-first. Extraction, embeddings, search, and classification run on-device (llama.cpp). Cloud escalation is strictly opt-in, per-folder "never cloud" is honored absolutely.
- Never deletes. Every future move/rename is journaled and undoable. Suggest mode comes before auto mode, and autonomy is earned per folder.
- Plain files. Your tree stays an ordinary folder tree; the index is disposable and rebuildable; uninstalling leaves no trace in your files.
- Free and open source. Omarchy/Arch first, other distros to follow.
Install (Arch Linux, Omarchy)
git clone https://git.flamingbattenberg.de/fubledde/clingi-omarchy.git
cd clingi-omarchy
./install.sh # or ./install.sh --dry-run to see the plan first
The guided installer (German or English, following your locale) shows its plan before changing anything, installs the missing packages from the official repositories with pacman (Rust, llama.cpp, poppler, tesseract with German and English data, WebKitGTK, the Vulkan backend when your GPU has a driver, and whisper.cpp for optional speech input), builds Clingi as the pacman package clingi-git, then walks you through the setup (a window on a desktop, clingi init in a terminal) and clingi models fetch, and finally asks whether to start the daemon. In the setup window you can speak your answers about yourself instead of typing them: recognized locally by whisper.cpp, the microphone on only while its button is active, audio never stored or sent anywhere. It never touches your files, never installs graphics drivers, and never runs a partial system upgrade. Running it again upgrades in place. Clingi uses llama.cpp directly — no Ollama needed.
If the local models are missing when you open the app, it says how much is missing and offers the download itself: choose the 14B model (graphics card with ~12 GB) or the 8B model (any computer, slower, suggestions only), watch the progress, cancel any time (it continues where it stopped), then restart Clingi with one click. Downloads are verified like clingi models fetch, and two downloads never run at once.
Afterwards Clingi is a normal desktop app: it appears in your app launcher (on Omarchy: Super+Space, search "Clingi"), and no terminal has to stay open. The setup's last step offers to start Clingi's background service now and at every login; if the service is not running when you open the app, its "Start Clingi" button starts it for you. Opening Clingi again while it is open switches to the existing window instead of opening a second one (focused where your compositor allows it).
Uninstall or start over
Your own files are never touched, whichever way you leave. Files Clingi already moved stay where they are, and so do the folders it created. The undo history lives in Clingi's index, so if you want moves undone, undo them in the History tab first.
From the checkout (German or English, following your locale; add --dry-run to see the plan first):
./uninstall.sh # asks which of the three below (default: start over)
./uninstall.sh --reset # start over, keep the installed app and the models
./uninstall.sh --reinstall # start over and run ./install.sh again
./uninstall.sh --remove # remove Clingi, including the models
- Remove (
--remove) closes the app, stops the daemon and turns off its start at login. It then runsclingi uninstall, which lists what it removes and waits for you to typeyes: the index and the models (about 15 GB). It asks whether to remove your settings, profile and folder structure too, and finally whether to remove the package (sudo pacman -Rns clingi-git, which also removes the packages the installer pulled in). - Start over (
--reset) closes the app and stops the daemon. It moves your settings, profile, rules, folder structure, index and the app's window data into a backup folder,~/.local/state/clingi/reset-<date>/. Nothing is deleted, and the models stay, so nothing is downloaded again. Afterwards, open the setup from your launcher or withclingi-gui --setup. Delete the backup folder when you no longer need it. - Reinstall (
--reinstall) does the same as start over, then runs./install.sh: a fresh build of the checkout's last commit and the setup window, as on a new machine.--skip-testsand--no-modelsare passed on to the installer.
Without the checkout, the same by hand: systemctl --user disable --now clingid; clingi uninstall [--purge]; sudo pacman -Rns clingi-git. --purge also removes the settings and the profile.
Build from source (any distribution)
Requirements: Rust and the ALSA library, and for full functionality llama-server from llama.cpp, pdftotext (poppler), tesseract with German and English language data; optionally whisper-server from whisper.cpp for speech input (clingi models fetch --only voice gets its model) and llama-tts from llama.cpp for the experimental read-aloud (clingi models fetch --only speech; run from the checkout, a debug build finds the voice in assets/voice/, a release build in /usr/share/clingi/voice/ or $CLINGI_VOICE_DIR).
cargo build --release --workspace
# 1. Guided setup (German or English, follows your locale) — Clingi never
# guesses what to watch; every folder is confirmed by you:
./target/release/clingi init
# 2. Fetch the local models for your hardware tier (verified downloads):
./target/release/clingi models fetch
# 3. Run the daemon, then search and review suggestions:
./target/release/clingid
./target/release/clingi status
./target/release/clingi find mietwagen irland
./target/release/clingi suggestions
./target/release/clingi accept 3 # moves the file (undo: clingi undo)
./target/release/clingi rename '#4' ~/Dokumente/scan_0001.pdf # propose names, confirm, apply
./target/release/clingi rules # learned-rule proposals
./target/release/clingi journal
Without [[target]] folders in the config, nothing is ever suggested or moved — the daemon only indexes and searches. Without the embedding model, search falls back to keyword-only. Queries work across languages: a German query finds English documents and vice versa. Leaving is as clean as arriving: clingi uninstall removes Clingi's own data (index, models including the speech models — config and profile only with --purge) and never touches your files; the voice clips go with the package (pacman -Rns clingi-git).
Memory. The models stay in memory only while Clingi works. After five minutes without work the daemon unloads them: the routing model, the vision model and the search model. They load again on the next need. The next file waits for the load (seconds on a GPU, about half a minute on a CPU), and the first search waits about a second. Set the time in config.toml with idle_unload_secs (default 300, minimum 60; 0 keeps the models loaded). If a reload fails, Clingi tries again later, and files wait in the queue meanwhile. A model that came up on the GPU is never reloaded on the CPU behind your back: if another program holds the video memory, files wait until it is free. clingi status shows whether the models are loaded, resting, waiting for GPU memory, or retrying.
Inbox and search
Inbox. Each suggestion's detail shows a small preview of the file: the first page of a PDF, the image itself, or one frame of a video (when ffmpeg is installed; it's an optional dependency). Word, Excel and other files get no preview. "Open" (key O) opens the file with its usual app, and "Show in folder" opens your file manager there. Previews are made on your computer, kept only in memory, and only for files in your configured folders.
Whole folders. An unpacked program, mod or project folder is one inbox entry, not hundreds of files, and it moves as one, inner structure intact. It never moves on its own, also in auto mode. A folder that changed after the move can still be undone: Clingi says what changed (in the app a question with Cancel first, in a terminal clingi undo prints it and clingi undo --changed goes) and on your yes moves it all back, changes included. Moving to another drive copies and checks everything before anything is removed from the old place, and a long copy shows its progress and offers Undo when it ends. If a copy could not bring along owners or access lists, it asks first (--allow-losses in a terminal); other details it could not carry are named afterwards. "Not a program folder" and other answers about a folder are listed under Folders & rules, with Take back (clingi reopen), and they stay with the folder when you rename it. If a move was interrupted and something could not be finished safely, it shows under "Needs a look" in Folders & rules (clingi folders), saying what is where. Clingi removes nothing there on its own.
Search. Ask the way you'd ask a person: "Wo ist der Gutschein für den Mietwagen in Irland?", "Steuerbescheid 2023", "screenshots from last year". Filler words are ignored, files holding more of what you asked rank higher (a rare word counts more than a common one), and German spellings are matched with or without umlauts ("Kuendigung" finds "Kündigung"), endings included ("Gebühren" finds "Gebuehren_2024.pdf"). File names are searchable too, including words inside them ("Rechnung" finds "Stromrechnung_2024.pdf", below files with the whole word). A word in quotes is matched exactly. If nothing is close, Clingi says so instead of showing the nearest files. clingi find shows how Clingi understood the question ("verstanden als: Jahr: 2023 · Typ: Steuerbescheid") and, for every hit, where the file came from: the inbox and date it arrived, when Clingi moved it, its original name, and the website it was downloaded from when your browser recorded that. Understanding the question needs no AI model; only the meaning-based part of search uses the small search model.
The search screen. Ctrl+K, Ctrl+F or / go to the search field from anywhere in the app; results come as you type. Every row shows the file's name, where it is now, its date and kind, a passage with the words found marked, and why it is a result ("enthält das Wort „Rechnung“", "ähnlich in der Bedeutung", "aus 2023" for the file's own date, "passt zu 2030" for one its text only mentions), only as far as Clingi really knows. Above the rows, what Clingi understood stands as chips ("Jahr: 2023"): "Nur diese" makes one a filter, × stops reading the question that way, and the "Nicht verwendet" row brings it back. A filter stays until you take it off or clear the search. "Keine Datei im Index passt" means what it says, with a way on: remove the filter, try other words, check the folders. If the search model is not running, the screen says that only keywords were searched and why, and while Clingi still reads your files it says so too. The microphone in the field (when speech recognition is set up) listens only until you press it again or leave the window, stays on this computer, and puts your question in the field. Details on a row show the file's preview and everything known about where it came from, with Open and Show in folder. Arrow keys move through the results, Enter opens, Space shows details, X selects for renaming, Esc closes the details and then clears. Search itself never moves, renames or deletes anything.
First run and folder structure
After a fresh setup, Clingi first reads your inbox folders: text, scans, images. The inbox shows the progress, and search works right away. Then it proposes a folder structure for all your target folders at once, based on the files it found: folders with a one-line description each, with year folders where they make sense (e.g. Privat/Steuern/2024, at most three levels). You edit it, then choose "Übernehmen und sortieren" / "Apply and sort", or "Ohne Ordnung starten" / "Start without a structure". Sorting starts only then, so nothing is sorted twice. In a terminal: clingi structure first or clingi structure skip.
Planned folders are created only when the first file moves into one. You can change the structure any time under Folders & rules. When it changes, the inbox offers to work out the affected suggestions again, with a time estimate based on your computer's measured speed ("340 suggestions, about 25 min"). It runs in the background only when you click, and you can cancel it (clingi reroute in a terminal). Re-sorted suggestions never move files on their own.
Naming
By default Clingi keeps every file's name and only sorts ("Namen behalten" in the setup). That also saves the second model call per file.
Renaming on purpose. Select files in the app (suggestions in the inbox, hits in search, filed files in the history) and choose "Propose new names", or run clingi rename with suggestion numbers ('#12') and file paths. Clingi asks the local model for names in one batch and shows old → new for each file, with "Why this name": every part of the name and where it was found. Each proposal is ticked and editable; nothing changes until you apply. Then:
- a pending suggestion gets the new name and is filed under it when you accept it (for Clingi's learning, that counts like correcting the name yourself);
- a filed file is renamed in its folder: hash-checked, journaled, undoable from the history or with
clingi undo, never overwriting anything (a taken name becomes "Name (2)"). To undo the filing of a renamed file, undo the rename first.
The extension always stays. A name that is already descriptive and dated stays, and a suggestion Clingi is unsure about gets no name proposal. Images are named by the vision model only when it is already loaded; the text model loads for the task if it is resting. If a file system has no hard links (FAT, some network shares), the rename uses an atomic no-replace rename instead and is settled at the next start if the computer stops halfway.
Renaming while sorting. Choose a naming scheme in the setup, or set naming_template (e.g. "{jahr}-{monat}_{aussteller}_{dokumenttyp}") in config.toml. Every suggestion then carries a composed name. Targets can have their own scheme in structure.toml; the rename task uses the same schemes.
Voice
Both directions run on your computer only. Nothing you say or hear is stored or sent anywhere.
Speaking to Clingi. In the setup's "About you" step and in the correction dialog you can talk instead of typing. whisper.cpp (whisper-server, optional package whisper-cpp) recognizes your speech locally. The microphone is on only while its button is active, and the audio stays in memory. Models: clingi models fetch --only voice (large-v3-turbo on a GPU, small on CPU-only machines, plus voice-activity detection).
Clingi speaking to you (experimental, off by default). Spoken read-back is not part of the default product: it costs too much memory and power for an ordinary machine, so the correction dialog answers in text and the installer does not offer the speech models. If you fetch them by hand (clingi models fetch --only speech, up to ~3.5 GB, never part of a plain fetch), the setup guide reads its steps aloud with llama-tts from llama.cpp, in one synthetic voice designed for Clingi (provenance in assets/voice/README.md); nothing else speaks. The text never lands in a file or on a command line, and no audio is kept. Credits: Qwen3-TTS by Qwen (Apache-2.0; GGUF by ggml-org), Kyutai Pocket TTS by Kyutai (CC-BY-4.0; GGUF conversion by EryriLabs); the app lists them under Folders & rules → About Clingi while the speech models are installed.
Architecture
One Rust daemon (clingid) owns watching, extraction, dedup, indexing, and search over a single SQLite database (FTS5 + sqlite-vec). The CLI (clingi) and the Tauri GUI (clingi-gui) are thin clients over a local unix socket. Decisions and their rationale live in docs/DECISIONS.md.
Development is agent-built and human-gated: Claude agents implement and review in small tested units; the roadmap's gates are approved by a human. See CLAUDE.md.