Explain fish code
Paste a fish config or script and Vibe explains what each line does: set -gx, fish_add_path, abbreviations, functions and where fish differs from bash.
Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.
Vibe21 lines selected
Press Explain it for the sample, or paste your own code first.
What this fish sample shows
- variables
- fish sets variables with
set, notNAME=value.-gmakes one global and-xexports it to the programs fish starts, soset -gx EDITOR nanogaveEDITOR=nano.set -g fish_greetingwith no value empties the greeting, so a new terminal opens without one. - PATH
fish_add_path ~/binputs ~/bin first on the PATH and leaves it alone if it's already there: after running it again and re-reading the file, ~/bin was still listed once.command -v hellothen found thehelloscript in ~/bin.- abbreviations and aliases
- An abbreviation is expanded on the command line as you type, so the full
git status --shortlands in your history.aliasin fish writes a small function:type llshowedfunction ll --wraps='ls -lah'. fish already ships anllof its own,ls -lh, and the alias replaces it. - functions and status
function ... enddefines a command, and$argvholds its arguments, starting at 1:mkcd a/bmade both folders and moved into them.; andruns the next command only if the one before it worked.if status is-interactivekeeps the shortcuts to terminals you type into; the rest of the file runs for every fish, so afish -cscript still hadEDITORandmkcd.
Good to know
- Run with fish 4.8.1 on a test home folder, so nothing touched a real config.
- Some bash habits work in fish 4.8.1:
export FOO=bar,$(echo hi)andtrue && echo okall ran. A bashif [ 1 = 1 ]; then echo yes; fididn't: fish stopped withMissing end to balance this if statement, because fish ends anifwithend. - fish doesn't split variables on spaces: with
set f "my file.txt",count $fprinted 1. Lists start at 1, and$l[-1]is the last item.
Watch out: Abbreviations exist only while you type. In a fish script, abbr --add gs git status --short followed by gs didn't run git: it ran the real gs command, which on the test machine was GPL Ghostscript 10.07.1. Write the full command, or a function, in scripts.
Explain fish code beside your editor
Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).
Install on Mac
curl -fsSL https://unvibe.site/install.sh | bashPaste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.
Or download the .dmg · Intel Mac build · SHA-256 checksums
Opening the .dmg the first time
- Open the .dmg and drag Unvibe to Applications.
- Open it once; macOS says it can't verify it. Click Done.

Real screen, macOS 15 - System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.

Real screen, macOS 15
The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open