If you're still using Bash to handle JSON, CSV, or system logs, you might be using a hammer when you need a scalpel. Traditional Unix shells were designed in the 1970s, when data was mostly plain text. But in 2026, data is structured — JSON APIs, CSV exports, database query results, all of them are tables and records.
Nushell is the shell built for this era. It's not another fancy theme or prompt enhancer — it's a paradigm shift: treat data as data, not as text.
What Is Nushell?
Nushell (or nu for short) is a modern shell created by former Facebook engineer Jonathan Turner. Its core idea is simple yet revolutionary:
- Structured output — Every command outputs structured data (tables, lists, records), not plain text
- Type safety — The shell understands data types; strings, integers, dates, and file sizes all have explicit types
- Cross-platform — Native support for Windows, macOS, and Linux, no WSL or Cygwin needed
- Written in Rust — Excellent performance, memory safe, single-binary deployment
As of March 2026, Nushell has reached version 0.111.0, with over 35,000+ GitHub stars, making it one of the fastest-growing shell projects.
Why You Need Nushell
The Pain Points of Traditional Shells
What does handling structured data look like in Bash?
# Extract a specific field from JSON? You need jq
curl -s https://api.example.com/users | jq '.[] | select(.active==true) | .name'
# Calculate the average of a CSV column? You need awk
cat data.csv | awk -F',' 'NR>1 {sum+=$3; count++} END {print sum/count}'
# List files over 100MB and sort? Welcome to pipe hell
ls -lh | awk '$5 ~ /M/ {print $0}' | sort -k5 -h
Every task requires a different tool, and your pipelines become a tangled mess of awk, sed, grep, and jq. Error handling? Type conversion? Good luck.
The Nushell Way
# Same tasks, unified syntax
# JSON API query
http get https://api.example.com/users | where active == true | select name
# CSV data analysis
open data.csv | math avg --columns price
# File filtering and sorting
ls | where size > 100MB | sort-by size
See the difference? Consistent syntax, structured data flow, no external tools needed.
Installing Nushell
Linux (Recommended)
# Use the official installer script
curl --proto '=https' --tlsv1.2 -sSf https://www.nushell.sh/install.sh | sh
# Or use a package manager
# Ubuntu/Debian
cargo install nu
# Arch Linux
yay -S nushell
# Fedora
sudo dnf install nushell
macOS
# Homebrew
brew install nushell
# MacPorts
sudo port install nushell
Windows
# Winget (Windows 10/11)
winget install nushell
# Chocolatey
choco install nushell
# Scoop
scoop install nushell
Verify the Installation
nu --version
# Output: nu 0.111.0
Core Concepts: From Text to Data
1. Tables Are First-Class Citizens
In Nushell, ls no longer outputs lines of text — it returns a table:
ls
# ╭───┬──────────────────┬──────┬────────┬───────────────╮
# │ # │ name │ type │ size │ modified │
# ├───┼──────────────────┼──────┼────────┼───────────────┤
# │ 0 │ docs │ dir │ 4.0KB │ 10 minutes ago│
# │ 1 │ README.md │ file │ 2.3KB │ 2 hours ago │
# │ 2 │ package.json │ file │ 1.1KB │ 1 day ago │
# ╰───┴──────────────────┴──────┴────────┴───────────────┯
This is a real table object that you can:
# Filter
ls | where type == file
# Select columns
ls | select name size
# Sort
ls | sort-by size -r
# Get a specific row
ls | get 0.name
2. The Type System
Nushell understands and respects data types:
# Numeric operations
echo 10 + 5 # 15 (integer)
echo 3.14 * 2 # 6.28 (float)
# String operations
echo "hello" | str length # 5
echo "Hello World" | str downcase # hello world
# Date handling
date now
date now | format date "%Y-%m-%d"
date now - date "2026-01-01" # Shows the difference in days
# File sizes (auto-converted)
echo 1GB / 1MB # 1024
3. Pipes Pass Values, Not Text
This is the most critical difference. In Bash:
# Text stream — every command has to parse text
ls -l | grep ".md" | awk '{print $9}'
In Nushell:
# Structured data stream — type information is preserved
ls | where name =~ ".md" | get name
Real-World Data Pipeline Examples
Example 1: Analyzing GitHub Repository Info
# Fetch repository data and analyze it
http get https://api.github.com/repos/nushell/nushell \
| select stargazers_count forks_count open_issues language \
| flatten
Example 2: Processing CSV Sales Data
Suppose you have a sales.csv:
date,product,amount,region
2026-01-01,Widget A,1500,North
2026-01-02,Widget B,2300,South
2026-01-03,Widget A,1800,North
# Read and analyze
open sales.csv \
| where region == "North" \
| group-by product \
| each { |it|
{
product: $it.product.0,
total: ($it | get amount | math sum),
count: ($it | length)
}
}
Example 3: System Monitoring Dashboard
# Create a system status report
{
hostname: (sys host | get name),
uptime: (sys host | get uptime),
memory: {
total: (sys mem | get total),
free: (sys mem | get free),
percent_used: ((sys mem | get total) - (sys mem | get free)) / (sys mem | get total) * 100
},
disk: (sys disks | select name mount total free |
insert percent_used { |it| (($it.total - $it.free) / $it.total * 100) | math round })
}
Example 4: Batch Renaming Files
# Rename all .jpeg files to .jpg
ls *.jpeg \
| each { |it|
mv $it.name ($it.name | str replace ".jpeg" ".jpg")
}
2026 New Feature Highlights
Nushell 0.110.0 and 0.111.0 brought some major improvements:
1. let in Pipelines
You can now define variables in the middle of a pipeline:
ls
| let total = (length)
| let files = (where type == file | length)
| echo $"Total: ($total), Files: ($files)"
2. Command Group Aliases
Less typing, more productivity:
# Define an alias group
alias gs = git status
alias ga = git add
alias gc = git commit
# Or use command groups
def "git s" [] { git status }
def "git a" [] { git add }
3. Enhanced finally Support
Ensures cleanup code always runs:
try {
open data.json | process
} catch { |err|
echo $"Error: ($err)"
} finally {
echo "Cleanup complete"
}
4. Polars Plugin Integration
Massive performance boost for big data processing:
# Use the Polars plugin to process large CSV files
polars open large_dataset.csv
| polars filter (polars col "amount" > 1000)
| polars group-by "region"
| polars agg (polars col "amount" | polars agg sum)
Configuration and Customization
Config File Locations
# Config file
~/.config/nushell/config.nu
# Environment variables
~/.config/nushell/env.nu
# History
~/.local/share/nushell/history.txt
Basic Configuration Example
# config.nu
# Set your editor
$env.EDITOR = "nvim"
# Custom prompt
def create_prompt [] {
let path = (pwd | path basename)
$"[($path)]> "
}
$env.PROMPT_COMMAND = { create_prompt }
# Enable syntax highlighting
use ~/.config/nushell/plugins/gghid.nu *
Useful Aliases
# Add these to config.nu
alias ll = ls -l
alias la = ls -a
alias lg = ls | grep
alias rm = rm -i # Safe delete
# Git shortcuts
alias gs = git status
alias ga = git add
alias gc = git commit -m
alias gp = git push
Performance Comparison
Based on 2026 benchmarks:
| Task | Bash + Tools | Nushell |
|---|---|---|
| JSON parsing | jq + pipes | Native (3× faster) |
| CSV processing | awk/csvkit | Native (2× faster) |
| File filtering | find + grep | ls + where (comparable) |
| Startup time | ~10ms | ~50ms |
| Memory usage | ~5MB | ~15MB |
Nushell starts a bit slower, but it outperforms on complex data processing tasks because it avoids spawning external processes.
Learning Resources
- Official Documentation — Complete getting-started guide and reference
- Nushell GitHub — Source code and issue tracking
- Nushell Blog — Latest releases and feature updates
- Discord Community — Active community support
- Cookbook — Practical code snippets
When Should You Use Nushell?
✅ Great For
- Working with structured data like JSON, CSV, and YAML
- Building data pipelines and ETL workflows
- Cross-platform script development
- Fetching and processing API data
- System administration and monitoring tasks
⚠️ Use With Caution
- Migrating existing Bash scripts (requires rewriting)
- Extremely performance-sensitive loops (startup overhead)
- Production environments that depend on specific shell behaviors
- Systems deeply integrated with legacy toolchains
Summary
Nushell represents the future direction of shell design. It's not meant to fully replace Bash (system scripts still need POSIX compatibility), but it offers a far more powerful environment for modern development tasks — both interactive and scripted.
Key advantages:
- 🎯 Structured data first — No more tangled messes of
jq,awk, andsed - 🔒 Type safe — Fewer script errors and surprises
- 🚀 Cross-platform consistent — Same scripts run everywhere
- 📦 Single binary deployment — No dependencies, easy to distribute
- 🛠️ Actively developed — Continuous updates in 2026, rapidly growing community
If you regularly work with APIs, data files, or simply want a more modern command-line experience, Nushell is well worth your time to learn.
Getting started: After installation, run nu for interactive mode, or nu script.nu to run a script. The official tutorial is the best place to start.