nu(1)
Nushell is a modern shell and command language with structured data pipelines and a focus on usability.
Synopsis
nu [OPTIONS] [FILE]Description
Nushell (nu) is a cross-platform shell that treats data as structured objects rather than plain text streams. It combines the power of traditional Unix pipelines with a modern programming language, making it easier to work with JSON, CSV, databases, and other structured formats.
Unlike bash or zsh, Nushell uses a data-first approach where commands output tables and objects that can be filtered and transformed intuitively. It features strong typing, pattern matching, and a familiar syntax inspired by Python and Rust.
Common options
| Flag | What it does |
|---|---|
-c, --command | Run a command string and exit (e.g., nu -c 'ls | length') |
-n, --no-std-lib | Start without loading the standard library |
-l, --login | Start as a login shell (load login configuration) |
--stdin | Execute a script passed via standard input |
-e, --execute | Execute the given script and exit |
--no-config-file | Start without loading env.nu or config.nu |
-v, --version | Print version information and exit |
-h, --help | Print help message and exit |
Examples
Start an interactive Nushell session
nuList files showing only name and size columns (structured output)
nu -c 'ls | select name size'Execute a Nushell script file
nu script.nuParse JSON, filter rows, and select specific columns
nu -c 'open data.json | where age > 30 | select name age'Parse JSON from stdin and sort by a field
echo '[{name: Alice, score: 95}, {name: Bob, score: 87}]' | nu -c 'from json | sort-by score'List processes with CPU usage greater than 50%
nu -c 'ps | where cpu > 50'Execute a script piped via standard input
nu --stdin < myscript.nuDisplay help for all available commands
nu -c 'help commands' | less