56 points · by articulatepang · 2w ago · 16 comments
Thanks!
> maybe add some config for static time for tui
I thought about it and decided you're right: there's no reason for that time to update every second. I changed it to only update once a minute. That way, if someone leaves the TUI open for a while, the times will still be accurate, but it won't be needlessly attention-grabby.
Pushed to github and started releases on crates and homebrew.
Yes! For now this is just for files and directories. In principle the same idea can be extended to other things people use fzf for, like selecting processes or containers. But one of the reasons I found this works so well is that we can use filesystem metadata as input to the ML model. LightGBM works great on that kind of numerical/tabular data.
For more general text input, I don't currently have any great ideas for how to make that fast and really good. Transformer models can do prediction on that kind of data, but they're a bit too slow for now.
I'd love to hear suggestions!
Does "50 characters away" mean the paths were 50 characters long?
If yes, the 3% math assumes that, without Psychic, we type every single character. Which I find unrealistic, even ancient shells have features that save typing. Like completion, $CDPATH, aliases, history expansion.
One difference from zoxide is the UI: like fzf, psychic lets you interactively search and preview the files and directories.
The model isn’t really “AI”, it’s old-school ML (gradient boosted trees).
Here's the github repo: https://github.com/kshitijl/psychic.
The basic idea is that (quoting from the article): it's a fast terminal-based file browser. It tracks the directories you go to and remembers which files you open. It trains a lightweight ML model on your data and ranks results using that model. It prioritizes interactivity and speed above all else: results update as you type and the UI renders in under 16ms.
So it shows you a pane of files and dirs, ranked using a model that's specific to you. When you type it updates the results. When you hit enter you go into the dir or open the file.
Edit: ugh, it seems like Cloudflare's security filters blocked some visitors. Sorry about that! I'll try turning off their Browser Security Check. My website is static so I don't really need it.
With files and directories it's like with editor tabs. I don't want MRU, I don't want the most popular one, I don't want the sponsored one. I want exactly what I want.