this post was submitted on 21 Sep 2024
326 points (99.1% liked)

Open Source

30416 readers
421 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

Can't imagine using my system without this.

top 43 comments
sorted by: hot top controversial new old
[–] cakeistheanswer@lemmy.dbzer0.com 16 points 1 day ago (1 children)

I binned my copies of ranger and nnn when I found this last year. Its stellar.

Diskonaut is the only other one that stuck, of the new CLI file managers. hunting lost files from a recovered hard drive was a lot easier with directory visualization for whatever reason.

[–] mac@lemm.ee 6 points 1 day ago (3 children)

What are your primary use cases for Yazi? I'm trying to see if it'll fit into my workflow.

I've been experimenting with it on my MacBook Pro. When I navigate to a few Go projects I'm working on, syntax highlighting only seems to be available in the file preview. After that, it appears to just open in plain Vi.

At work, I use Windows and primarily code in C#.

Is Yazi more geared towards file management?

[–] sudo@programming.dev 4 points 12 hours ago

Most frequently I use it as an interactive cd. Docs on how

Saves me a whole lot of ls and cd or tabbing through completions.

[–] _hovi_@lemmy.world 1 points 13 hours ago

I mainly use it inside neovim actually, in place of the built in file manager or a file tree. Also use it if I want to quickly see the image files in a directory (it shows the images in the terminal), or rename a bunch of files. And then rarely for other file related activities as it makes exploring a directory very smooth

[–] cakeistheanswer@lemmy.dbzer0.com 6 points 1 day ago* (last edited 1 day ago)

It hooks into nearly every base utility I can't live without (fzf, jq, helix, ripgrep). If you're on windows im not sure you're going to get a ton unless you live in WSL.

You can pick the editor it'll open by default, which should be configurable with comparable syntax highlighting. Vi can pretty much look like whatever. I think it'll default to vscode on windows.

Im not sure what you'd use it for but manage files, but I would have poked it and probably moved along while I was still on windows.

Edit: the other benefit you might not see has a lot to do with support of mime types.

https://www.iana.org/assignments/media-types/media-types.xhtml

The xdg open protocol will open whatever app is assigned to handle type locally. Which is probably why it defaults to editor.

[–] OhYeah@lemmy.dbzer0.com 24 points 1 day ago (2 children)

As a current user of ranger could this be a full replacement?

[–] sudo@programming.dev 3 points 12 hours ago

Switched from ranger to yazi months ago. There's some UI choices that I miss but the configuration via toml and lua plugins is way better than rangers.

I would like to find a git modeline plugin. Its wild to me that they have a zoxide integrated and keybound by default but no git integration.

[–] Eyck_of_denesle@lemmy.zip 23 points 1 day ago* (last edited 1 day ago) (1 children)

Yes. I switched to yazi from ranger. File previews is so much better. Image previews dont hog up ram or crash your manager. It has everything and more like opening encrypted archives, plugin support, themes. I use 2 plugins, one to compress files and the other to display present directory size.

It's not just the features but the app itself is magnificent. I have never seen such a goid looking tui app.

[–] eager_eagle@lemmy.world 5 points 1 day ago

Same, ranger was painfully slow at times. For some reason it would take multiple seconds to start on a few machines I connected it to.

[–] asap@lemmy.world 25 points 1 day ago* (last edited 1 day ago) (8 children)

As someone new to Linux, what would be a few reasons that you prefer this to using the built-in GUI file browser?

[–] _hovi_@lemmy.world 2 points 13 hours ago

Other people have given great reasons, but I will also mention that as someone who lives inside the terminal it's often faster and easier to open it right there rather than getting a GUI one going. I do still use one for things that are easier to do with a graphical file manager though, no problem having both

[–] eager_eagle@lemmy.world 35 points 1 day ago (3 children)

I can't believe no one mentioned this, but: remote access.

I spend most of my day connected to machines via SSH and yazi offers a great UX with file previews and all. Using kitty I even get image previews in the terminal.

[–] Amaterasu@lemmy.world 1 points 15 hours ago (1 children)

