hn.today

Psychic: Like fzf but learns from your actions

klauria.tech56 points16 comments
Screenshot of Psychic: Like fzf but learns from your actions

Psychic is a terminal file browser designed to make repeated navigation through familiar projects faster. Like fzf, it filters and ranks files as the user types, but it also learns from files opened in Psychic and directories visited through shell integration. The interface previews the selected item; Enter opens files in the user’s editor or changes the search location to a selected directory. Its creator reports that, across 1,450 uses, 29% of searches required no typing, the median time to reach a destination was two seconds, and users selected the top result 80% of the time. These results suggest that accumulated behavior can make common destinations immediately accessible.

Psychic stores searches and selections locally in SQLite and uses a LightGBM ranking model to predict which results fit a query. Features include recent selections, file modification time, filename matches, activity in the same directory, and associations between queries and chosen files. When usage data is sparse, a simpler scoring system carries more weight; the learned model takes over as evidence builds. It retrains on launch in the background, then switches models only when the user is no longer viewing results, avoiding sudden ranking changes. The strict responsiveness goal - updates within a frame - rules out network calls and large language models. Rust, local inference, and avoiding filesystem calls during rendering help keep the interface fast. The project also emphasizes performance benchmarks and exposes usage statistics and model diagnostics.

Read on klauria.tech16 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Solid 2.0

Solid 2.0

Solid 2.0 is now stable, five years after version 1.0, with a smaller API and diagnostics designed for AI agents. Its reactive graph now handles asynchronous computations, while built-in server functions support RPC calls and persistent Server-Sent Events connections. (solidjs.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.