https://github.com/nushell/nushell Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} nushell / nushell * Notifications * Star 13k * Fork 608 A new type of shell www.nushell.sh/ MIT License 13k stars 608 forks Star Notifications * Code * Issues 509 * Pull requests 9 * Discussions * Actions * Projects 2 * Wiki * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Wiki * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 36 tags Code Clone HTTPS GitHub CLI [https://github.com/n] Use Git or checkout with SVN using the web URL. [gh repo clone nushel] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @fdncred fdncred fix FlatShape::Garbage's default foreground color (#3634) ... 02bac0a Jun 16, 2021 fix FlatShape::Garbage's default foreground color (#3634) 02bac0a Git stats * 3,308 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .azure Remove the CI canaries (#3567) Jun 7, 2021 .cargo added .cargo/config.toml to build with bigger stack on windows (#2594 ) Sep 24, 2020 .circleci Update config.yml Aug 27, 2020 .github Bug report uses version command (#2797) Dec 19, 2020 .theia [Gitpod] Refactor Gitpod configuration and add full Debugging support (... May 8, 2020 crates fix FlatShape::Garbage's default foreground color (#3634) Jun 16, 2021 debian Transfered Docker to a plugin instead of a Command. Sep 25, 2019 docker Remove it expansion (#2701) Oct 26, 2020 docs Support version option in Nu bin. (#3632) Jun 16, 2021 images Delete nushell-demo.svg Jan 25, 2021 pkg_mgrs/winget added pkg_mgr/winget + yaml (#2297) Aug 10, 2020 samples/wasm Fix the wasm build (#2919) Jan 12, 2021 src Make Nu bootstrap itself from main. (#3619) Jun 15, 2021 tests Support version option in Nu bin. (#3632) Jun 16, 2021 wix add query json plugin for experimentation (#3327) Apr 19, 2021 .dockerignore Move most of the root package into a subcrate. (#1445) Mar 4, 2020 .editorconfig Build and publish docker img along with nu plugins Sep 8, 2019 .gitignore Changes to allow plugins to be loaded in a multi-threaded manner (# 1694) May 4, 2020 .gitpod.Dockerfile Fix Gitpod dev setup by forcing a dev image rebuild (#2783) Dec 8, 2020 .gitpod.yml [Gitpod] Don't test removed feature 'test-bins' (#2948) Jan 19, 2021 CODE_OF_CONDUCT.md First pass at updating all documentation formatting and cleaning up o... Jun 23, 2020 CONTRIBUTING.md Update contributor-book url (#3198) Mar 20, 2021 Cargo.lock Extract completions into subcrate. (#3631) Jun 16, 2021 Cargo.toml Extract completions into subcrate. (#3631) Jun 16, 2021 LICENSE Update LICENSE May 12, 2021 Makefile.toml --no-edit Nov 21, 2019 README.build.txt Create README.build.txt Oct 13, 2020 README.md (docs) update README.md (#3630) Jun 16, 2021 extra_features_cargo_install.sh Juicy features cargo installer wrapper (#3388) May 6, 2021 rustfmt.toml Data flows across commands via streams now May 23, 2019 View code README Nushell Status Learning more Installation Local Docker Quickstart Guide Packaging status Fedora Philosophy Pipelines Opening files Configuration Shells Plugins Goals Commands Progress Current Roadmap Contributing License README.md README Crates.io Build Status Discord The Changelog #363 @nu_shell GitHub commit activity GitHub contributors Nushell A new type of shell. Example of nushell Status This project has reached a minimum-viable product level of quality. While contributors dogfood it as their daily driver, it may be unstable for some commands. Future releases will work to fill out missing features and improve stability. Its design is also subject to change as it matures. Nu comes with a set of built-in commands (listed below). If a command is unknown, the command will shell-out and execute it (using cmd on Windows or bash on Linux and macOS), correctly passing through stdin, stdout, and stderr, so things like your daily git workflows and even vim will work just fine. Learning more There are a few good resources to learn about Nu. There is a book about Nu that is currently in progress. The book focuses on using Nu and its core concepts. If you're a developer who would like to contribute to Nu, we're also working on a book for developers to help you get started. There are also good first issues to help you dive in. We also have an active Discord and Twitter if you'd like to come and chat with us. You can also find information on more specific topics in our cookbook . Try it in Gitpod. Open in Gitpod Installation Local Up-to-date installation instructions can be found in the installation chapter of the book. Windows users: please note that Nu works on Windows 10 and does not currently have Windows 7/8.1 support. To build Nu, you will need to use the latest stable (1.51 or later) version of the compiler. Required dependencies: * pkg-config and libssl (only needed on Linux) + On Debian/Ubuntu: apt install pkg-config libssl-dev Optional dependencies: * To use Nu with all possible optional features enabled, you'll also need the following: + On Linux (on Debian/Ubuntu): apt install libxcb-composite0-dev libx11-dev To install Nu via cargo (make sure you have installed rustup and the latest stable compiler via rustup install stable): cargo install nu To install Nu via the Windows Package Manager: winget install nu You can also build Nu yourself with all the bells and whistles (be sure to have installed the dependencies for your platform), once you have checked out this repo with git: cargo build --workspace --features=extra Docker Quickstart Want to try Nu right away? Execute the following to get started. docker run -it quay.io/nushell/nu:latest Guide If you want to pull a pre-built container, you can browse tags for the nushell organization on Quay.io. Pulling a container would come down to: docker pull quay.io/nushell/nu docker pull quay.io/nushell/nu-base Both "nu-base" and "nu" provide the nu binary, however, nu-base also includes the source code at /code in the container and all dependencies. Optionally, you can also build the containers locally using the dockerfiles provided: To build the base image: docker build -f docker/Dockerfile.nu-base -t nushell/nu-base . And then to build the smaller container (using a Multistage build): docker build -f docker/Dockerfile -t nushell/nu . Either way, you can run either container as follows: docker run -it nushell/nu-base docker run -it nushell/nu /> exit The second container is a bit smaller if the size is important to you. Packaging status Packaging status Fedora COPR repo: sudo dnf copr enable atim/nushell -y && sudo dnf install nushell -y Philosophy Nu draws inspiration from projects like PowerShell, functional programming languages, and modern CLI tools. Rather than thinking of files and services as raw streams of text, Nu looks at each input as something with structure. For example, when you list the contents of a directory, what you get back is a table of rows, where each row represents an item in that directory. These values can be piped through a series of steps, in a series of commands called a 'pipeline'. Pipelines In Unix, it's common to pipe between commands to split up a sophisticated command over multiple steps. Nu takes this a step further and builds heavily on the idea of pipelines. Just as the Unix philosophy, Nu allows commands to output to stdout and read from stdin. Additionally, commands can output structured data (you can think of this as a third kind of stream). Commands that work in the pipeline fit into one of three categories: * Commands that produce a stream (e.g., ls) * Commands that filter a stream (eg, where type == "Dir") * Commands that consume the output of the pipeline (e.g., autoview) Commands are separated by the pipe symbol (|) to denote a pipeline flowing left to right. > ls | where type == "Dir" | autoview ---+--------+------+-------+-------------- # | name | type | size | modified ---+--------+------+-------+-------------- 0 | assets | Dir | 128 B | 5 months ago 1 | crates | Dir | 704 B | 50 mins ago 2 | debian | Dir | 352 B | 5 months ago 3 | docker | Dir | 288 B | 3 months ago 4 | docs | Dir | 192 B | 50 mins ago 5 | images | Dir | 160 B | 5 months ago 6 | src | Dir | 128 B | 1 day ago 7 | target | Dir | 160 B | 5 days ago 8 | tests | Dir | 192 B | 3 months ago ---+--------+------+-------+-------------- Because most of the time you'll want to see the output of a pipeline, autoview is assumed. We could have also written the above: > ls | where type == Dir Being able to use the same commands and compose them differently is an important philosophy in Nu. For example, we could use the built-in ps command to get a list of the running processes, using the same where as above. > ps | where cpu > 0 ---+--------+-------------------+----------+---------+----------+---------- # | pid | name | status | cpu | mem | virtual ---+--------+-------------------+----------+---------+----------+---------- 0 | 435 | irq/142-SYNA327 | Sleeping | 7.5699 | 0 B | 0 B 1 | 1609 | pulseaudio | Sleeping | 6.5605 | 10.6 MB | 2.3 GB 2 | 1625 | gnome-shell | Sleeping | 6.5684 | 639.6 MB | 7.3 GB 3 | 2202 | Web Content | Sleeping | 6.8157 | 320.8 MB | 3.0 GB 4 | 328788 | nu_plugin_core_ps | Sleeping | 92.5750 | 5.9 MB | 633.2 MB ---+--------+-------------------+----------+---------+----------+---------- Opening files Nu can load file and URL contents as raw text or structured data (if it recognizes the format). For example, you can load a .toml file as structured data and explore it: > open Cargo.toml --------------------+--------------------------- bin | [table 18 rows] build-dependencies | [row serde toml] dependencies | [row 29 columns] dev-dependencies | [row nu-test-support] features | [row 19 columns] package | [row 12 columns] workspace | [row members] --------------------+--------------------------- We can pipeline this into a command that gets the contents of one of the columns: > open Cargo.toml | get package ---------------+------------------------------------ authors | [table 1 rows] default-run | nu description | A new type of shell documentation | https://www.nushell.sh/book/ edition | 2018 exclude | [table 1 rows] homepage | https://www.nushell.sh license | MIT name | nu readme | README.md repository | https://github.com/nushell/nushell version | 0.32.0 ---------------+------------------------------------ Finally, we can use commands outside of Nu once we have the data we want: > open Cargo.toml | get package.version 0.32.0 Here we use the variable $it to refer to the value being piped to the external command. Configuration Nu has early support for configuring the shell. You can refer to the book for a list of all supported variables. To set one of these variables, you can use config set. For example: > config set line_editor.edit_mode "vi" > config set path $nu.path Shells Nu will work inside of a single directory and allow you to navigate around your filesystem by default. Nu also offers a way of adding additional working directories that you can jump between, allowing you to work in multiple directories simultaneously. To do so, use the enter command, which will allow you to create a new "shell" and enter it at the specified path. You can toggle between this new shell and the original shell with the p (for previous) and n (for next), allowing you to navigate around a ring buffer of shells. Once you're done with a shell, you can exit it and remove it from the ring buffer. Finally, to get a list of all the current shells, you can use the shells command. Plugins Nu supports plugins that offer additional functionality to the shell and follow the same structured data model that built-in commands use. This allows you to extend nu for your needs. There are a few examples in the plugins directory. Plugins are binaries that are available in your path and follow a nu_plugin_* naming convention. These binaries interact with nu via a simple JSON-RPC protocol where the command identifies itself and passes along its configuration, making it available for use. If the plugin is a filter, data streams to it one element at a time, and it can stream data back in return via stdin/stdout. If the plugin is a sink, it is given the full vector of final data and is given free reign over stdin/stdout to use as it pleases. Goals Nu adheres closely to a set of goals that make up its design philosophy. As features are added, they are checked against these goals. * First and foremost, Nu is cross-platform. Commands and techniques should carry between platforms and offer consistent first-class support for Windows, macOS, and Linux. * Nu ensures direct compatibility with existing platform-specific executables that make up people's workflows. * Nu's workflow and tools should have the usability in day-to-day experience of using a shell in 2019 (and beyond). * Nu views data as both structured and unstructured. It is a structured shell like PowerShell. * Finally, Nu views data functionally. Rather than using mutation, pipelines act as a means to load, change, and save data without mutable state. Commands You can find a list of Nu commands, complete with documentation, in quick command references. Progress Nu is in heavy development and will naturally change as it matures and people use it. The chart below isn't meant to be exhaustive, but rather helps give an idea for some of the areas of development and their relative completion: Features Not Prototype MVP Preview Mature Notes started Aliases allow for Aliases X shortening large commands, while passing flags Initial jupyter Notebook X support, but it loses state and lacks features cp, mv, rm, mkdir File ops X have some support, but lacking others Temporary Environment X environment and scoped environment variables Basic value and Shells X file shells, but no opt-in/opt-out for commands Protocol X Streaming protocol is serviceable Plugins work on Plugins X one row at a time, lack batching and expression eval Error reporting Errors X works, but could use usability polish Book updated to Documentation X latest release, including usage examples Textview has Paging X paging, but we'd like paging for tables Functions and Functions X aliases are supported Nu supports Variables X variables and environment variables Completions X Completions for filepaths Commands check Type-checking X basic types, but input/output isn't checked Current Roadmap We've added a Roadmap Board to help collaboratively capture the direction we're going for the current release and capture some important issues we'd like to see in Nushell. You can find the Roadmap here. Contributing See Contributing for details. Thanks to all the people who already contributed! [6874747073] License The project is made available under the MIT license. See the LICENSE file for more information. About A new type of shell www.nushell.sh/ Topics shell rust Resources Readme License MIT License Releases 36 0.32.0 Release Latest Jun 1, 2021 + 35 releases Packages 1 Contributors 231 * @jonathandturner * @andrasio * @fdncred * @wycats * @JosephTLyons * @thegedge * @est31 * @gillespiecd * @JesterOrNot * @coolshaurya * @LhKipp + 220 contributors Languages * Rust 100.0% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.