20 releases (breaking)

0.93.0 Apr 30, 2024
0.91.0 Mar 5, 2024
0.88.1 Dec 14, 2023
0.87.1 Nov 20, 2023
0.83.1 Jul 30, 2023

#438 in Rust patterns

Download history 610/week @ 2024-01-18 511/week @ 2024-01-25 703/week @ 2024-02-01 837/week @ 2024-02-08 885/week @ 2024-02-15 547/week @ 2024-02-22 961/week @ 2024-02-29 880/week @ 2024-03-07 604/week @ 2024-03-14 524/week @ 2024-03-21 823/week @ 2024-03-28 1564/week @ 2024-04-04 1043/week @ 2024-04-11 488/week @ 2024-04-18 1002/week @ 2024-04-25 827/week @ 2024-05-02

3,566 downloads per month
Used in 2 crates

MIT and maybe CC-PDDC

1.5MB
35K SLoC

Welcome to the standard library of `nushell`!

The standard library is a pure-nushell collection of custom commands which provide interactive utilities and building blocks for users writing casual scripts or complex applications.

To see what's here:

> use std
> scope commands | select name usage | where name =~ "std "
#┬───────────name────────────┬──────────────────────usage──────────────────────
0│std assert                 │Universal assert command
1│std assert equal           │Assert $left == $right
2│std assert error           │Assert that executing the code generates an error
3│std assert greater         │Assert $left > $right
4│std assert greater or equal│Assert $left >= $right
             ...                                     ...
─┴───────────────────────────┴─────────────────────────────────────────────────

🧰 Using the standard library in the REPL or in scripts

All commands in the standard library must be "imported" into the running environment (the interactive read-execute-print-loop (REPL) or a .nu script) using the use command.

You can choose to import the whole module, but then must refer to individual commands with a std prefix, e.g:

use std

std log debug "Running now"
std assert (1 == 2)

Or you can enumerate the specific commands you want to import and invoke them without the std prefix.

use std ["log debug" assert]

log debug "Running again"
assert (2 == 1)

This is probably the form of import you'll want to add to your env.nu for interactive use.

✏️ contribute to the standard library

You're invited to contribute to the standard library! See CONTRIBUTING.md for details

Dependencies

~21–56MB
~1M SLoC