ConfigsApr 12, 2026·2 min read

Nushell — A New Type of Shell for the Modern Era

Nushell is a new type of shell that treats data as structured tables rather than plain text. Pipelines operate on structured data (tables, records, lists) instead of raw strings. Built in Rust with cross-platform support. Think of it as a shell meets a spreadsheet.

TL;DR
Nushell pipelines operate on structured tables and records instead of raw text strings.
§01

What it is

Nushell is a modern shell that treats data as structured tables rather than plain text. Every command outputs structured data (tables, records, lists) that downstream commands can filter, sort, group, and transform without text parsing. Built in Rust, Nushell runs on macOS, Linux, and Windows.

Nushell is for developers, sysadmins, and data wranglers who spend time parsing command output with grep, awk, and sed and want a shell that understands data natively.

The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.

§02

How it saves time or tokens

Traditional shells pipe plain text between commands. Extracting the third column of ls -l output requires awk '{print $3}' and breaks when the format changes. In Nushell, ls | get size returns the size column as a typed value. No regex, no column counting, no format assumptions.

§03

How to use

  1. Install Nushell via brew, cargo, or winget.
  2. Launch nu to enter the Nushell environment.
  3. Use built-in commands that return structured data and pipe them together.
§04

Example

# Install Nushell
brew install nushell   # macOS
cargo install nu       # Rust
winget install nushell # Windows

# Launch Nushell
nu

# Structured file listing
ls | where size > 1mb | sort-by modified

# Parse JSON natively
open package.json | get dependencies

# Group processes by CPU usage
ps | where cpu > 5 | sort-by cpu -r

# HTTP request with structured output
http get https://api.github.com/repos/nushell/nushell | get stargazers_count
§05

Related on TokRepo

§06

Common pitfalls

  • Nushell is not POSIX-compatible. Bash scripts do not run in Nushell. You need to rewrite shell scripts using Nushell syntax or call bash explicitly.
  • Environment variable syntax differs from bash. Use $env.PATH instead of $PATH. Forgetting this breaks path-dependent commands.
  • Some Unix commands output plain text that Nushell cannot parse automatically. Use the lines or parse commands to convert text output into structured data.

Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.

Frequently Asked Questions

Is Nushell POSIX-compatible?+

No. Nushell has its own language and is not a drop-in replacement for bash or zsh. Existing shell scripts need to be rewritten or run via bash -c from within Nushell.

What data formats does Nushell understand?+

Nushell natively parses JSON, YAML, TOML, CSV, TSV, XML, SQLite, and Excel files. The open command detects the format automatically and returns structured data.

Can I use Nushell as my default shell?+

Yes. Add Nushell to /etc/shells and run chsh -s $(which nu). Many users use Nushell as their primary interactive shell while keeping bash available for scripts.

How does Nushell handle errors?+

Nushell has a structured error system with error types, source locations, and suggestions. Errors are displayed with context showing which part of the pipeline failed and why.

Does Nushell support plugins?+

Yes. Nushell supports plugins written in any language that can communicate via the Nushell plugin protocol. Plugins extend Nushell with custom commands and data sources.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets