Frameworks#

Nushell’s ecosystem is small compared to zsh, and on purpose: much of what would be a third-party framework elsewhere ships inside the core std library. The third-party scene splits between prompt managers, plugins, and a small set of module collections the operator pulls into ~/.config/nushell.

Prompt Managers#

Nu uses PROMPT_COMMAND (a closure) and PROMPT_INDICATOR to render the prompt. Hand-rolled prompts are common; third- party prompt managers cover the polished case.

  • Starship, cross-shell prompt in Rust. Configured via TOML; the same configuration works in Nu, zsh, bash, fish, PowerShell.

  • oh-my-posh, another cross-shell prompt; theme-rich, async git.

# Starship wiring in env.nu / config.nu
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu

# config.nu
use ~/.cache/starship/init.nu

Plugins#

Plugins extend Nu with new commands. The standard reach.

  • polars, DataFrames for Nu using Apache Arrow. Parquet, SQL, joins, group-by at native speed.

  • query, selectors for XML, JSON, web pages.

  • formats, EML, vCard, INI, plist readers.

  • gstat, git status as a structured record.

  • inc, semantic version increment.

Plugin installation lives under cargo install or downloads from the project’s release pages.

cargo install nu_plugin_polars
plugin add ~/.cargo/bin/nu_plugin_polars
plugin use polars

Module Collections#

  • nu_scripts, the official scripts and modules repo. Aliases, prompt themes, custom completions for popular CLIs, command libraries.

  • awesome-nu, curated list of Nu plugins, scripts, modules.

Drop modules into ~/.config/nushell/ and use them from config.nu.

Testing#

  • nutest, TAP-style test framework for Nu.

  • std assert, in-shell assertions for ad-hoc tests; small test scripts can drive a project’s CI without an external framework.

use std

def "test addition" [] {
    std assert equal (2 + 3) 5
}

test addition

CLI / Argument Parsing#

Native. Nu commands declare typed parameters and flags directly; no third party needed. The form mirrors PowerShell’s advanced function template more than bash’s getopts.

def deploy [
    host: string                              # required positional
    --env: string = "dev"                     # flag with default
    --force(-f)                               # boolean flag
    --port: int                               # optional flag
] {
    print $"deploying ($host) to ($env) (force=($force))"
}

The result behaves like a built-in: --help works, tab- completion lands on flag names, type errors surface at the call site.

Logging / Output#

  • std/log, structured logging (info / warning / error) built into the standard library.

  • gum, still the default for styled output and interactive prompts in shell scripts; works across Nu, bash, zsh, fish.

Automation Hosts#

Nu scripts run unattended through the usual Unix mechanisms.

  • Cron / systemd timers on Linux. nu -c '...' or nu script.nu.

  • GitHub Actions, install Nu in the workflow with hustcer/setup-nu and run scripts with shell: nu {0}.

- uses: hustcer/setup-nu@v3
  with:
    version: '*'
- shell: nu {0}
  run: |
    open data.json
        | where status == "open"
        | length

References#

  • Libraries for the built-in / std / plugin layer these frameworks build on.

  • Patterns for error handling and immutability discipline.

  • Nushell for the broader Nu chapter.

  • awesome-nu (curated list).

  • nu_scripts (official scripts and modules repo).