← All posts

CLI

Nushell: A Shell Where Everything Is Structured Data

Nushell is a modern shell where command output is structured data you can filter, sort, and query like a table.

N CLI

Traditional shells pass plain text between commands, which is why so much shell scripting is a fragile dance of awk, cut, and sed trying to re-parse structure out of strings. Nushell takes a different bet: everything is structured data. Commands output tables, and you pipe those tables through operations like where, sort-by, and select - so filtering and transforming output feels like querying a database rather than scraping text.

Pipelines That Understand Structure

Because the data has columns, you operate on fields by name instead of by character position:

# List files, filter and sort as a table ls | where size > 1mb | sort-by modified # Parse JSON and pull fields open data.json | get items | select id name

Built-In Data Handling

Nushell reads JSON, YAML, CSV, TOML, and more into the same table model, so working with a config file or an API response uses the same verbs as working with files and processes. It's a genuinely different mental model, and a powerful one for data-shaped work.

Rough Edges and Limitations

  • It's not POSIX. Your bash snippets and muscle memory don't transfer directly.
  • Ecosystem assumes bash. Some install scripts and tooling expect a POSIX shell.
  • Still evolving. The language has matured a lot but can still change between releases.

As a daily driver it's a commitment, but even as an occasional tool for data-shaped tasks, Nushell's structured pipelines are a revelation.

Internal link suggestion: link "an API response" to the jq post, the text-shell way to do similar JSON work.