The nushell language and shell.
Usage:
nu [options] [script file] [script args]
Options:
General:
-h, --help
show this help message
Example: nu --help
-v, --version
print the version
Example: nu --version
Startup:
-i, --interactive
start as an interactive shell
Example: nu -i
-l, --login
start as a login shell
Example: nu -l
-c, --commands <string>
run the given commands and then exit
Example: nu -c "print 1"
-e, --execute <string>
run the given commands and then enter an interactive shell
Example: nu -e "print 1"
-m, --table-mode <string>
the table mode to use. rounded is default.
Example: nu -m rounded
--error-style <string>
the error style to use (fancy or plain). default: fancy
Example: nu --error-style plain
--no-newline
print the result for --commands(-c) without a newline
Example: nu --no-newline -c "print 1"
--stdin
redirect standard input to a command (with `-c`) or a script file
Example: nu --stdin -c "print $in"
--mcp
start nu's model context protocol server
Example: nu --mcp
--mcp-transport <string>
transport to use for MCP server (stdio or http)
Example: nu --mcp --mcp-transport http
--mcp-port <int>
port for MCP HTTP transport (default 8080)
Example: nu --mcp --mcp-transport http --mcp-port 3000
--mcp-host <string>
address the MCP HTTP transport binds to (default 127.0.0.1)
Example: nu --mcp --mcp-transport http --mcp-host 0.0.0.0
--mcp-allowed-hosts <string...>
list of allowed `Host` header values, guarding against DNS-rebinding attacks (default: loopback-only)
Example: nu --mcp --mcp-transport http --mcp-allowed-hosts="example.com,localhost"
--mcp-allowed-origins <string...>
list of allowed CORS origins (default: none, which disables Origin validation for backward compatibility)
Example: nu --mcp --mcp-transport http --mcp-allowed-origins="https://example.com,https://localhost"
Configuration:
-I, --include-path <string>
set the NU_LIB_DIRS for the given script (delimited by char record_sep (''))
Example: nu -I scripts
-n, --no-config-file
start with no config file and no env file
Example: nu --no-config-file
--no-history
disable reading and writing to command history
Example: nu --no-history
--no-std-lib
start with no standard library
Example: nu --no-std-lib
--config <path>
start with an alternate config file
Example: nu --config config.nu
--env-config <path>
start with an alternate environment config file
Example: nu --env-config env.nu
--config-home <path>
start with an alternate config directory (e.g. ~/.config/nushell)
Example: nu --config-home /path/to/config
Logging:
--log-level <string>
log level for diagnostic logs (error, warn, perf, info, debug, trace). Off by default
Example: nu --log-level info
--log-target <string>
set the target for the log to output. stdout, stderr(default), mixed or file (requires --log-file)
Example: nu --log-target stdout
--log-file <path>
specify a custom log file path (requires --log-target file and --log-level <level>)
Example: nu --log-target file --log-file ~/.local/share/nushell/nu.log --log-level info
--log-include <string...>
set the Rust module prefixes to include from the log output
Example: nu --log-include nu_cli
--log-exclude <string...>
set the Rust module prefixes to exclude from the log output
Example: nu --log-exclude nu_cli
IDE:
--lsp
start nu's language server protocol
Example: nu --lsp
--dap
start nu's debug adapter protocol server (over stdio)
Example: nu --dap
--ide-goto-def <int>
go to the definition of the item at the given cursor position and file
Example: nu --ide-goto-def 0 script.nu
--ide-hover <int>
give information about the item at the given cursor position and file
Example: nu --ide-hover 0 script.nu
--ide-complete <int>
list completions for the item at the given cursor position and file
Example: nu --ide-complete 4 script.nu
--ide-check <int>
run a diagnostic check on the given source and limit number of errors returned to provided number
Example: nu --ide-check 100 script.nu
--ide-ast
generate the ast on the given source
Example: nu --ide-ast script.nu
Experimental:
--experimental-options <string...>
enable or disable experimental options, use "all" to set all active options
Example: nu --experimental-options [example=false]
Plugins:
--plugin-config <path>
start with an alternate plugin registry file
Example: nu --plugin-config plugins.msgpackz
--plugins <path>
list of plugin executable files to load (full paths), separately from the registry file (use multiple `--plugins` flags or a bracketed list: `--plugins '[/path/a /path/b]'`)
Example: nu --plugins /path/nu_plugin_one --plugins /path/nu_plugin_two
Options (38)
| Option | Description | Source |
|---|---|---|
-h, --help | show this help message Example: nu --help | help |
-v, --version | print the version Example: nu --version | help |
-i, --interactive | start as an interactive shell Example: nu -i | help |
-l, --login | start as a login shell Example: nu -l | help |
-c, --commands string | run the given commands and then exit Example: nu -c "print 1" | help |
-e, --execute string | run the given commands and then enter an interactive shell Example: nu -e "print 1" | help |
-m, --table-mode string | the table mode to use. | help |
--error-style string | the error style to use (fancy or plain). | help |
--no-newline | print the result for --commands(-c) without a newline Example: nu --no-newline -c "print 1" | help |
--stdin | redirect standard input to a command (with `-c`) or a script file Example: nu --stdin -c "print $in" | help |
--mcp | start nu's model context protocol server Example: nu --mcp | help |
--mcp-transport string | transport to use for MCP server (stdio or http) Example: nu --mcp --mcp-transport http | help |
--mcp-port int | port for MCP HTTP transport (default 8080) Example: nu --mcp --mcp-transport http --mcp-port 3000 | help |
--mcp-host string | address the MCP HTTP transport binds to (default 127.0.0.1) Example: nu --mcp --mcp-transport http --mcp-host 0.0.0.0 | help |
--mcp-allowed-hosts string... | list of allowed `Host` header values, guarding against DNS-rebinding attacks (default: loopback-only) Example: nu --mcp --mcp-transport http --mcp-allowed-hosts="example.com,localhost" | help |
--mcp-allowed-origins string... | list of allowed CORS origins (default: none, which disables Origin validation for backward compatibility) Example: nu --mcp --mcp-transport http… | help |
-I, --include-path string | set the NU_LIB_DIRS for the given script (delimited by char record_sep ('')) Example: nu -I scripts | help |
-n, --no-config-file | start with no config file and no env file Example: nu --no-config-file | help |
--no-history | disable reading and writing to command history Example: nu --no-history | help |
--no-std-lib | start with no standard library Example: nu --no-std-lib | help |
--config path | start with an alternate config file Example: nu --config config.nu | help |
--env-config path | start with an alternate environment config file Example: nu --env-config env.nu | help |
--config-home path | start with an alternate config directory (e.g. ~/.config/nushell) Example: nu --config-home /path/to/config | help |
--log-level string | log level for diagnostic logs (error, warn, perf, info, debug, trace). | help |
--log-target string | set the target for the log to output. | help |
--log-file path | specify a custom log file path (requires --log-target file and --log-level <level>) Example: nu --log-target file --log-file ~/.local/share/nushell/nu.log --log-level info | help |
--log-include string... | set the Rust module prefixes to include from the log output Example: nu --log-include nu_cli | help |
--log-exclude string... | set the Rust module prefixes to exclude from the log output Example: nu --log-exclude nu_cli | help |
--lsp | start nu's language server protocol Example: nu --lsp | help |
--dap | start nu's debug adapter protocol server (over stdio) Example: nu --dap | help |
--ide-goto-def int | go to the definition of the item at the given cursor position and file Example: nu --ide-goto-def 0 script.nu | help |
--ide-hover int | give information about the item at the given cursor position and file Example: nu --ide-hover 0 script.nu | help |
--ide-complete int | list completions for the item at the given cursor position and file Example: nu --ide-complete 4 script.nu | help |
--ide-check int | run a diagnostic check on the given source and limit number of errors returned to provided number Example: nu --ide-check 100 script.nu | help |
--ide-ast | generate the ast on the given source Example: nu --ide-ast script.nu | help |
--experimental-options string... | enable or disable experimental options, use "all" to set all active options Example: nu --experimental-options [example=false] | help |
--plugin-config path | start with an alternate plugin registry file Example: nu --plugin-config plugins.msgpackz | help |
--plugins path | list of plugin executable files to load (full paths), separately from the registry file (use multiple `--plugins` flags or a bracketed list: `--plugins '[/path/a /path/b]'`) Example: nu --plugins… | help |