It was only two weeks ago that I felt like I’m on the bleeding edge of technology after realizing I’ve been ignoring fish shell and decided to give it a go.
The pile of comments mentioning Nushell left me no choice, so today we’re checking it out, and trying to see whether it’s worth the switch, and for whom.
Ever felt frustrated parsing JSON or CSV files in your terminal? I know I did.
The traditional Unix shell treats everything as text streams, making it surprisingly hard to work with modern data formats. So everybody just uses JQ, YQ and other parsers to bridge the gap and that’s the standard. It’s one of these “must have” libraries everyone holds in their dotfiles recipe.
With its 32,000 stars on GitHub, Nushell’s approach is different:
“Rather than thinking of files and data as raw streams of text, Nu looks at each input as something with structure.”
- Nushell docs
This fundamental shift in approach is what makes Nushell fascinating. It treats command outputs as structured data tables instead of raw text. This means you can query your filesystem like a database, parse JSON with native commands, and even interact with SQLite (!!) databases directly from your shell.
The practical benefits become even more clear when get your hands dirty with it:
- Structured Data Handling: Instead of piping text between grep and awk, Nushell lets you query data using intuitive commands like
where
, sort-by
, and select
. A simple example would be running ls | sort-by modified
to instantly sort files by modification date.
- Built-in Type System: The shell understands data types out of the box. No more guessing if a variable contains a number or a string. This prevents countless scripting errors before they happen. If you ever tried input validation with bash you should be excited now 😅
-
Modern Developer Experience:
- Native JSON/YAML parsing
- Supported by modern prompts like starship, and tools like Zoxide
- HTTP requests built into the shell (which you can query directly ❤️🔥)
- SQL database browsing
- Powerful completions via Carapace:
After realizing Nu isn’t supported by major tools like Kubernete’s kubectl and AWS CLI, I made my mind to go back to ZSH feeling defeated.
Being a cross-shell Cobra completion library, Carapace not only made me change my mind (again) with Nushell, but actually took terminal completions to the next level! It magically restored every missing completion I needed and upgraded it in one shot.
Ready to try it out? Here’s a quick start:
- Install Nushell using your package manager (yea yea, I use Nix)
- Add Starship prompt for familiar territory
- Install Carapace for excellent completions
- Configure
XDG_CONFIG_HOME
paths in the default config.nu
to make sure the right configuration file is loaded (you can find my config for reference here)
The learning curve exists, but the productivity gains make it worthwhile.
For me, the ability to query JSON APIs directly in the shell and get structured output has been transformative not only for daily DevOps tasks, but also for side projects and standard terminal use.
Is Nushell perfect? No. You’ll hit some compatibility bumps, and certain muscle memory from zsh will need rewiring (no more export key=val
it’s now $env.key = val)
.
But if you work with structured data regularly, the benefits far outweigh the initial adjustment period.
For now, Nushell stays with me. I’ll report back in a few months with updates :)
Whenever you’re ready, here’s how I can help you:
|
|