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.
Instalación lista para agent
Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.
npx -y tokrepo@latest install 903323cf-3649-11f1-9bc6-00163e2b0d79 --target codexEjecutar después de confirmar el plan con dry-run.
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.
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.
How to use
- Install Nushell via brew, cargo, or winget.
- Launch
nuto enter the Nushell environment. - Use built-in commands that return structured data and pipe them together.
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
Related on TokRepo
- AI Tools for Coding -- Developer tools and shell utilities
- Featured Workflows -- Top workflows on TokRepo
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.PATHinstead of$PATH. Forgetting this breaks path-dependent commands. - Some Unix commands output plain text that Nushell cannot parse automatically. Use the
linesorparsecommands 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.
Preguntas frecuentes
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.
Nushell natively parses JSON, YAML, TOML, CSV, TSV, XML, SQLite, and Excel files. The open command detects the format automatically and returns structured data.
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.
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.
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.
Referencias (3)
- Nushell GitHub— Nushell treats data as structured tables
- Nushell Website— Built in Rust with cross-platform support
- Nushell Documentation— Native parsing of JSON, YAML, CSV, and more
Relacionados en TokRepo
Discusión
Activos relacionados
Mypy — Optional Static Type Checker for Python
Mypy checks Python type annotations at development time, catching type errors before code runs. It is the reference implementation of PEP 484 gradual typing for Python.
sqlc — Generate Type-Safe Go Code from SQL
sqlc generates fully type-safe Go code from your SQL queries. Write SQL, run sqlc generate, and get Go functions with proper types for parameters and results — no ORM, no reflection, just compile-time safe database access.
MikroORM — TypeScript ORM with Data Mapper and Unit of Work
MikroORM is a TypeScript ORM for Node.js built on the Data Mapper pattern with Unit of Work and Identity Map. It supports PostgreSQL, MySQL, MariaDB, SQLite, and MongoDB with full type safety.
Effect — Type-Safe Functional Programming for TypeScript
Effect is a TypeScript library that brings structured concurrency, typed errors, dependency injection, and composable abstractions to production TypeScript applications.