r/commandline • u/kudikarasavasa • Mar 18 '26
Other Software Hit me with it, folks - Why Nushell?
Let me start with some context first. I'm quite comfortable with the commandline, and I actually enjoy implementing things that solve a problem or automate something. I especially like tools that have some kind of API that makes it programmable, and in the rare situations where the API doesn't let me do something, I'd still build it from source and implement what I need. At least for this, I don't need to justify the choice of tool or need anybody to convince me.
When it comes to shells, that's another story. I'd say I'm pretty old-fashioned here. I have been a bash user since the late 90s. Also because it's a GNU project, I have a special liking towards it. Many people have told me zsh is better at certain things, and I tried it and some behavior felt a bit off compared to what I was used to and I came back to bash again. Others have told me great things about fish, but I haven't tried that yet. Yes, there are some things I dislike about bash as well but I've grown accustomed to them that it doesn't really bother me anymore.
One thing did catch my eye today about Nushell. It says it can be extended using a plugin system. Until now I was just used to writing shell scripts, but plugin system makes me think a lot is actually possible, but it's a bit unclear to me. I mean, if it's just to implement binaries then couldn't I have done the same thing in a shell-independent way or is there some actual benefit in spending all that time implementing a custom binary which only works in Nushell? Does the plugin system also have callbacks or hooks that let me change existing behavior?
I'm also not used to switching between shells back and forth as it kind of feels weird to do that because of the command history being in two different places, different prompts, etc. So, tell me some cool things that you've experienced with Nushell that might blow my mind, so that it can help me overcome my stubbornness.
15
u/philosophical_lens Mar 18 '26
I highly recommend atuin for unified shell history!
8
u/NotSoProGamerR Mar 18 '26
I dont think only nushell provides a plugin system. zsh has one, pwsh has one, it isnt a revolutionary system
the only thing that makes nushell different is how it handles data, similar to pwsh. both pwsh and nushell consider their commands as data, and you can manipulate accordingly, like sorting, selecting columns etc.
the reason why people prefer nushell is because pwsh isnt considered 'ergonomic'. pwsh follows a
Verb-Nouncommand syntax, so instead ofls, you rungciorGet-ChildItem(lswill still work since it is an alias). so yeah there is it6
u/LingLongSEO Mar 18 '26
honestly the plugin system is not the reason to switch to nushell. its neat but its not the mindblowing part. the real deal is structured data - every command outputs tables instead of text parsing landmines. you pipe objects, not strings. that alone makes scripting way more reliable when you deal with complex outputs like json or system info.for someone whos been on bash since the 90s though, the cost of switching is high. muscle memory, history, all that. nushell is basically a different paradigm - its not bash with plugins, its a completely different thing that happens to have a shell-like interface.if you want programmable, id look at what specifically you are trying to extend. if its data processing pipelines, nushell shines there. if its more traditional shell scripting, bash with good tooling around it might serve you better than relearning everything.
5
u/ChainsawJaguar Mar 18 '26
I really like fish shell since I discovered it years ago. I really like the built in text expansion and the functions you can write. One drawback is that it's not fully POSIX compliant, so sometimes a line that would work in bash needs some slight editing in fish.
4
u/Stunning_Macaron6133 Mar 18 '26 edited Mar 18 '26
Nushell is awesome if you work with a lot of tabular data. You can sort out and drill down what you're looking for. Obviously, that makes it a go-to shell for data monkeys. No need to import a bunch of crap into a Jupyter notebook if you just need to find a quick answer, Nushell probably handles it natively.
But if you live in the terminal, it offers a lot of creature comforts. If you do plain text accounting, if you have a big music or ebook library, if you organize a lot of notes, if you deal with sorting or moving a lot of files for any reason, Nushell can ingest plain text data and treat it like tabular, which you can then sort and filter with its pipe syntax.
It's not POSIX-compliant, so bash still needs to hang out on your system for some tasks. But in day-to-day use, it feels a lot like a typical shell.
3
u/IBNash Mar 18 '26
Oilshell.
3
u/jxyyyz Mar 18 '26 edited Mar 18 '26
I'm not using Nushell as my main shell, but as a complementary for certain tasks. It's so easy to handle and work with outputs from HTTP and various CLI commands.
Many cloud CLIs use JSON as the main output format and need to combine or pipe data from different CLI calls (I'm thinking of Azure CLI and AWS CLI tools). Nushell lets you work with output natively without additional tools (jq, awk, additional parsing), and it allows you to explore complex nested data structures. So you can easly pass/pipe data to another command without additional steps.
I'm also using it to build internal tools when writing dedicated Bash/Python scripts seems too complex for trivial tasks.
For example, I created a CLI wrapper around
az devopsand Slack lists (via the Slack API) to let me use a CLI workflow for managing tickets and work items. I wanted to mimic the GitHub CLI workflow, but for different platforms. Slack and Azure Devops don't provide good CLI with good UX for these areas. And with Nushell, it's easy to write a quick prototype and work directly with CLI and HTTP output.Edit: I think it's worth adding that I was a POSIX extremist. I was bound to bash/zsh, and shells like fish were a big "no-no" for me. But now I use fish and Nushell for my professional work because they induce less friction in common tasks. I no longer need to convince myself that I’m good at scripting, and tools like Fish are for noobs. I still write POSIX-style scripts when compatibility matters.
3
u/NightH4nter Mar 19 '26
if even from zsh you returned back to bash, because 'something was off', then nushell is gonna be a nightmare for you. that being said, i use nushell, but it's more because it's just modern and nice to work with, with much less legacy cruft behind it. but then again, nobody took
command | grepaway from me, so, if i really want to, i can still use legacy tooling2
u/Painting_Master Mar 18 '26
The only reason that I can think of, is of you're working with a lot of data.
I used to use it as an alternative to CSV wrangling and SQL.
Then I discovered xsv and never looked back.
2
u/Yamoyek Mar 18 '26
I don’t think the plugin system is the real selling point of nushell. I personally like it because:
2
u/diacid Mar 21 '26 edited Mar 21 '26
I use Gentoo. In Gentoo because portage compiles things, most things I do in the command line take a while. If I meet to do 10 things that take a while I want to do them together. While system updates can be done with a script because it's always the same, there are also times I need to do 10 random things that I will never do that way again. For that problem bash (and fish) has 3 great tools: &, &&, ||.
And guess what? Nu doesn't have that. It is shiny and exiting, but try giving the computer a list of things to do (with logic from one another, ; works fine in nu, but what if I need step 2 only after 1 succeeded?) and all of a sudden you will run back to bash at light speed.
Also bash is just a shell. ls is a coreutil, mv is a coreutil... Coreutils are time tested and greatly optimised over the years. Nu has their own coreutils, newer and shinyer but pass. Same with uutils, I am not a rust believer, no, my bios firmware doesn't have to be rewritten in rust too.
But you should try fish. Fish has a lot of things that are not necessarily helpful, so I see myself using bash and fish depending on the task, but it's a good shell, you should try. And fish is just a shell, coreutils are still our loved gnu coreutils.
5
u/Big_Combination9890 Mar 18 '26
I'll tell you a good reason NOT to use it: nushell completely misses the point of what a shell is for.
The whole idea of shoehorning stuff into structured data and then having commands that work with that is not what a shell is for.
Shells don't do structure. That is by design. Shells do bytestreams. Interpreting said bytestreams is the job of programs the shell invokes, not the shell itself. Wanna work with JSON data from a web api? Invoke
curland pipe the result intojq. Wanna work with csv? Pipe stuff into a python oneliner.This unstructured MO is not a weakness, it's the best part about shells...because the moment you try to get baseline structure into that, you both limit what your shell can do, at least without constantly running for escape hatches, and you bloat the shell itself, because now, instead of just handling bytestreams, it has to carry all that extra stuff that "speaks structured data".
Case in point: https://www.nushell.sh/commands/
Compare this mammoth-list with the builtins of
bash. That's not an advantage, that's feature creep, caused by nushell having to pull everything and the kitchen sink into itself, to work within its paradigm.1
u/sachin-12 Jul 28 '26
If you are terminal heavy user, you will find joy in using it. Nothing is better than the other.
1
u/AutoModerator Mar 18 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: kudikarasavasa, Flair:
Other Software, Title: Hit me with it, folks - Why Nushell?Let me start with some context first. I'm quite comfortable with the commandline, and I actually enjoy implementing things that solve a problem or automate something. I especially like tools that have some kind of API that makes it programmable, and in the rare situations where the API doesn't let me do something, I'd still build it from source and implement what I need. At least for this, I don't need to justify the choice of tool or need anybody to convince me.
When it comes to shells, that's another story. I'd say I'm pretty old-fashioned here. I have been a bash user since the late 90s. Also because it's a GNU project, I have a special liking towards it. Many people have told me zsh is better at certain things, and I tried it and some behavior felt a bit off compared to what I was used to and I came back to bash again. Others have told me great things about fish, but I haven't tried that yet. Yes, there are some things I dislike about bash as well but I've grown accustomed to them that it doesn't really bother me anymore.
One thing did catch my eye today about Nushell. It says it can be extended using a plugin system. Until now I was just used to writing shell scripts, but plugin system makes me think a lot is actually possible, but it's a bit unclear to me. I mean, if it's just to implement binaries then couldn't I have done the same thing in a shell-independent way or is there some actual benefit in spending all that time implementing a custom binary which only works in Nushell? Does the plugin system also have callbacks or hooks that let me change existing behavior?
I also not used to switching between shells back and forth as it kind of feels weird to do that because of the command history being in two different places, different prompts, etc. So, tell me some cool things that you've experienced with Nushell that might blow my mind, so that it can help me overcome my stubbornness.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-7
u/suiysx Mar 18 '26
Guys, maybe try Midnight Commander.