Well, do you prefer kitty or yazi?

[–] ManTaboo@lemmy.ml 5 points 14 hours ago (1 children)

They are two different things. Yazi is a file manager and Kitty is a terminal emulator.

[–] Amaterasu@lemmy.world 1 points 6 hours ago

Ok, Dolphin would be the comparative here from KDE Qt but, since is made for GTK probably Nautilus is the one to be compared.

[–] rcbrk@lemmy.ml 4 points 1 day ago (1 children)

remote access

To be fair, X11 forwarding is a straightforward thing, bearing in mind any security/performance/administrative restrictions which may apply to your situation.

Alternatively, SSHFS can be used to mount a remote directory locally.

[–] eager_eagle@lemmy.world 5 points 1 day ago* (last edited 1 day ago) (1 children)

I've used plenty of sshfs a few years ago, but x11 forwarding is a compromise. The latency makes it painful to work with for more than a few minutes.

[–] rcbrk@lemmy.ml 3 points 23 hours ago

Yeah, X11 forwarding is only fine on a campus wide network, maybe city-wide at most, if the wan is fast enough.

Sshfs would also be painful for operations processing a lot of data (grepping gigs of log files or even creating thumbnails of images to browse).

[–] WalnutLum@lemmy.ml 2 points 1 day ago (1 children)

Do image previews work over SSH? I admit I've never actually tried it...

[–] Eyck_of_denesle@lemmy.zip 29 points 1 day ago

I can navigate without using my mouse. It's faster for me. You can create tabs, copy and paste files, extract compressed files, run commands, and so much more without lofting my hand. My favorite feature is the ability to preview files without even opening them. I'm relatively new to linux too.

[–] sloppy_diffuser@sh.itjust.works 9 points 1 day ago* (last edited 23 hours ago)

Download 5 seasons of some show from multiple sources or some artist's entire discography, and want to normalize all the file names? It is way easier in the terminal.

I'll check this out, but I use https://github.com/stevearc/oil.nvim for such tasks as I have nvim's full suite of editor commands to rename all the files way faster than I could in a GUI. I'm sure there are GUI apps to perform a similar task, but I already know how to use nvim.

[–] WalnutLum@lemmy.ml 2 points 1 day ago

I wouldn't bother unless you find yourself doing more through the terminal than through GUIs.

I don't have a built-in file browser (not using a DE, just i3 window manager), so I use ranger and pure GNU coreutils commands mostly but I still find myself missing the drag-and-drop features that FreeDesktop integration provides for stuff like nautilus.

[–] Chewy7324@discuss.tchncs.de 8 points 1 day ago* (last edited 1 day ago)
  • Terminal file manager are useful on a server over ssh.
  • ripgrep and fd support is better than any GUI file manager find and replace.
  • Some people like using vim keybindings
  • The three panel view is really useful. On the left is the parent folder, the middle the current and on the right a preview, e.g. the selected folder or the contents of a picture or a text file. It's faster to navigate and pop back into the shell.
[–] joeldebruijn@lemmy.ml 1 points 23 hours ago

I'm fairly new to Linux also, Debian with Gnome.

I need CLI filemanager when doing something outside home directory etc.

For example fix a desktop shortcut and you can't start Nautilus "as an administrator " afaik. Or it won't ask for root password.

[–] ninjaturtle@lemmy.today 7 points 1 day ago

You can probably do some more advance tasks via CLI. Also usually lists information faster. But honestly you will be overall fine with GUI a majority of the time.

Some people just like being in the terminal.

[–] WhyJiffie@sh.itjust.works 7 points 1 day ago (3 children)

it gained 14k+ stars on github in a year (development started in 2023 july).

isn't it a bit suspicious?

maybe it's nothing, but this just caught my eye

[–] _hovi_@lemmy.world 4 points 13 hours ago

That's because it works very well, and the main developer is super active (I've contributed and made some plugins so have interacted with them a fair bit)

[–] toastal@lemmy.ml 12 points 1 day ago* (last edited 1 day ago)

