frecency/recency/bookmark — Smart frequency‑based recorder that makes fzf remember your habits
- Dominant language
- Go
- Stars
- 83k
- Forks
- 2.9k
- Avg merge
- 17h 8m
- Merged PRs (30d)
- 10
Description
A **fzf + SQLite** powered navigation helper that uses frecency (frequency + recency) to rank files, directories, commands, and more. Add bookmarks/aliases to keep your most important items always within reach.
#### ✨ Why frecency?
You `cd` to the same directories, open the same files, and run the same long commands every day, yet your shell’s history is linear and its directory stack is temporary.
**frecency surfaces what really matters**, wrapped in an instant, interactive fzf interface.
#### 🔥 Features
- **Frecency sorting** – Ranks entries by both frequency and recency.
- **Bookmarks / Aliases** – Assign a `keyword` to any entry; it gets permanently pinned to the top and highlighted (score starts at 9999+).
- **Vim‑style modal interface**
- `Normal` mode – `j/k` to move, `d` to delete, `u` to undo, `Ctrl-↑/↓` to adjust score, `/` to enter search.
- `Search` mode – instant filtering; `Esc` returns to Normal.
- **Intelligent preview** –
- Files → syntax highlighting (bat) or text preview
- Directories → colorful listing (eza / ls)
- Commands → type, script snippets, binary info
- **Multiple topics** – `dir`, `file`, `cmd`, or any custom type; each topic has its own database and configuration.
- **Zero‑config startup** – One command to initialize; power users can fine‑tune via `${TOPIC}.config` (max entries, cleanup interval, ignore patterns, etc.).
- **Automatic maintenance** – Probabilistic background cleanup keeps the database lean without manual intervention.
#### ❓ **A few thoughts / questions:**
- Just sharing my own personal script. If you have better algorithms, suggestions and pointers are very welcome!
- Bookmarks, access frequency, and recency are extremely important metrics for lists — especially for directories and files. fzf could perhaps consider incorporating such an algorithm natively. The current approach works, but it doesn’t feel ideal. In practice, bookmarks turned out to be the most stable and reliable: if something matters, give it a bookmark; if it stops being important, just remove it…
- I originally thought that fetching only the data you need from SQLite would be a solid approach, but the experience is surprisingly poor even when the dataset isn’t that large.
#### 📝 **Code** :arrow_down_small:
[frecency.sh](https://github.com/user-attachments/files/27191595/frecency.sh)
Contributor guide
No contributing guide indexed for this repository
Research direction
The only implementation named is the attached frecency.sh; start by reading it to understand the proposed frecency, bookmark, SQLite, and fzf behavior. No repository file, test, or concrete acceptance criteria is specified, so completion would require deciding whether and how fzf should adopt it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, sqlite
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100