Starhacking is a thing. When you see words like “blazing fast” & emoji all over the README it show the maker is treating the code as marketing—& MS GitHub is a social media platform with algorithms.

[–] Eyck_of_denesle@lemmy.zip 1 points 15 hours ago

Like the other comment said yes and it lives up to it's sparkly promises. You should check zen browsers stars, it got the same amount in like a month or two.

[–] padlock4995@lemmy.ml 6 points 1 day ago (2 children)

Am I being dense..... How or where are install instructions for Debian based distros?

[–] JustAnotherKay@lemmy.world 2 points 12 hours ago

Admittedly I haven't looked into too many rust applications but IME they generally don't have a deb/rpm/binary or whatever. I've always had to cargo them in - it's a relatively painless process. My understanding is that, in a similar fashion to python, you have to have the same dependencies on the source and target machine and cargo handles that in rusts case

[–] lobut@lemmy.ca 5 points 1 day ago

Think you may need to build it from cargo/rust

https://www.linuxlinks.com/yazi-terminal-file-manager/

This is kinda funny because I've installed it on Mint and Pop OS and I completely forgot how.

[–] filister@lemmy.world 4 points 1 day ago

Looks very sleek

[–] American_Jesus@lemm.ee 2 points 1 day ago

Tested remotely on termux and looks good on small screen

[–] thingsiplay@beehaw.org 3 points 1 day ago (1 children)

I've installed it for a while and lot of stuff work out of the box, including images in the terminal. But I did not get around to use it more often. It's pretty good and I think its a full replacement for the usual terminal file managers, but don't take my word for it. I previously used vifm a little bit and have no other experience.

[–] Eyck_of_denesle@lemmy.zip 2 points 1 day ago (1 children)

I used ranger and it's a solid improvement over it. If you are into tui apps you will love it, if you aren't it's ok. It also has plugin system, I use 2 plugins to compress files and get file size info. I love it.

[–] thingsiplay@beehaw.org 3 points 1 day ago (1 children)

I often use it to navigate into a directory, using it as a directory selector (auto cd on exit). An essential plugin to me is https://github.com/yazi-rs/plugins/tree/main/jump-to-char.yazi , to have a Vim like quick jump with f and a letter and n for next. The default f functionality to filter is now set to F, so I don't lose that by overriding.

Still need to handle archives too. I also want to write my own plugins someday if I get to use it more often.

[–] Eyck_of_denesle@lemmy.zip 2 points 1 day ago (1 children)

It does handles all types of archives by default. Encrypted ones too.

How do you auto cd, I always wanted that but didn't brother to check docs for it. If I remember correctly it's by launching it as a shell script.

[–] thingsiplay@beehaw.org 3 points 1 day ago* (last edited 14 hours ago) (1 children)

Yes, it's a simple shell function; needs to be a function in your bashrc, not a script, because cd doesn't work like that. Just copy the function from https://yazi-rs.github.io/docs/quick-start#shell-wrapper into your .bashrc:

EDIT: I forgot that Beehaw will replace the ampersand character to &. So instead copying my code you should copy it from the link above.

yy() {
    local tmp
    local cwd
    tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
    yazi "${@}" --cwd-file="${tmp}"
    if cwd="$(cat -- "${tmp}")" && [ -n "${cwd}" ] && [ "${cwd}" != "${PWD}" ]; then
        builtin cd -- "${cwd}" || return
    fi
    rm -f -- "${tmp}"
}

I use yy instead single y.

[–] Eyck_of_denesle@lemmy.zip 2 points 15 hours ago (1 children)

Thank you so much for taking the time to post it. I will add this asap.

[–] thingsiplay@beehaw.org 2 points 14 hours ago* (last edited 14 hours ago)

I forgot that Beehaw will replace the ampersand character to &. So instead copying my code you should copy it from the link above.

[–] Canadian_Cabinet@lemmy.ca 3 points 1 day ago* (last edited 1 day ago)

Looks pretty neat. I've used MC for a while but I might have to try this out